@@ -125,31 +125,31 @@ discard block |
||
125 | 125 | $elements = $pRichText->getRichTextElements(); |
126 | 126 | foreach ($elements as $element) { |
127 | 127 | // r |
128 | - $objWriter->startElement($prefix . 'r'); |
|
128 | + $objWriter->startElement($prefix.'r'); |
|
129 | 129 | |
130 | 130 | // rPr |
131 | 131 | if ($element instanceof Run) { |
132 | 132 | // rPr |
133 | - $objWriter->startElement($prefix . 'rPr'); |
|
133 | + $objWriter->startElement($prefix.'rPr'); |
|
134 | 134 | |
135 | 135 | // rFont |
136 | - $objWriter->startElement($prefix . 'rFont'); |
|
136 | + $objWriter->startElement($prefix.'rFont'); |
|
137 | 137 | $objWriter->writeAttribute('val', $element->getFont()->getName()); |
138 | 138 | $objWriter->endElement(); |
139 | 139 | |
140 | 140 | // Bold |
141 | - $objWriter->startElement($prefix . 'b'); |
|
141 | + $objWriter->startElement($prefix.'b'); |
|
142 | 142 | $objWriter->writeAttribute('val', ($element->getFont()->getBold() ? 'true' : 'false')); |
143 | 143 | $objWriter->endElement(); |
144 | 144 | |
145 | 145 | // Italic |
146 | - $objWriter->startElement($prefix . 'i'); |
|
146 | + $objWriter->startElement($prefix.'i'); |
|
147 | 147 | $objWriter->writeAttribute('val', ($element->getFont()->getItalic() ? 'true' : 'false')); |
148 | 148 | $objWriter->endElement(); |
149 | 149 | |
150 | 150 | // Superscript / subscript |
151 | 151 | if ($element->getFont()->getSuperscript() || $element->getFont()->getSubscript()) { |
152 | - $objWriter->startElement($prefix . 'vertAlign'); |
|
152 | + $objWriter->startElement($prefix.'vertAlign'); |
|
153 | 153 | if ($element->getFont()->getSuperscript()) { |
154 | 154 | $objWriter->writeAttribute('val', 'superscript'); |
155 | 155 | } elseif ($element->getFont()->getSubscript()) { |
@@ -159,22 +159,22 @@ discard block |
||
159 | 159 | } |
160 | 160 | |
161 | 161 | // Strikethrough |
162 | - $objWriter->startElement($prefix . 'strike'); |
|
162 | + $objWriter->startElement($prefix.'strike'); |
|
163 | 163 | $objWriter->writeAttribute('val', ($element->getFont()->getStrikethrough() ? 'true' : 'false')); |
164 | 164 | $objWriter->endElement(); |
165 | 165 | |
166 | 166 | // Color |
167 | - $objWriter->startElement($prefix . 'color'); |
|
167 | + $objWriter->startElement($prefix.'color'); |
|
168 | 168 | $objWriter->writeAttribute('rgb', $element->getFont()->getColor()->getARGB()); |
169 | 169 | $objWriter->endElement(); |
170 | 170 | |
171 | 171 | // Size |
172 | - $objWriter->startElement($prefix . 'sz'); |
|
172 | + $objWriter->startElement($prefix.'sz'); |
|
173 | 173 | $objWriter->writeAttribute('val', $element->getFont()->getSize()); |
174 | 174 | $objWriter->endElement(); |
175 | 175 | |
176 | 176 | // Underline |
177 | - $objWriter->startElement($prefix . 'u'); |
|
177 | + $objWriter->startElement($prefix.'u'); |
|
178 | 178 | $objWriter->writeAttribute('val', $element->getFont()->getUnderline()); |
179 | 179 | $objWriter->endElement(); |
180 | 180 | |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | } |
183 | 183 | |
184 | 184 | // t |
185 | - $objWriter->startElement($prefix . 't'); |
|
185 | + $objWriter->startElement($prefix.'t'); |
|
186 | 186 | $objWriter->writeAttribute('xml:space', 'preserve'); |
187 | 187 | $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($element->getText())); |
188 | 188 | $objWriter->endElement(); |
@@ -214,10 +214,10 @@ discard block |
||
214 | 214 | $elements = $pRichText->getRichTextElements(); |
215 | 215 | foreach ($elements as $element) { |
216 | 216 | // r |
217 | - $objWriter->startElement($prefix . 'r'); |
|
217 | + $objWriter->startElement($prefix.'r'); |
|
218 | 218 | |
219 | 219 | // rPr |
220 | - $objWriter->startElement($prefix . 'rPr'); |
|
220 | + $objWriter->startElement($prefix.'rPr'); |
|
221 | 221 | |
222 | 222 | // Bold |
223 | 223 | $objWriter->writeAttribute('b', ($element->getFont()->getBold() ? 1 : 0)); |
@@ -240,14 +240,14 @@ discard block |
||
240 | 240 | $objWriter->writeAttribute('strike', ($element->getFont()->getStrikethrough() ? 'sngStrike' : 'noStrike')); |
241 | 241 | |
242 | 242 | // rFont |
243 | - $objWriter->startElement($prefix . 'latin'); |
|
243 | + $objWriter->startElement($prefix.'latin'); |
|
244 | 244 | $objWriter->writeAttribute('typeface', $element->getFont()->getName()); |
245 | 245 | $objWriter->endElement(); |
246 | 246 | |
247 | 247 | $objWriter->endElement(); |
248 | 248 | |
249 | 249 | // t |
250 | - $objWriter->startElement($prefix . 't'); |
|
250 | + $objWriter->startElement($prefix.'t'); |
|
251 | 251 | $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($element->getText())); |
252 | 252 | $objWriter->endElement(); |
253 | 253 |
@@ -834,7 +834,7 @@ |
||
834 | 834 | private function writeColourScheme($objWriter) |
835 | 835 | { |
836 | 836 | foreach (self::$colourScheme as $colourName => $colourValue) { |
837 | - $objWriter->startElement('a:' . $colourName); |
|
837 | + $objWriter->startElement('a:'.$colourName); |
|
838 | 838 | |
839 | 839 | $objWriter->startElement('a:srgbClr'); |
840 | 840 | $objWriter->writeAttribute('val', $colourValue); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $objWriter, |
142 | 142 | ($i + 1 + 3), |
143 | 143 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet', |
144 | - 'worksheets/sheet' . ($i + 1) . '.xml' |
|
144 | + 'worksheets/sheet'.($i + 1).'.xml' |
|
145 | 145 | ); |
146 | 146 | } |
147 | 147 | // Relationships for vbaProject if needed |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | } |
209 | 209 | |
210 | 210 | if (($pWorksheet->getDrawingCollection()->count() > 0) || (count($charts) > 0) || $drawingOriginalIds) { |
211 | - $relPath = '../drawings/drawing' . $pWorksheetId . '.xml'; |
|
211 | + $relPath = '../drawings/drawing'.$pWorksheetId.'.xml'; |
|
212 | 212 | $rId = ++$d; |
213 | 213 | |
214 | 214 | if (isset($drawingOriginalIds[$relPath])) { |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | if (!$hyperlink->isInternal()) { |
230 | 230 | $this->writeRelationship( |
231 | 231 | $objWriter, |
232 | - '_hyperlink_' . $i, |
|
232 | + '_hyperlink_'.$i, |
|
233 | 233 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink', |
234 | 234 | $hyperlink->getUrl(), |
235 | 235 | 'External' |
@@ -244,16 +244,16 @@ discard block |
||
244 | 244 | if (count($pWorksheet->getComments()) > 0) { |
245 | 245 | $this->writeRelationship( |
246 | 246 | $objWriter, |
247 | - '_comments_vml' . $i, |
|
247 | + '_comments_vml'.$i, |
|
248 | 248 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing', |
249 | - '../drawings/vmlDrawing' . $pWorksheetId . '.vml' |
|
249 | + '../drawings/vmlDrawing'.$pWorksheetId.'.vml' |
|
250 | 250 | ); |
251 | 251 | |
252 | 252 | $this->writeRelationship( |
253 | 253 | $objWriter, |
254 | - '_comments' . $i, |
|
254 | + '_comments'.$i, |
|
255 | 255 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments', |
256 | - '../comments' . $pWorksheetId . '.xml' |
|
256 | + '../comments'.$pWorksheetId.'.xml' |
|
257 | 257 | ); |
258 | 258 | } |
259 | 259 | |
@@ -262,9 +262,9 @@ discard block |
||
262 | 262 | if (count($pWorksheet->getHeaderFooter()->getImages()) > 0) { |
263 | 263 | $this->writeRelationship( |
264 | 264 | $objWriter, |
265 | - '_headerfooter_vml' . $i, |
|
265 | + '_headerfooter_vml'.$i, |
|
266 | 266 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing', |
267 | - '../drawings/vmlDrawingHF' . $pWorksheetId . '.vml' |
|
267 | + '../drawings/vmlDrawingHF'.$pWorksheetId.'.vml' |
|
268 | 268 | ); |
269 | 269 | } |
270 | 270 | |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | $objWriter, |
336 | 336 | $i, |
337 | 337 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', |
338 | - '../media/' . str_replace(' ', '', $drawing->getIndexedFilename()) |
|
338 | + '../media/'.str_replace(' ', '', $drawing->getIndexedFilename()) |
|
339 | 339 | ); |
340 | 340 | |
341 | 341 | $i = $this->writeDrawingHyperLink($objWriter, $drawing, $i); |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | $objWriter, |
355 | 355 | $i++, |
356 | 356 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart', |
357 | - '../charts/chart' . ++$chartRef . '.xml' |
|
357 | + '../charts/chart'.++$chartRef.'.xml' |
|
358 | 358 | ); |
359 | 359 | } |
360 | 360 | } |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | $objWriter, |
399 | 399 | $key, |
400 | 400 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', |
401 | - '../media/' . $value->getIndexedFilename() |
|
401 | + '../media/'.$value->getIndexedFilename() |
|
402 | 402 | ); |
403 | 403 | } |
404 | 404 | |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | if ($pType != '' && $pTarget != '') { |
424 | 424 | // Write relationship |
425 | 425 | $objWriter->startElement('Relationship'); |
426 | - $objWriter->writeAttribute('Id', 'rId' . $pId); |
|
426 | + $objWriter->writeAttribute('Id', 'rId'.$pId); |
|
427 | 427 | $objWriter->writeAttribute('Type', $pType); |
428 | 428 | $objWriter->writeAttribute('Target', $pTarget); |
429 | 429 |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $catIsMultiLevelSeries = $valIsMultiLevelSeries = false; |
234 | 234 | $plotGroupingType = ''; |
235 | 235 | foreach ($chartTypes as $chartType) { |
236 | - $objWriter->startElement('c:' . $chartType); |
|
236 | + $objWriter->startElement('c:'.$chartType); |
|
237 | 237 | |
238 | 238 | $groupCount = $plotArea->getPlotGroupCount(); |
239 | 239 | for ($i = 0; $i < $groupCount; ++$i) { |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | |
834 | 834 | if ($xAxis->getFillProperty('value') !== null) { |
835 | 835 | $objWriter->startElement('a:solidFill'); |
836 | - $objWriter->startElement('a:' . $xAxis->getFillProperty('type')); |
|
836 | + $objWriter->startElement('a:'.$xAxis->getFillProperty('type')); |
|
837 | 837 | $objWriter->writeAttribute('val', $xAxis->getFillProperty('value')); |
838 | 838 | $objWriter->startElement('a:alpha'); |
839 | 839 | $objWriter->writeAttribute('val', $xAxis->getFillProperty('alpha')); |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | |
851 | 851 | if ($xAxis->getLineProperty('value') !== null) { |
852 | 852 | $objWriter->startElement('a:solidFill'); |
853 | - $objWriter->startElement('a:' . $xAxis->getLineProperty('type')); |
|
853 | + $objWriter->startElement('a:'.$xAxis->getLineProperty('type')); |
|
854 | 854 | $objWriter->writeAttribute('val', $xAxis->getLineProperty('value')); |
855 | 855 | $objWriter->startElement('a:alpha'); |
856 | 856 | $objWriter->writeAttribute('val', $xAxis->getLineProperty('alpha')); |
@@ -1329,13 +1329,13 @@ discard block |
||
1329 | 1329 | |
1330 | 1330 | $objWriter->endElement(); |
1331 | 1331 | } else { |
1332 | - $objWriter->startElement('c:' . $dataType . 'Ref'); |
|
1332 | + $objWriter->startElement('c:'.$dataType.'Ref'); |
|
1333 | 1333 | |
1334 | 1334 | $objWriter->startElement('c:f'); |
1335 | 1335 | $objWriter->writeRawData($plotSeriesValues->getDataSource()); |
1336 | 1336 | $objWriter->endElement(); |
1337 | 1337 | |
1338 | - $objWriter->startElement('c:' . $dataType . 'Cache'); |
|
1338 | + $objWriter->startElement('c:'.$dataType.'Cache'); |
|
1339 | 1339 | |
1340 | 1340 | if (($groupType != DataSeries::TYPE_PIECHART) && ($groupType != DataSeries::TYPE_PIECHART_3D) && ($groupType != DataSeries::TYPE_DONUTCHART)) { |
1341 | 1341 | if (($plotSeriesValues->getFormatCode() !== null) && ($plotSeriesValues->getFormatCode() !== '')) { |
@@ -502,19 +502,19 @@ discard block |
||
502 | 502 | if ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT |
503 | 503 | && $conditional->getOperatorType() == Conditional::OPERATOR_CONTAINSTEXT |
504 | 504 | && $conditional->getText() !== null) { |
505 | - $objWriter->writeElement('formula', 'NOT(ISERROR(SEARCH("' . $conditional->getText() . '",' . $cellCoordinate . ')))'); |
|
505 | + $objWriter->writeElement('formula', 'NOT(ISERROR(SEARCH("'.$conditional->getText().'",'.$cellCoordinate.')))'); |
|
506 | 506 | } elseif ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT |
507 | 507 | && $conditional->getOperatorType() == Conditional::OPERATOR_BEGINSWITH |
508 | 508 | && $conditional->getText() !== null) { |
509 | - $objWriter->writeElement('formula', 'LEFT(' . $cellCoordinate . ',' . strlen($conditional->getText()) . ')="' . $conditional->getText() . '"'); |
|
509 | + $objWriter->writeElement('formula', 'LEFT('.$cellCoordinate.','.strlen($conditional->getText()).')="'.$conditional->getText().'"'); |
|
510 | 510 | } elseif ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT |
511 | 511 | && $conditional->getOperatorType() == Conditional::OPERATOR_ENDSWITH |
512 | 512 | && $conditional->getText() !== null) { |
513 | - $objWriter->writeElement('formula', 'RIGHT(' . $cellCoordinate . ',' . strlen($conditional->getText()) . ')="' . $conditional->getText() . '"'); |
|
513 | + $objWriter->writeElement('formula', 'RIGHT('.$cellCoordinate.','.strlen($conditional->getText()).')="'.$conditional->getText().'"'); |
|
514 | 514 | } elseif ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT |
515 | 515 | && $conditional->getOperatorType() == Conditional::OPERATOR_NOTCONTAINS |
516 | 516 | && $conditional->getText() !== null) { |
517 | - $objWriter->writeElement('formula', 'ISERROR(SEARCH("' . $conditional->getText() . '",' . $cellCoordinate . '))'); |
|
517 | + $objWriter->writeElement('formula', 'ISERROR(SEARCH("'.$conditional->getText().'",'.$cellCoordinate.'))'); |
|
518 | 518 | } elseif ($conditional->getConditionType() == Conditional::CONDITION_CELLIS |
519 | 519 | || $conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT |
520 | 520 | || $conditional->getConditionType() == Conditional::CONDITION_EXPRESSION) { |
@@ -524,10 +524,10 @@ discard block |
||
524 | 524 | } |
525 | 525 | } elseif ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSBLANKS) { |
526 | 526 | // formula copied from ms xlsx xml source file |
527 | - $objWriter->writeElement('formula', 'LEN(TRIM(' . $cellCoordinate . '))=0'); |
|
527 | + $objWriter->writeElement('formula', 'LEN(TRIM('.$cellCoordinate.'))=0'); |
|
528 | 528 | } elseif ($conditional->getConditionType() == Conditional::CONDITION_NOTCONTAINSBLANKS) { |
529 | 529 | // formula copied from ms xlsx xml source file |
530 | - $objWriter->writeElement('formula', 'LEN(TRIM(' . $cellCoordinate . '))>0'); |
|
530 | + $objWriter->writeElement('formula', 'LEN(TRIM('.$cellCoordinate.'))>0'); |
|
531 | 531 | } |
532 | 532 | |
533 | 533 | $objWriter->endElement(); |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | |
628 | 628 | $objWriter->writeAttribute('ref', $coordinate); |
629 | 629 | if (!$hyperlink->isInternal()) { |
630 | - $objWriter->writeAttribute('r:id', 'rId_hyperlink_' . $relationId); |
|
630 | + $objWriter->writeAttribute('r:id', 'rId_hyperlink_'.$relationId); |
|
631 | 631 | ++$relationId; |
632 | 632 | } else { |
633 | 633 | $objWriter->writeAttribute('location', str_replace('sheet://', '', $hyperlink->getUrl())); |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | foreach ($pSheet->getProtectedCells() as $protectedCell => $passwordHash) { |
662 | 662 | // protectedRange |
663 | 663 | $objWriter->startElement('protectedRange'); |
664 | - $objWriter->writeAttribute('name', 'p' . md5($protectedCell)); |
|
664 | + $objWriter->writeAttribute('name', 'p'.md5($protectedCell)); |
|
665 | 665 | $objWriter->writeAttribute('sqref', $protectedCell); |
666 | 666 | if (!empty($passwordHash)) { |
667 | 667 | $objWriter->writeAttribute('password', $passwordHash); |
@@ -992,7 +992,7 @@ discard block |
||
992 | 992 | // Start a new row |
993 | 993 | $objWriter->startElement('row'); |
994 | 994 | $objWriter->writeAttribute('r', $currentRow); |
995 | - $objWriter->writeAttribute('spans', '1:' . $colCount); |
|
995 | + $objWriter->writeAttribute('spans', '1:'.$colCount); |
|
996 | 996 | |
997 | 997 | // Row dimensions |
998 | 998 | if ($rowDimension->getRowHeight() >= 0) { |
@@ -1141,7 +1141,7 @@ discard block |
||
1141 | 1141 | // force point as decimal separator in case current locale uses comma |
1142 | 1142 | $cellValue = str_replace(',', '.', (string) $cellValue); |
1143 | 1143 | if (strpos($cellValue, '.') === false) { |
1144 | - $cellValue = $cellValue . '.0'; |
|
1144 | + $cellValue = $cellValue.'.0'; |
|
1145 | 1145 | } |
1146 | 1146 | } |
1147 | 1147 | $objWriter->writeElement('v', $cellValue); |
@@ -64,8 +64,8 @@ |
||
64 | 64 | $pdf->setPaper(strtolower($paperSize), $orientation); |
65 | 65 | |
66 | 66 | $pdf->loadHtml( |
67 | - $this->generateHTMLHeader(false) . |
|
68 | - $this->generateSheetData() . |
|
67 | + $this->generateHTMLHeader(false). |
|
68 | + $this->generateSheetData(). |
|
69 | 69 | $this->generateHTMLFooter() |
70 | 70 | ); |
71 | 71 | $pdf->render(); |
@@ -78,8 +78,8 @@ |
||
78 | 78 | // Set the appropriate font |
79 | 79 | $pdf->SetFont($this->getFont()); |
80 | 80 | $pdf->writeHTML( |
81 | - $this->generateHTMLHeader(false) . |
|
82 | - $this->generateSheetData() . |
|
81 | + $this->generateHTMLHeader(false). |
|
82 | + $this->generateSheetData(). |
|
83 | 83 | $this->generateHTMLFooter() |
84 | 84 | ); |
85 | 85 |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | // Try opening the ZIP file |
216 | 216 | if ($zip->open($pFilename, ZipArchive::OVERWRITE) !== true) { |
217 | 217 | if ($zip->open($pFilename, ZipArchive::CREATE) !== true) { |
218 | - throw new WriterException('Could not open ' . $pFilename . ' for writing.'); |
|
218 | + throw new WriterException('Could not open '.$pFilename.' for writing.'); |
|
219 | 219 | } |
220 | 220 | } |
221 | 221 | |
@@ -241,13 +241,13 @@ discard block |
||
241 | 241 | $tmpRibbonTarget = $this->spreadSheet->getRibbonXMLData('target'); |
242 | 242 | $zip->addFromString($tmpRibbonTarget, $this->spreadSheet->getRibbonXMLData('data')); |
243 | 243 | if ($this->spreadSheet->hasRibbonBinObjects()) { |
244 | - $tmpRootPath = dirname($tmpRibbonTarget) . '/'; |
|
244 | + $tmpRootPath = dirname($tmpRibbonTarget).'/'; |
|
245 | 245 | $ribbonBinObjects = $this->spreadSheet->getRibbonBinObjects('data'); //the files to write |
246 | 246 | foreach ($ribbonBinObjects as $aPath => $aContent) { |
247 | - $zip->addFromString($tmpRootPath . $aPath, $aContent); |
|
247 | + $zip->addFromString($tmpRootPath.$aPath, $aContent); |
|
248 | 248 | } |
249 | 249 | //the rels for files |
250 | - $zip->addFromString($tmpRootPath . '_rels/' . basename($tmpRibbonTarget) . '.rels', $this->getWriterPart('RelsRibbonObjects')->writeRibbonRelationships($this->spreadSheet)); |
|
250 | + $zip->addFromString($tmpRootPath.'_rels/'.basename($tmpRibbonTarget).'.rels', $this->getWriterPart('RelsRibbonObjects')->writeRibbonRelationships($this->spreadSheet)); |
|
251 | 251 | } |
252 | 252 | } |
253 | 253 | |
@@ -278,12 +278,12 @@ discard block |
||
278 | 278 | $chartCount = 0; |
279 | 279 | // Add worksheets |
280 | 280 | for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { |
281 | - $zip->addFromString('xl/worksheets/sheet' . ($i + 1) . '.xml', $this->getWriterPart('Worksheet')->writeWorksheet($this->spreadSheet->getSheet($i), $this->stringTable, $this->includeCharts)); |
|
281 | + $zip->addFromString('xl/worksheets/sheet'.($i + 1).'.xml', $this->getWriterPart('Worksheet')->writeWorksheet($this->spreadSheet->getSheet($i), $this->stringTable, $this->includeCharts)); |
|
282 | 282 | if ($this->includeCharts) { |
283 | 283 | $charts = $this->spreadSheet->getSheet($i)->getChartCollection(); |
284 | 284 | if (count($charts) > 0) { |
285 | 285 | foreach ($charts as $chart) { |
286 | - $zip->addFromString('xl/charts/chart' . ($chartCount + 1) . '.xml', $this->getWriterPart('Chart')->writeChart($chart, $this->preCalculateFormulas)); |
|
286 | + $zip->addFromString('xl/charts/chart'.($chartCount + 1).'.xml', $this->getWriterPart('Chart')->writeChart($chart, $this->preCalculateFormulas)); |
|
287 | 287 | ++$chartCount; |
288 | 288 | } |
289 | 289 | } |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | // Add worksheet relationships (drawings, ...) |
295 | 295 | for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { |
296 | 296 | // Add relationships |
297 | - $zip->addFromString('xl/worksheets/_rels/sheet' . ($i + 1) . '.xml.rels', $this->getWriterPart('Rels')->writeWorksheetRelationships($this->spreadSheet->getSheet($i), ($i + 1), $this->includeCharts)); |
|
297 | + $zip->addFromString('xl/worksheets/_rels/sheet'.($i + 1).'.xml.rels', $this->getWriterPart('Rels')->writeWorksheetRelationships($this->spreadSheet->getSheet($i), ($i + 1), $this->includeCharts)); |
|
298 | 298 | |
299 | 299 | // Add unparsedLoadedData |
300 | 300 | $sheetCodeName = $this->spreadSheet->getSheet($i)->getCodeName(); |
@@ -319,13 +319,13 @@ discard block |
||
319 | 319 | // Add drawing and image relationship parts |
320 | 320 | if (($drawingCount > 0) || ($chartCount > 0)) { |
321 | 321 | // Drawing relationships |
322 | - $zip->addFromString('xl/drawings/_rels/drawing' . ($i + 1) . '.xml.rels', $this->getWriterPart('Rels')->writeDrawingRelationships($this->spreadSheet->getSheet($i), $chartRef1, $this->includeCharts)); |
|
322 | + $zip->addFromString('xl/drawings/_rels/drawing'.($i + 1).'.xml.rels', $this->getWriterPart('Rels')->writeDrawingRelationships($this->spreadSheet->getSheet($i), $chartRef1, $this->includeCharts)); |
|
323 | 323 | |
324 | 324 | // Drawings |
325 | - $zip->addFromString('xl/drawings/drawing' . ($i + 1) . '.xml', $this->getWriterPart('Drawing')->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts)); |
|
325 | + $zip->addFromString('xl/drawings/drawing'.($i + 1).'.xml', $this->getWriterPart('Drawing')->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts)); |
|
326 | 326 | } elseif (isset($unparsedLoadedData['sheets'][$sheetCodeName]['drawingAlternateContents'])) { |
327 | 327 | // Drawings |
328 | - $zip->addFromString('xl/drawings/drawing' . ($i + 1) . '.xml', $this->getWriterPart('Drawing')->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts)); |
|
328 | + $zip->addFromString('xl/drawings/drawing'.($i + 1).'.xml', $this->getWriterPart('Drawing')->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts)); |
|
329 | 329 | } |
330 | 330 | |
331 | 331 | // Add unparsed drawings |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | $drawingFile = array_search($relId, $unparsedLoadedData['sheets'][$sheetCodeName]['drawingOriginalIds']); |
335 | 335 | if ($drawingFile !== false) { |
336 | 336 | $drawingFile = ltrim($drawingFile, '.'); |
337 | - $zip->addFromString('xl' . $drawingFile, $drawingXml); |
|
337 | + $zip->addFromString('xl'.$drawingFile, $drawingXml); |
|
338 | 338 | } |
339 | 339 | } |
340 | 340 | } |
@@ -342,10 +342,10 @@ discard block |
||
342 | 342 | // Add comment relationship parts |
343 | 343 | if (count($this->spreadSheet->getSheet($i)->getComments()) > 0) { |
344 | 344 | // VML Comments |
345 | - $zip->addFromString('xl/drawings/vmlDrawing' . ($i + 1) . '.vml', $this->getWriterPart('Comments')->writeVMLComments($this->spreadSheet->getSheet($i))); |
|
345 | + $zip->addFromString('xl/drawings/vmlDrawing'.($i + 1).'.vml', $this->getWriterPart('Comments')->writeVMLComments($this->spreadSheet->getSheet($i))); |
|
346 | 346 | |
347 | 347 | // Comments |
348 | - $zip->addFromString('xl/comments' . ($i + 1) . '.xml', $this->getWriterPart('Comments')->writeComments($this->spreadSheet->getSheet($i))); |
|
348 | + $zip->addFromString('xl/comments'.($i + 1).'.xml', $this->getWriterPart('Comments')->writeComments($this->spreadSheet->getSheet($i))); |
|
349 | 349 | } |
350 | 350 | |
351 | 351 | // Add unparsed relationship parts |
@@ -358,14 +358,14 @@ discard block |
||
358 | 358 | // Add header/footer relationship parts |
359 | 359 | if (count($this->spreadSheet->getSheet($i)->getHeaderFooter()->getImages()) > 0) { |
360 | 360 | // VML Drawings |
361 | - $zip->addFromString('xl/drawings/vmlDrawingHF' . ($i + 1) . '.vml', $this->getWriterPart('Drawing')->writeVMLHeaderFooterImages($this->spreadSheet->getSheet($i))); |
|
361 | + $zip->addFromString('xl/drawings/vmlDrawingHF'.($i + 1).'.vml', $this->getWriterPart('Drawing')->writeVMLHeaderFooterImages($this->spreadSheet->getSheet($i))); |
|
362 | 362 | |
363 | 363 | // VML Drawing relationships |
364 | - $zip->addFromString('xl/drawings/_rels/vmlDrawingHF' . ($i + 1) . '.vml.rels', $this->getWriterPart('Rels')->writeHeaderFooterDrawingRelationships($this->spreadSheet->getSheet($i))); |
|
364 | + $zip->addFromString('xl/drawings/_rels/vmlDrawingHF'.($i + 1).'.vml.rels', $this->getWriterPart('Rels')->writeHeaderFooterDrawingRelationships($this->spreadSheet->getSheet($i))); |
|
365 | 365 | |
366 | 366 | // Media |
367 | 367 | foreach ($this->spreadSheet->getSheet($i)->getHeaderFooter()->getImages() as $image) { |
368 | - $zip->addFromString('xl/media/' . $image->getIndexedFilename(), file_get_contents($image->getPath())); |
|
368 | + $zip->addFromString('xl/media/'.$image->getIndexedFilename(), file_get_contents($image->getPath())); |
|
369 | 369 | } |
370 | 370 | } |
371 | 371 | } |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | $imageContents = file_get_contents($imagePath); |
389 | 389 | } |
390 | 390 | |
391 | - $zip->addFromString('xl/media/' . str_replace(' ', '_', $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()), $imageContents); |
|
391 | + $zip->addFromString('xl/media/'.str_replace(' ', '_', $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()), $imageContents); |
|
392 | 392 | } elseif ($this->getDrawingHashTable()->getByIndex($i) instanceof MemoryDrawing) { |
393 | 393 | ob_start(); |
394 | 394 | call_user_func( |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | $imageContents = ob_get_contents(); |
399 | 399 | ob_end_clean(); |
400 | 400 | |
401 | - $zip->addFromString('xl/media/' . str_replace(' ', '_', $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()), $imageContents); |
|
401 | + $zip->addFromString('xl/media/'.str_replace(' ', '_', $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()), $imageContents); |
|
402 | 402 | } |
403 | 403 | } |
404 | 404 |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | // Style XF |
190 | 190 | $style = $cell->getXfIndex(); |
191 | 191 | if ($style !== null) { |
192 | - $objWriter->writeAttribute('table:style-name', self::CELL_STYLE_PREFIX . $style); |
|
192 | + $objWriter->writeAttribute('table:style-name', self::CELL_STYLE_PREFIX.$style); |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | switch ($cell->getDataType()) { |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | // don't do anything |
213 | 213 | } |
214 | 214 | } |
215 | - $objWriter->writeAttribute('table:formula', 'of:' . $cell->getValue()); |
|
215 | + $objWriter->writeAttribute('table:formula', 'of:'.$cell->getValue()); |
|
216 | 216 | if (is_numeric($formulaValue)) { |
217 | 217 | $objWriter->writeAttribute('office:value-type', 'float'); |
218 | 218 | } else { |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | { |
285 | 285 | foreach ($spreadsheet->getCellXfCollection() as $style) { |
286 | 286 | $writer->startElement('style:style'); |
287 | - $writer->writeAttribute('style:name', self::CELL_STYLE_PREFIX . $style->getIndex()); |
|
287 | + $writer->writeAttribute('style:name', self::CELL_STYLE_PREFIX.$style->getIndex()); |
|
288 | 288 | $writer->writeAttribute('style:family', 'table-cell'); |
289 | 289 | $writer->writeAttribute('style:parent-style-name', 'Default'); |
290 | 290 |