@@ -137,8 +137,7 @@ |
||
137 | 137 | $this->rotation = 0; |
138 | 138 | $this->shadow = new Drawing\Shadow(); |
139 | 139 | |
140 | - // Set image index |
|
141 | - ++self::$imageCounter; |
|
140 | + // Set image index++self::$imageCounter; |
|
142 | 141 | $this->imageIndex = self::$imageCounter; |
143 | 142 | } |
144 | 143 |
@@ -4,53 +4,53 @@ |
||
4 | 4 | |
5 | 5 | return [ |
6 | 6 | [ |
7 | - 19, // Result for Excel |
|
8 | - 19, // Result for OpenOffice |
|
7 | + 19, // Result for Excel |
|
8 | + 19, // Result for OpenOffice |
|
9 | 9 | 22269, |
10 | 10 | ], |
11 | 11 | [ |
12 | - 1, // Result for Excel |
|
13 | - 1, // Result for OpenOffice |
|
12 | + 1, // Result for Excel |
|
13 | + 1, // Result for OpenOffice |
|
14 | 14 | 30348, |
15 | 15 | ], |
16 | 16 | [ |
17 | - 10, // Result for Excel |
|
18 | - 10, // Result for OpenOffice |
|
17 | + 10, // Result for Excel |
|
18 | + 10, // Result for OpenOffice |
|
19 | 19 | 30843, |
20 | 20 | ], |
21 | 21 | [ |
22 | - 11, // Result for Excel |
|
23 | - 11, // Result for OpenOffice |
|
22 | + 11, // Result for Excel |
|
23 | + 11, // Result for OpenOffice |
|
24 | 24 | '11-Nov-1918', |
25 | 25 | ], |
26 | 26 | [ |
27 | - 28, // Result for Excel |
|
28 | - 28, // Result for OpenOffice |
|
27 | + 28, // Result for Excel |
|
28 | + 28, // Result for OpenOffice |
|
29 | 29 | '28-Feb-1904', |
30 | 30 | ], |
31 | 31 | [ |
32 | - '#VALUE!', // Result for Excel |
|
33 | - '#VALUE!', // Result for OpenOffice |
|
32 | + '#VALUE!', // Result for Excel |
|
33 | + '#VALUE!', // Result for OpenOffice |
|
34 | 34 | 'Invalid', |
35 | 35 | ], |
36 | 36 | [ |
37 | - '#NUM!', // Result for Excel |
|
38 | - 29, // Result for OpenOffice |
|
37 | + '#NUM!', // Result for Excel |
|
38 | + 29, // Result for OpenOffice |
|
39 | 39 | -1, |
40 | 40 | ], |
41 | 41 | [ |
42 | - 1, // Result for Excel |
|
43 | - 31, // Result for OpenOffice |
|
42 | + 1, // Result for Excel |
|
43 | + 31, // Result for OpenOffice |
|
44 | 44 | 1, |
45 | 45 | ], |
46 | 46 | [ |
47 | - 0, // Result for Excel |
|
48 | - 30, // Result for OpenOffice |
|
47 | + 0, // Result for Excel |
|
48 | + 30, // Result for OpenOffice |
|
49 | 49 | 0.5, |
50 | 50 | ], |
51 | 51 | [ |
52 | - 0, // Result for Excel |
|
53 | - 30, // Result for OpenOffice |
|
52 | + 0, // Result for Excel |
|
53 | + 30, // Result for OpenOffice |
|
54 | 54 | 0, |
55 | 55 | ], |
56 | 56 | ]; |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | /** |
22 | 22 | * @throws \PhpOffice\PhpSpreadsheet\Exception |
23 | 23 | */ |
24 | - public function testDrawingImageHyperlinkTest(){ |
|
24 | + public function testDrawingImageHyperlinkTest() { |
|
25 | 25 | |
26 | 26 | $spreadsheet = new Spreadsheet(); |
27 | 27 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | $gdImage = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream'); |
32 | 32 | $textColor = imagecolorallocate($gdImage, 255, 255, 255); |
33 | - imagestring($gdImage, 1, 5, 5, 'Created with PhpSpreadsheet', $textColor); |
|
33 | + imagestring($gdImage, 1, 5, 5, 'Created with PhpSpreadsheet', $textColor); |
|
34 | 34 | |
35 | 35 | $drawing = new MemoryDrawing(); |
36 | 36 | $drawing->setName('In-Memory image 1'); |
@@ -42,14 +42,14 @@ discard block |
||
42 | 42 | ); |
43 | 43 | $drawing->setMimeType(MemoryDrawing::MIMETYPE_DEFAULT); |
44 | 44 | $drawing->setHeight(36); |
45 | - $hyperLink = new Hyperlink(self::BASE_URL,'test image'); |
|
45 | + $hyperLink = new Hyperlink(self::BASE_URL, 'test image'); |
|
46 | 46 | $drawing->setHyperlink($hyperLink); |
47 | 47 | $drawing->setWorksheet($aSheet); |
48 | 48 | |
49 | 49 | $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx'); |
50 | 50 | |
51 | - foreach ($reloadedSpreadsheet->getActiveSheet()->getDrawingCollection() as $pDrawing){ |
|
52 | - self::assertEquals(self::BASE_URL , $pDrawing->getHyperlink()->getUrl(), 'functional test drawing hyperlink'); |
|
51 | + foreach ($reloadedSpreadsheet->getActiveSheet()->getDrawingCollection() as $pDrawing) { |
|
52 | + self::assertEquals(self::BASE_URL, $pDrawing->getHyperlink()->getUrl(), 'functional test drawing hyperlink'); |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | } |
56 | 56 | \ No newline at end of file |
@@ -187,10 +187,10 @@ |
||
187 | 187 | $objWriter->writeAttribute('descr', $pDrawing->getDescription()); |
188 | 188 | |
189 | 189 | //a:hlinkClick |
190 | - if($pHlinkClickId >= 0) { |
|
190 | + if ($pHlinkClickId >= 0) { |
|
191 | 191 | $objWriter->startElement('a:hlinkClick'); |
192 | - $objWriter->writeAttribute('xmlns:r','http://schemas.openxmlformats.org/officeDocument/2006/relationships'); |
|
193 | - $objWriter->writeAttribute('r:id','rId' . $pHlinkClickId ); |
|
192 | + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); |
|
193 | + $objWriter->writeAttribute('r:id', 'rId' . $pHlinkClickId); |
|
194 | 194 | $objWriter->endElement(); |
195 | 195 | } |
196 | 196 |
@@ -304,7 +304,7 @@ |
||
304 | 304 | '../media/' . str_replace(' ', '', $drawing->getIndexedFilename()) |
305 | 305 | ); |
306 | 306 | |
307 | - if(!empty($drawing->getHyperlink()->getUrl())){ |
|
307 | + if (!empty($drawing->getHyperlink()->getUrl())) { |
|
308 | 308 | ++$i; |
309 | 309 | $this->writeRelationship( |
310 | 310 | $objWriter, |