Skip to content

Commit 748e164

Browse files
author
Bas-Jan 't Jong
committed
Final try to resolve Travis build errors
1 parent 0103787 commit 748e164

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/PhpWord/Writer/Word2007/Element/Line.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ public function write()
4141
$style = $element->getStyle();
4242
$styleWriter = new LineStyleWriter($xmlWriter, $style);
4343

44-
$id=$element->getElementIndex();
44+
$elementId=$element->getElementIndex();
4545
if (!$this->withoutP) {
4646
$xmlWriter->startElement('w:p');
4747
$styleWriter->writeAlignment();
4848
}
4949
$xmlWriter->startElement('w:r');
5050
$xmlWriter->startElement('w:pict');
51-
if ($id==1) { //shapetype could be defined for each line separately, but then a unique id would be necessary
51+
if ($elementId==1) { //shapetype could be defined for each line separately, but then a unique id would be necessary
5252
$xmlWriter->startElement('v:shapetype');
5353
$xmlWriter->writeAttribute('id', '_x0000_t32');
5454
$xmlWriter->writeAttribute('coordsize', '21600,21600');
@@ -68,7 +68,7 @@ public function write()
6868
$xmlWriter->endElement(); // v:shapetype
6969
}
7070
$xmlWriter->startElement('v:shape');
71-
$xmlWriter->writeAttribute('id', sprintf('_x0000_s1%1$03d', $id));
71+
$xmlWriter->writeAttribute('id', sprintf('_x0000_s1%1$03d', $elementId));
7272
$xmlWriter->writeAttribute('type', '#_x0000_t32'); //type should correspond to shapetype id
7373
$styleWriter->write();
7474
$styleWriter->writeStroke();

tests/PhpWord/Tests/Style/LineTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ public function testSetGetNormal()
3535
$object = new Line();
3636

3737
$properties = array(
38-
'flip' => true,
3938
'connectorType' => \PhpOffice\PhpWord\Style\Line::CONNECTOR_TYPE_STRAIGHT,
4039
'beginArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK,
4140
'endArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL,
@@ -59,7 +58,6 @@ public function testSetStyleValue()
5958
$object = new Line();
6059

6160
$properties = array(
62-
'flip' => true,
6361
'connectorType' => \PhpOffice\PhpWord\Style\Line::CONNECTOR_TYPE_STRAIGHT,
6462
'beginArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK,
6563
'endArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL,
@@ -82,7 +80,7 @@ public function testSetGetFlip()
8280
$expected=true;
8381
$object = new Line();
8482
$object->setFlip($expected);
85-
$this->assertEquals($expected, $object->getFlip());
83+
$this->assertEquals($expected, $object->isFlip());
8684
}
8785

8886
/**

0 commit comments

Comments
 (0)