@@ -62,6 +62,9 @@ discard block |
||
62 | 62 | private static $plotMark = 0; |
63 | 63 | |
64 | 64 | |
65 | + /** |
|
66 | + * @param string $markerID |
|
67 | + */ |
|
65 | 68 | private function formatPointMarker($seriesPlot, $markerID) |
66 | 69 | { |
67 | 70 | $plotMarkKeys = array_keys(self::$markSet); |
@@ -90,6 +93,9 @@ discard block |
||
90 | 93 | } |
91 | 94 | |
92 | 95 | |
96 | + /** |
|
97 | + * @param integer $labelCount |
|
98 | + */ |
|
93 | 99 | private function formatDataSetLabels($groupID, $datasetLabels, $labelCount, $rotation = '') |
94 | 100 | { |
95 | 101 | $datasetLabelFormatCode = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getFormatCode(); |
@@ -120,6 +126,9 @@ discard block |
||
120 | 126 | } |
121 | 127 | |
122 | 128 | |
129 | + /** |
|
130 | + * @param integer $seriesCount |
|
131 | + */ |
|
123 | 132 | private function percentageSumCalculation($groupID, $seriesCount) |
124 | 133 | { |
125 | 134 | // Adjust our values to a percentage value across all series in the group |
@@ -152,6 +161,9 @@ discard block |
||
152 | 161 | } |
153 | 162 | |
154 | 163 | |
164 | + /** |
|
165 | + * @param \PhpSpreadsheet\Chart\Title $captionElement |
|
166 | + */ |
|
155 | 167 | private function getCaption($captionElement) |
156 | 168 | { |
157 | 169 | // Read any caption |
@@ -264,6 +276,9 @@ discard block |
||
264 | 276 | } |
265 | 277 | |
266 | 278 | |
279 | + /** |
|
280 | + * @param integer $groupID |
|
281 | + */ |
|
267 | 282 | private function renderPlotLine($groupID, $filled = false, $combination = false, $dimensions = '2d') |
268 | 283 | { |
269 | 284 | $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); |
@@ -328,6 +343,9 @@ discard block |
||
328 | 343 | } |
329 | 344 | |
330 | 345 | |
346 | + /** |
|
347 | + * @param integer $groupID |
|
348 | + */ |
|
331 | 349 | private function renderPlotBar($groupID, $dimensions = '2d') |
332 | 350 | { |
333 | 351 | $rotation = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotDirection(); |
@@ -414,6 +432,10 @@ discard block |
||
414 | 432 | } |
415 | 433 | |
416 | 434 | |
435 | + /** |
|
436 | + * @param integer $groupID |
|
437 | + * @param boolean $bubble |
|
438 | + */ |
|
417 | 439 | private function renderPlotScatter($groupID, $bubble) |
418 | 440 | { |
419 | 441 | $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); |
@@ -460,6 +482,9 @@ discard block |
||
460 | 482 | } |
461 | 483 | |
462 | 484 | |
485 | + /** |
|
486 | + * @param integer $groupID |
|
487 | + */ |
|
463 | 488 | private function renderPlotRadar($groupID) |
464 | 489 | { |
465 | 490 | $radarStyle = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); |
@@ -499,6 +524,9 @@ discard block |
||
499 | 524 | } |
500 | 525 | |
501 | 526 | |
527 | + /** |
|
528 | + * @param integer $groupID |
|
529 | + */ |
|
502 | 530 | private function renderPlotContour($groupID) |
503 | 531 | { |
504 | 532 | $contourStyle = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); |
@@ -520,6 +548,9 @@ discard block |
||
520 | 548 | } |
521 | 549 | |
522 | 550 | |
551 | + /** |
|
552 | + * @param integer $groupID |
|
553 | + */ |
|
523 | 554 | private function renderPlotStock($groupID) |
524 | 555 | { |
525 | 556 | $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); |
@@ -560,6 +591,9 @@ discard block |
||
560 | 591 | } |
561 | 592 | |
562 | 593 | |
594 | + /** |
|
595 | + * @param integer $groupCount |
|
596 | + */ |
|
563 | 597 | private function renderAreaChart($groupCount, $dimensions = '2d') |
564 | 598 | { |
565 | 599 | require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_line.php'); |
@@ -572,6 +606,9 @@ discard block |
||
572 | 606 | } |
573 | 607 | |
574 | 608 | |
609 | + /** |
|
610 | + * @param integer $groupCount |
|
611 | + */ |
|
575 | 612 | private function renderLineChart($groupCount, $dimensions = '2d') |
576 | 613 | { |
577 | 614 | require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_line.php'); |
@@ -584,6 +621,9 @@ discard block |
||
584 | 621 | } |
585 | 622 | |
586 | 623 | |
624 | + /** |
|
625 | + * @param integer $groupCount |
|
626 | + */ |
|
587 | 627 | private function renderBarChart($groupCount, $dimensions = '2d') |
588 | 628 | { |
589 | 629 | require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_bar.php'); |
@@ -596,6 +636,9 @@ discard block |
||
596 | 636 | } |
597 | 637 | |
598 | 638 | |
639 | + /** |
|
640 | + * @param integer $groupCount |
|
641 | + */ |
|
599 | 642 | private function renderScatterChart($groupCount) |
600 | 643 | { |
601 | 644 | require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_scatter.php'); |
@@ -610,6 +653,9 @@ discard block |
||
610 | 653 | } |
611 | 654 | |
612 | 655 | |
656 | + /** |
|
657 | + * @param integer $groupCount |
|
658 | + */ |
|
613 | 659 | private function renderBubbleChart($groupCount) |
614 | 660 | { |
615 | 661 | require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_scatter.php'); |
@@ -622,6 +668,9 @@ discard block |
||
622 | 668 | } |
623 | 669 | |
624 | 670 | |
671 | + /** |
|
672 | + * @param integer $groupCount |
|
673 | + */ |
|
625 | 674 | private function renderPieChart($groupCount, $dimensions = '2d', $doughnut = false, $multiplePlots = false) |
626 | 675 | { |
627 | 676 | require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_pie.php'); |
@@ -699,6 +748,9 @@ discard block |
||
699 | 748 | } |
700 | 749 | |
701 | 750 | |
751 | + /** |
|
752 | + * @param integer $groupCount |
|
753 | + */ |
|
702 | 754 | private function renderRadarChart($groupCount) |
703 | 755 | { |
704 | 756 | require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_radar.php'); |
@@ -711,6 +763,9 @@ discard block |
||
711 | 763 | } |
712 | 764 | |
713 | 765 | |
766 | + /** |
|
767 | + * @param integer $groupCount |
|
768 | + */ |
|
714 | 769 | private function renderStockChart($groupCount) |
715 | 770 | { |
716 | 771 | require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_stock.php'); |
@@ -723,6 +778,10 @@ discard block |
||
723 | 778 | } |
724 | 779 | |
725 | 780 | |
781 | + /** |
|
782 | + * @param integer $groupCount |
|
783 | + * @param string|null $dimensions |
|
784 | + */ |
|
726 | 785 | private function renderContourChart($groupCount, $dimensions) |
727 | 786 | { |
728 | 787 | require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_contour.php'); |
@@ -735,6 +794,9 @@ discard block |
||
735 | 794 | } |
736 | 795 | |
737 | 796 | |
797 | + /** |
|
798 | + * @param integer $groupCount |
|
799 | + */ |
|
738 | 800 | private function renderCombinationChart($groupCount, $dimensions, $outputDestination) |
739 | 801 | { |
740 | 802 | require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_line.php'); |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace PhpSpreadsheet\Chart\Renderer; |
4 | 4 | |
5 | -require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'/jpgraph.php'); |
|
5 | +require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . '/jpgraph.php'); |
|
6 | 6 | |
7 | 7 | /** |
8 | 8 | * Copyright (c) 2006 - 2016 PhpSpreadsheet |
@@ -28,15 +28,15 @@ discard block |
||
28 | 28 | */ |
29 | 29 | class JpGraph |
30 | 30 | { |
31 | - private static $width = 640; |
|
31 | + private static $width = 640; |
|
32 | 32 | |
33 | 33 | private static $height = 480; |
34 | 34 | |
35 | 35 | private static $colourSet = [ |
36 | - 'mediumpurple1', 'palegreen3', 'gold1', 'cadetblue1', |
|
37 | - 'darkmagenta', 'coral', 'dodgerblue3', 'eggplant', |
|
38 | - 'mediumblue', 'magenta', 'sandybrown', 'cyan', |
|
39 | - 'firebrick1', 'forestgreen', 'deeppink4', 'darkolivegreen', |
|
36 | + 'mediumpurple1', 'palegreen3', 'gold1', 'cadetblue1', |
|
37 | + 'darkmagenta', 'coral', 'dodgerblue3', 'eggplant', |
|
38 | + 'mediumblue', 'magenta', 'sandybrown', 'cyan', |
|
39 | + 'firebrick1', 'forestgreen', 'deeppink4', 'darkolivegreen', |
|
40 | 40 | 'goldenrod2' |
41 | 41 | ]; |
42 | 42 | |
@@ -185,21 +185,21 @@ discard block |
||
185 | 185 | $legendOverlay = $legend->getOverlay(); |
186 | 186 | switch ($legendPosition) { |
187 | 187 | case 'r': |
188 | - $this->graph->legend->SetPos(0.01, 0.5, 'right', 'center'); // right |
|
188 | + $this->graph->legend->SetPos(0.01, 0.5, 'right', 'center'); // right |
|
189 | 189 | $this->graph->legend->SetColumns(1); |
190 | 190 | break; |
191 | 191 | case 'l': |
192 | - $this->graph->legend->SetPos(0.01, 0.5, 'left', 'center'); // left |
|
192 | + $this->graph->legend->SetPos(0.01, 0.5, 'left', 'center'); // left |
|
193 | 193 | $this->graph->legend->SetColumns(1); |
194 | 194 | break; |
195 | 195 | case 't': |
196 | - $this->graph->legend->SetPos(0.5, 0.01, 'center', 'top'); // top |
|
196 | + $this->graph->legend->SetPos(0.5, 0.01, 'center', 'top'); // top |
|
197 | 197 | break; |
198 | 198 | case 'b': |
199 | - $this->graph->legend->SetPos(0.5, 0.99, 'center', 'bottom'); // bottom |
|
199 | + $this->graph->legend->SetPos(0.5, 0.99, 'center', 'bottom'); // bottom |
|
200 | 200 | break; |
201 | 201 | default: |
202 | - $this->graph->legend->SetPos(0.01, 0.01, 'right', 'top'); // top-right |
|
202 | + $this->graph->legend->SetPos(0.01, 0.01, 'right', 'top'); // top-right |
|
203 | 203 | $this->graph->legend->SetColumns(1); |
204 | 204 | break; |
205 | 205 | } |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | |
563 | 563 | private function renderAreaChart($groupCount, $dimensions = '2d') |
564 | 564 | { |
565 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_line.php'); |
|
565 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_line.php'); |
|
566 | 566 | |
567 | 567 | $this->renderCartesianPlotArea(); |
568 | 568 | |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | |
575 | 575 | private function renderLineChart($groupCount, $dimensions = '2d') |
576 | 576 | { |
577 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_line.php'); |
|
577 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_line.php'); |
|
578 | 578 | |
579 | 579 | $this->renderCartesianPlotArea(); |
580 | 580 | |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | |
587 | 587 | private function renderBarChart($groupCount, $dimensions = '2d') |
588 | 588 | { |
589 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_bar.php'); |
|
589 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_bar.php'); |
|
590 | 590 | |
591 | 591 | $this->renderCartesianPlotArea(); |
592 | 592 | |
@@ -598,9 +598,9 @@ discard block |
||
598 | 598 | |
599 | 599 | private function renderScatterChart($groupCount) |
600 | 600 | { |
601 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_scatter.php'); |
|
602 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_regstat.php'); |
|
603 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_line.php'); |
|
601 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_scatter.php'); |
|
602 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_regstat.php'); |
|
603 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_line.php'); |
|
604 | 604 | |
605 | 605 | $this->renderCartesianPlotArea('linlin'); |
606 | 606 | |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | |
613 | 613 | private function renderBubbleChart($groupCount) |
614 | 614 | { |
615 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_scatter.php'); |
|
615 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_scatter.php'); |
|
616 | 616 | |
617 | 617 | $this->renderCartesianPlotArea('linlin'); |
618 | 618 | |
@@ -624,9 +624,9 @@ discard block |
||
624 | 624 | |
625 | 625 | private function renderPieChart($groupCount, $dimensions = '2d', $doughnut = false, $multiplePlots = false) |
626 | 626 | { |
627 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_pie.php'); |
|
627 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_pie.php'); |
|
628 | 628 | if ($dimensions == '3d') { |
629 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_pie3d.php'); |
|
629 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_pie3d.php'); |
|
630 | 630 | } |
631 | 631 | |
632 | 632 | $this->renderPiePlotArea($doughnut); |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | } |
673 | 673 | |
674 | 674 | if ($multiplePlots) { |
675 | - $seriesPlot->SetSize(($jLimit-$j) / ($jLimit * 4)); |
|
675 | + $seriesPlot->SetSize(($jLimit - $j) / ($jLimit * 4)); |
|
676 | 676 | } |
677 | 677 | |
678 | 678 | if ($doughnut) { |
@@ -701,7 +701,7 @@ discard block |
||
701 | 701 | |
702 | 702 | private function renderRadarChart($groupCount) |
703 | 703 | { |
704 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_radar.php'); |
|
704 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_radar.php'); |
|
705 | 705 | |
706 | 706 | $this->renderRadarPlotArea(); |
707 | 707 | |
@@ -713,7 +713,7 @@ discard block |
||
713 | 713 | |
714 | 714 | private function renderStockChart($groupCount) |
715 | 715 | { |
716 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_stock.php'); |
|
716 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_stock.php'); |
|
717 | 717 | |
718 | 718 | $this->renderCartesianPlotArea('intint'); |
719 | 719 | |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | |
726 | 726 | private function renderContourChart($groupCount, $dimensions) |
727 | 727 | { |
728 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_contour.php'); |
|
728 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_contour.php'); |
|
729 | 729 | |
730 | 730 | $this->renderCartesianPlotArea('intint'); |
731 | 731 | |
@@ -737,11 +737,11 @@ discard block |
||
737 | 737 | |
738 | 738 | private function renderCombinationChart($groupCount, $dimensions, $outputDestination) |
739 | 739 | { |
740 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_line.php'); |
|
741 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_bar.php'); |
|
742 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_scatter.php'); |
|
743 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_regstat.php'); |
|
744 | - require_once(\PhpSpreadsheet\Settings::getChartRendererPath().'jpgraph_line.php'); |
|
740 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_line.php'); |
|
741 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_bar.php'); |
|
742 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_scatter.php'); |
|
743 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_regstat.php'); |
|
744 | + require_once(\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_line.php'); |
|
745 | 745 | |
746 | 746 | $this->renderCartesianPlotArea(); |
747 | 747 | |
@@ -861,7 +861,7 @@ discard block |
||
861 | 861 | $this->renderStockChart($groupCount, $dimensions); |
862 | 862 | break; |
863 | 863 | default: |
864 | - echo $chartType.' is not yet implemented<br />'; |
|
864 | + echo $chartType . ' is not yet implemented<br />'; |
|
865 | 865 | return false; |
866 | 866 | } |
867 | 867 | $this->renderLegend(); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | /** |
178 | 178 | * Get Created |
179 | 179 | * |
180 | - * @return datetime |
|
180 | + * @return integer|null |
|
181 | 181 | */ |
182 | 182 | public function getCreated() |
183 | 183 | { |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | /** |
210 | 210 | * Get Modified |
211 | 211 | * |
212 | - * @return datetime |
|
212 | + * @return integer|null |
|
213 | 213 | */ |
214 | 214 | public function getModified() |
215 | 215 | { |
@@ -285,6 +285,11 @@ discard block |
||
285 | 285 | return isset($c->v) ? (string) $c->v : null; |
286 | 286 | } |
287 | 287 | |
288 | + /** |
|
289 | + * @param string $r |
|
290 | + * @param string $cellDataType |
|
291 | + * @param string $castBaseType |
|
292 | + */ |
|
288 | 293 | private function castToFormula($c, $r, &$cellDataType, &$value, &$calculatedValue, &$sharedFormulas, $castBaseType) |
289 | 294 | { |
290 | 295 | // echo 'Formula', PHP_EOL; |
@@ -327,6 +332,9 @@ discard block |
||
327 | 332 | } |
328 | 333 | |
329 | 334 | |
335 | + /** |
|
336 | + * @return string|null |
|
337 | + */ |
|
330 | 338 | private function getFromZipArchive($archive, $fileName = '') |
331 | 339 | { |
332 | 340 | // Root-relative paths |
@@ -356,7 +364,7 @@ discard block |
||
356 | 364 | * Loads Spreadsheet from file |
357 | 365 | * |
358 | 366 | * @param string $pFilename |
359 | - * @return Spreadsheet |
|
367 | + * @return \PhpSpreadsheet\Spreadsheet |
|
360 | 368 | * @throws Exception |
361 | 369 | */ |
362 | 370 | public function load($pFilename) |
@@ -1921,6 +1929,9 @@ discard block |
||
1921 | 1929 | return 'FF000000'; |
1922 | 1930 | } |
1923 | 1931 | |
1932 | + /** |
|
1933 | + * @param \PhpSpreadsheet\Style $docStyle |
|
1934 | + */ |
|
1924 | 1935 | private static function readStyle($docStyle, $style) |
1925 | 1936 | { |
1926 | 1937 | // format code |
@@ -2120,6 +2131,9 @@ discard block |
||
2120 | 2131 | return $value; |
2121 | 2132 | } |
2122 | 2133 | |
2134 | + /** |
|
2135 | + * @param \PhpSpreadsheet\Spreadsheet $excel |
|
2136 | + */ |
|
2123 | 2137 | private function readRibbon($excel, $customUITarget, $zip) |
2124 | 2138 | { |
2125 | 2139 | $baseDir = dirname($customUITarget); |
@@ -2172,6 +2186,9 @@ discard block |
||
2172 | 2186 | return preg_replace('~[^/]+/\.\./~', '', dirname($base) . "/$add"); |
2173 | 2187 | } |
2174 | 2188 | |
2189 | + /** |
|
2190 | + * @param string $style |
|
2191 | + */ |
|
2175 | 2192 | private static function toCSSArray($style) |
2176 | 2193 | { |
2177 | 2194 | $style = str_replace(array("\r","\n"), "", $style); |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | 'SimpleXMLElement', |
138 | 138 | \PhpSpreadsheet\Settings::getLibXmlLoaderOptions() |
139 | 139 | ) |
140 | - ); //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" |
|
140 | + ); //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" |
|
141 | 141 | |
142 | 142 | if ($xmlWorkbook->sheets) { |
143 | 143 | foreach ($xmlWorkbook->sheets->sheet as $eleSheet) { |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $xml = new \XMLReader(); |
225 | 225 | $res = $xml->xml( |
226 | 226 | $this->securityScanFile( |
227 | - 'zip://'.\PhpSpreadsheet\Shared\File::realpath($pFilename).'#'."$dir/$fileWorksheet" |
|
227 | + 'zip://' . \PhpSpreadsheet\Shared\File::realpath($pFilename) . '#' . "$dir/$fileWorksheet" |
|
228 | 228 | ), |
229 | 229 | null, |
230 | 230 | \PhpSpreadsheet\Settings::getLibXmlLoaderOptions() |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | } elseif ($value == '1') { |
269 | 269 | return true; |
270 | 270 | } else { |
271 | - return (bool)$c->v; |
|
271 | + return (bool) $c->v; |
|
272 | 272 | } |
273 | 273 | return $value; |
274 | 274 | } |
@@ -294,15 +294,15 @@ discard block |
||
294 | 294 | $calculatedValue = self::$castBaseType($c); |
295 | 295 | |
296 | 296 | // Shared formula? |
297 | - if (isset($c->f['t']) && strtolower((string)$c->f['t']) == 'shared') { |
|
297 | + if (isset($c->f['t']) && strtolower((string) $c->f['t']) == 'shared') { |
|
298 | 298 | // echo 'SHARED FORMULA', PHP_EOL; |
299 | - $instance = (string)$c->f['si']; |
|
299 | + $instance = (string) $c->f['si']; |
|
300 | 300 | |
301 | 301 | // echo 'Instance ID = ', $instance, PHP_EOL; |
302 | 302 | // |
303 | 303 | // echo 'Shared Formula Array:', PHP_EOL; |
304 | 304 | // print_r($sharedFormulas); |
305 | - if (!isset($sharedFormulas[(string)$c->f['si']])) { |
|
305 | + if (!isset($sharedFormulas[(string) $c->f['si']])) { |
|
306 | 306 | // echo 'SETTING NEW SHARED FORMULA', PHP_EOL; |
307 | 307 | // echo 'Master is ', $r, PHP_EOL; |
308 | 308 | // echo 'Formula is ', $value, PHP_EOL; |
@@ -400,10 +400,10 @@ discard block |
||
400 | 400 | if (is_object($xmlTheme)) { |
401 | 401 | $xmlThemeName = $xmlTheme->attributes(); |
402 | 402 | $xmlTheme = $xmlTheme->children("http://schemas.openxmlformats.org/drawingml/2006/main"); |
403 | - $themeName = (string)$xmlThemeName['name']; |
|
403 | + $themeName = (string) $xmlThemeName['name']; |
|
404 | 404 | |
405 | 405 | $colourScheme = $xmlTheme->themeElements->clrScheme->attributes(); |
406 | - $colourSchemeName = (string)$colourScheme['name']; |
|
406 | + $colourSchemeName = (string) $colourScheme['name']; |
|
407 | 407 | $colourScheme = $xmlTheme->themeElements->clrScheme->children("http://schemas.openxmlformats.org/drawingml/2006/main"); |
408 | 408 | |
409 | 409 | $themeColours = array(); |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | } |
545 | 545 | |
546 | 546 | if (!is_null($macros)) { |
547 | - $macrosCode = $this->getFromZipArchive($zip, 'xl/vbaProject.bin');//vbaProject.bin always in 'xl' dir and always named vbaProject.bin |
|
547 | + $macrosCode = $this->getFromZipArchive($zip, 'xl/vbaProject.bin'); //vbaProject.bin always in 'xl' dir and always named vbaProject.bin |
|
548 | 548 | if ($macrosCode !== false) { |
549 | 549 | $excel->setMacrosCode($macrosCode); |
550 | 550 | $excel->setHasMacros(true); |
@@ -587,9 +587,9 @@ discard block |
||
587 | 587 | // We shouldn't override any of the built-in MS Excel values (values below id 164) |
588 | 588 | // But there's a lot of naughty homebrew xlsx writers that do use "reserved" id values that aren't actually used |
589 | 589 | // So we make allowance for them rather than lose formatting masks |
590 | - if ((int)$xf["numFmtId"] < 164 && |
|
591 | - \PhpSpreadsheet\Style\NumberFormat::builtInFormatCode((int)$xf["numFmtId"]) !== '') { |
|
592 | - $numFmt = \PhpSpreadsheet\Style\NumberFormat::builtInFormatCode((int)$xf["numFmtId"]); |
|
590 | + if ((int) $xf["numFmtId"] < 164 && |
|
591 | + \PhpSpreadsheet\Style\NumberFormat::builtInFormatCode((int) $xf["numFmtId"]) !== '') { |
|
592 | + $numFmt = \PhpSpreadsheet\Style\NumberFormat::builtInFormatCode((int) $xf["numFmtId"]); |
|
593 | 593 | } |
594 | 594 | } |
595 | 595 | $quotePrefix = false; |
@@ -620,8 +620,8 @@ discard block |
||
620 | 620 | $tmpNumFmt = self::getArrayItem($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]")); |
621 | 621 | if (isset($tmpNumFmt["formatCode"])) { |
622 | 622 | $numFmt = (string) $tmpNumFmt["formatCode"]; |
623 | - } elseif ((int)$xf["numFmtId"] < 165) { |
|
624 | - $numFmt = \PhpSpreadsheet\Style\NumberFormat::builtInFormatCode((int)$xf["numFmtId"]); |
|
623 | + } elseif ((int) $xf["numFmtId"] < 165) { |
|
624 | + $numFmt = \PhpSpreadsheet\Style\NumberFormat::builtInFormatCode((int) $xf["numFmtId"]); |
|
625 | 625 | } |
626 | 626 | } |
627 | 627 | |
@@ -740,17 +740,17 @@ discard block |
||
740 | 740 | $docSheet->getSheetView()->setView((string) $xmlSheet->sheetViews->sheetView['view']); |
741 | 741 | } |
742 | 742 | if (isset($xmlSheet->sheetViews->sheetView['showGridLines'])) { |
743 | - $docSheet->setShowGridLines(self::boolean((string)$xmlSheet->sheetViews->sheetView['showGridLines'])); |
|
743 | + $docSheet->setShowGridLines(self::boolean((string) $xmlSheet->sheetViews->sheetView['showGridLines'])); |
|
744 | 744 | } |
745 | 745 | if (isset($xmlSheet->sheetViews->sheetView['showRowColHeaders'])) { |
746 | - $docSheet->setShowRowColHeaders(self::boolean((string)$xmlSheet->sheetViews->sheetView['showRowColHeaders'])); |
|
746 | + $docSheet->setShowRowColHeaders(self::boolean((string) $xmlSheet->sheetViews->sheetView['showRowColHeaders'])); |
|
747 | 747 | } |
748 | 748 | if (isset($xmlSheet->sheetViews->sheetView['rightToLeft'])) { |
749 | - $docSheet->setRightToLeft(self::boolean((string)$xmlSheet->sheetViews->sheetView['rightToLeft'])); |
|
749 | + $docSheet->setRightToLeft(self::boolean((string) $xmlSheet->sheetViews->sheetView['rightToLeft'])); |
|
750 | 750 | } |
751 | 751 | if (isset($xmlSheet->sheetViews->sheetView->pane)) { |
752 | 752 | if (isset($xmlSheet->sheetViews->sheetView->pane['topLeftCell'])) { |
753 | - $docSheet->freezePane((string)$xmlSheet->sheetViews->sheetView->pane['topLeftCell']); |
|
753 | + $docSheet->freezePane((string) $xmlSheet->sheetViews->sheetView->pane['topLeftCell']); |
|
754 | 754 | } else { |
755 | 755 | $xSplit = 0; |
756 | 756 | $ySplit = 0; |
@@ -769,7 +769,7 @@ discard block |
||
769 | 769 | |
770 | 770 | if (isset($xmlSheet->sheetViews->sheetView->selection)) { |
771 | 771 | if (isset($xmlSheet->sheetViews->sheetView->selection['sqref'])) { |
772 | - $sqref = (string)$xmlSheet->sheetViews->sheetView->selection['sqref']; |
|
772 | + $sqref = (string) $xmlSheet->sheetViews->sheetView->selection['sqref']; |
|
773 | 773 | $sqref = explode(' ', $sqref); |
774 | 774 | $sqref = $sqref[0]; |
775 | 775 | $docSheet->setSelectedCells($sqref); |
@@ -779,7 +779,7 @@ discard block |
||
779 | 779 | |
780 | 780 | if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr->tabColor)) { |
781 | 781 | if (isset($xmlSheet->sheetPr->tabColor['rgb'])) { |
782 | - $docSheet->getTabColor()->setARGB((string)$xmlSheet->sheetPr->tabColor['rgb']); |
|
782 | + $docSheet->getTabColor()->setARGB((string) $xmlSheet->sheetPr->tabColor['rgb']); |
|
783 | 783 | } |
784 | 784 | } |
785 | 785 | if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr['codeName'])) { |
@@ -814,13 +814,13 @@ discard block |
||
814 | 814 | if (isset($xmlSheet->sheetFormatPr['customHeight']) && |
815 | 815 | self::boolean((string) $xmlSheet->sheetFormatPr['customHeight']) && |
816 | 816 | isset($xmlSheet->sheetFormatPr['defaultRowHeight'])) { |
817 | - $docSheet->getDefaultRowDimension()->setRowHeight((float)$xmlSheet->sheetFormatPr['defaultRowHeight']); |
|
817 | + $docSheet->getDefaultRowDimension()->setRowHeight((float) $xmlSheet->sheetFormatPr['defaultRowHeight']); |
|
818 | 818 | } |
819 | 819 | if (isset($xmlSheet->sheetFormatPr['defaultColWidth'])) { |
820 | - $docSheet->getDefaultColumnDimension()->setWidth((float)$xmlSheet->sheetFormatPr['defaultColWidth']); |
|
820 | + $docSheet->getDefaultColumnDimension()->setWidth((float) $xmlSheet->sheetFormatPr['defaultColWidth']); |
|
821 | 821 | } |
822 | 822 | if (isset($xmlSheet->sheetFormatPr['zeroHeight']) && |
823 | - ((string)$xmlSheet->sheetFormatPr['zeroHeight'] == '1')) { |
|
823 | + ((string) $xmlSheet->sheetFormatPr['zeroHeight'] == '1')) { |
|
824 | 824 | $docSheet->getDefaultRowDimension()->setZeroHeight(true); |
825 | 825 | } |
826 | 826 | } |
@@ -887,10 +887,10 @@ discard block |
||
887 | 887 | } |
888 | 888 | |
889 | 889 | foreach ($row->c as $c) { |
890 | - $r = (string) $c["r"]; |
|
890 | + $r = (string) $c["r"]; |
|
891 | 891 | $cellDataType = (string) $c["t"]; |
892 | 892 | $value = null; |
893 | - $calculatedValue = null; |
|
893 | + $calculatedValue = null; |
|
894 | 894 | |
895 | 895 | // Read cell? |
896 | 896 | if ($this->getReadFilter() !== null) { |
@@ -910,7 +910,7 @@ discard block |
||
910 | 910 | switch ($cellDataType) { |
911 | 911 | case "s": |
912 | 912 | // echo 'String', PHP_EOL; |
913 | - if ((string)$c->v != '') { |
|
913 | + if ((string) $c->v != '') { |
|
914 | 914 | $value = $sharedStrings[intval($c->v)]; |
915 | 915 | |
916 | 916 | if ($value instanceof \PhpSpreadsheet\RichText) { |
@@ -970,12 +970,12 @@ discard block |
||
970 | 970 | |
971 | 971 | // Check for numeric values |
972 | 972 | if (is_numeric($value) && $cellDataType != 's') { |
973 | - if ($value == (int)$value) { |
|
974 | - $value = (int)$value; |
|
975 | - } elseif ($value == (float)$value) { |
|
976 | - $value = (float)$value; |
|
977 | - } elseif ($value == (double)$value) { |
|
978 | - $value = (double)$value; |
|
973 | + if ($value == (int) $value) { |
|
974 | + $value = (int) $value; |
|
975 | + } elseif ($value == (float) $value) { |
|
976 | + $value = (float) $value; |
|
977 | + } elseif ($value == (double) $value) { |
|
978 | + $value = (double) $value; |
|
979 | 979 | } |
980 | 980 | } |
981 | 981 | |
@@ -1009,7 +1009,7 @@ discard block |
||
1009 | 1009 | if (!$this->readDataOnly && $xmlSheet && $xmlSheet->conditionalFormatting) { |
1010 | 1010 | foreach ($xmlSheet->conditionalFormatting as $conditional) { |
1011 | 1011 | foreach ($conditional->cfRule as $cfRule) { |
1012 | - if (((string)$cfRule["type"] == \PhpSpreadsheet\Style\Conditional::CONDITION_NONE || (string)$cfRule["type"] == \PhpSpreadsheet\Style\Conditional::CONDITION_CELLIS || (string)$cfRule["type"] == \PhpSpreadsheet\Style\Conditional::CONDITION_CONTAINSTEXT || (string)$cfRule["type"] == \PhpSpreadsheet\Style\Conditional::CONDITION_EXPRESSION) && isset($dxfs[intval($cfRule["dxfId"])])) { |
|
1012 | + if (((string) $cfRule["type"] == \PhpSpreadsheet\Style\Conditional::CONDITION_NONE || (string) $cfRule["type"] == \PhpSpreadsheet\Style\Conditional::CONDITION_CELLIS || (string) $cfRule["type"] == \PhpSpreadsheet\Style\Conditional::CONDITION_CONTAINSTEXT || (string) $cfRule["type"] == \PhpSpreadsheet\Style\Conditional::CONDITION_EXPRESSION) && isset($dxfs[intval($cfRule["dxfId"])])) { |
|
1013 | 1013 | $conditionals[(string) $conditional["sqref"]][intval($cfRule["priority"])] = $cfRule; |
1014 | 1014 | } |
1015 | 1015 | } |
@@ -1020,19 +1020,19 @@ discard block |
||
1020 | 1020 | $conditionalStyles = array(); |
1021 | 1021 | foreach ($cfRules as $cfRule) { |
1022 | 1022 | $objConditional = new \PhpSpreadsheet\Style\Conditional(); |
1023 | - $objConditional->setConditionType((string)$cfRule["type"]); |
|
1024 | - $objConditional->setOperatorType((string)$cfRule["operator"]); |
|
1023 | + $objConditional->setConditionType((string) $cfRule["type"]); |
|
1024 | + $objConditional->setOperatorType((string) $cfRule["operator"]); |
|
1025 | 1025 | |
1026 | - if ((string)$cfRule["text"] != '') { |
|
1027 | - $objConditional->setText((string)$cfRule["text"]); |
|
1026 | + if ((string) $cfRule["text"] != '') { |
|
1027 | + $objConditional->setText((string) $cfRule["text"]); |
|
1028 | 1028 | } |
1029 | 1029 | |
1030 | 1030 | if (count($cfRule->formula) > 1) { |
1031 | 1031 | foreach ($cfRule->formula as $formula) { |
1032 | - $objConditional->addCondition((string)$formula); |
|
1032 | + $objConditional->addCondition((string) $formula); |
|
1033 | 1033 | } |
1034 | 1034 | } else { |
1035 | - $objConditional->addCondition((string)$cfRule->formula); |
|
1035 | + $objConditional->addCondition((string) $cfRule->formula); |
|
1036 | 1036 | } |
1037 | 1037 | $objConditional->setStyle(clone $dxfs[intval($cfRule["dxfId"])]); |
1038 | 1038 | $conditionalStyles[] = $objConditional; |
@@ -1210,25 +1210,25 @@ discard block |
||
1210 | 1210 | $docHeaderFooter = $docSheet->getHeaderFooter(); |
1211 | 1211 | |
1212 | 1212 | if (isset($xmlSheet->headerFooter["differentOddEven"]) && |
1213 | - self::boolean((string)$xmlSheet->headerFooter["differentOddEven"])) { |
|
1213 | + self::boolean((string) $xmlSheet->headerFooter["differentOddEven"])) { |
|
1214 | 1214 | $docHeaderFooter->setDifferentOddEven(true); |
1215 | 1215 | } else { |
1216 | 1216 | $docHeaderFooter->setDifferentOddEven(false); |
1217 | 1217 | } |
1218 | 1218 | if (isset($xmlSheet->headerFooter["differentFirst"]) && |
1219 | - self::boolean((string)$xmlSheet->headerFooter["differentFirst"])) { |
|
1219 | + self::boolean((string) $xmlSheet->headerFooter["differentFirst"])) { |
|
1220 | 1220 | $docHeaderFooter->setDifferentFirst(true); |
1221 | 1221 | } else { |
1222 | 1222 | $docHeaderFooter->setDifferentFirst(false); |
1223 | 1223 | } |
1224 | 1224 | if (isset($xmlSheet->headerFooter["scaleWithDoc"]) && |
1225 | - !self::boolean((string)$xmlSheet->headerFooter["scaleWithDoc"])) { |
|
1225 | + !self::boolean((string) $xmlSheet->headerFooter["scaleWithDoc"])) { |
|
1226 | 1226 | $docHeaderFooter->setScaleWithDocument(false); |
1227 | 1227 | } else { |
1228 | 1228 | $docHeaderFooter->setScaleWithDocument(true); |
1229 | 1229 | } |
1230 | 1230 | if (isset($xmlSheet->headerFooter["alignWithMargins"]) && |
1231 | - !self::boolean((string)$xmlSheet->headerFooter["alignWithMargins"])) { |
|
1231 | + !self::boolean((string) $xmlSheet->headerFooter["alignWithMargins"])) { |
|
1232 | 1232 | $docHeaderFooter->setAlignWithMargins(false); |
1233 | 1233 | } else { |
1234 | 1234 | $docHeaderFooter->setAlignWithMargins(true); |
@@ -1302,7 +1302,7 @@ discard block |
||
1302 | 1302 | ); |
1303 | 1303 | foreach ($relsWorksheet->Relationship as $ele) { |
1304 | 1304 | if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink") { |
1305 | - $hyperlinks[(string)$ele["Id"]] = (string)$ele["Target"]; |
|
1305 | + $hyperlinks[(string) $ele["Id"]] = (string) $ele["Target"]; |
|
1306 | 1306 | } |
1307 | 1307 | } |
1308 | 1308 | } |
@@ -1316,18 +1316,18 @@ discard block |
||
1316 | 1316 | foreach (\PhpSpreadsheet\Cell::extractAllCellReferencesInRange($hyperlink['ref']) as $cellReference) { |
1317 | 1317 | $cell = $docSheet->getCell($cellReference); |
1318 | 1318 | if (isset($linkRel['id'])) { |
1319 | - $hyperlinkUrl = $hyperlinks[ (string)$linkRel['id'] ]; |
|
1319 | + $hyperlinkUrl = $hyperlinks[(string) $linkRel['id']]; |
|
1320 | 1320 | if (isset($hyperlink['location'])) { |
1321 | 1321 | $hyperlinkUrl .= '#' . (string) $hyperlink['location']; |
1322 | 1322 | } |
1323 | 1323 | $cell->getHyperlink()->setUrl($hyperlinkUrl); |
1324 | 1324 | } elseif (isset($hyperlink['location'])) { |
1325 | - $cell->getHyperlink()->setUrl('sheet://' . (string)$hyperlink['location']); |
|
1325 | + $cell->getHyperlink()->setUrl('sheet://' . (string) $hyperlink['location']); |
|
1326 | 1326 | } |
1327 | 1327 | |
1328 | 1328 | // Tooltip |
1329 | 1329 | if (isset($hyperlink['tooltip'])) { |
1330 | - $cell->getHyperlink()->setTooltip((string)$hyperlink['tooltip']); |
|
1330 | + $cell->getHyperlink()->setTooltip((string) $hyperlink['tooltip']); |
|
1331 | 1331 | } |
1332 | 1332 | } |
1333 | 1333 | } |
@@ -1350,10 +1350,10 @@ discard block |
||
1350 | 1350 | ); |
1351 | 1351 | foreach ($relsWorksheet->Relationship as $ele) { |
1352 | 1352 | if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments") { |
1353 | - $comments[(string)$ele["Id"]] = (string)$ele["Target"]; |
|
1353 | + $comments[(string) $ele["Id"]] = (string) $ele["Target"]; |
|
1354 | 1354 | } |
1355 | 1355 | if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing") { |
1356 | - $vmlComments[(string)$ele["Id"]] = (string)$ele["Target"]; |
|
1356 | + $vmlComments[(string) $ele["Id"]] = (string) $ele["Target"]; |
|
1357 | 1357 | } |
1358 | 1358 | } |
1359 | 1359 | } |
@@ -1373,15 +1373,15 @@ discard block |
||
1373 | 1373 | |
1374 | 1374 | // Loop through authors |
1375 | 1375 | foreach ($commentsFile->authors->author as $author) { |
1376 | - $authors[] = (string)$author; |
|
1376 | + $authors[] = (string) $author; |
|
1377 | 1377 | } |
1378 | 1378 | |
1379 | 1379 | // Loop through contents |
1380 | 1380 | foreach ($commentsFile->commentList->comment as $comment) { |
1381 | 1381 | if (!empty($comment['authorId'])) { |
1382 | - $docSheet->getComment((string)$comment['ref'])->setAuthor($authors[(string)$comment['authorId']]); |
|
1382 | + $docSheet->getComment((string) $comment['ref'])->setAuthor($authors[(string) $comment['authorId']]); |
|
1383 | 1383 | } |
1384 | - $docSheet->getComment((string)$comment['ref'])->setText($this->parseRichText($comment->text)); |
|
1384 | + $docSheet->getComment((string) $comment['ref'])->setText($this->parseRichText($comment->text)); |
|
1385 | 1385 | } |
1386 | 1386 | } |
1387 | 1387 | |
@@ -1401,16 +1401,16 @@ discard block |
||
1401 | 1401 | $shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); |
1402 | 1402 | |
1403 | 1403 | if (isset($shape['style'])) { |
1404 | - $style = (string)$shape['style']; |
|
1405 | - $fillColor = strtoupper(substr((string)$shape['fillcolor'], 1)); |
|
1404 | + $style = (string) $shape['style']; |
|
1405 | + $fillColor = strtoupper(substr((string) $shape['fillcolor'], 1)); |
|
1406 | 1406 | $column = null; |
1407 | 1407 | $row = null; |
1408 | 1408 | |
1409 | 1409 | $clientData = $shape->xpath('.//x:ClientData'); |
1410 | 1410 | if (is_array($clientData) && !empty($clientData)) { |
1411 | - $clientData = $clientData[0]; |
|
1411 | + $clientData = $clientData[0]; |
|
1412 | 1412 | |
1413 | - if (isset($clientData['ObjectType']) && (string)$clientData['ObjectType'] == 'Note') { |
|
1413 | + if (isset($clientData['ObjectType']) && (string) $clientData['ObjectType'] == 'Note') { |
|
1414 | 1414 | $temp = $clientData->xpath('.//x:Row'); |
1415 | 1415 | if (is_array($temp)) { |
1416 | 1416 | $row = $temp[0]; |
@@ -1507,14 +1507,14 @@ discard block |
||
1507 | 1507 | $imageData = $imageData[$idx]; |
1508 | 1508 | |
1509 | 1509 | $imageData = $imageData->attributes('urn:schemas-microsoft-com:office:office'); |
1510 | - $style = self::toCSSArray((string)$shape['style']); |
|
1510 | + $style = self::toCSSArray((string) $shape['style']); |
|
1511 | 1511 | |
1512 | 1512 | $hfImages[(string) $shape['id']] = new \PhpSpreadsheet\Worksheet\HeaderFooterDrawing(); |
1513 | 1513 | if (isset($imageData['title'])) { |
1514 | - $hfImages[(string) $shape['id']]->setName((string)$imageData['title']); |
|
1514 | + $hfImages[(string) $shape['id']]->setName((string) $imageData['title']); |
|
1515 | 1515 | } |
1516 | 1516 | |
1517 | - $hfImages[(string) $shape['id']]->setPath("zip://".\PhpSpreadsheet\Shared_File::realpath($pFilename)."#" . $drawings[(string)$imageData['relid']], false); |
|
1517 | + $hfImages[(string) $shape['id']]->setPath("zip://" . \PhpSpreadsheet\Shared_File::realpath($pFilename) . "#" . $drawings[(string) $imageData['relid']], false); |
|
1518 | 1518 | $hfImages[(string) $shape['id']]->setResizeProportional(false); |
1519 | 1519 | $hfImages[(string) $shape['id']]->setWidth($style['width']); |
1520 | 1520 | $hfImages[(string) $shape['id']]->setHeight($style['height']); |
@@ -1590,7 +1590,7 @@ discard block |
||
1590 | 1590 | $objDrawing->setName((string) self::getArrayItem($oneCellAnchor->pic->nvPicPr->cNvPr->attributes(), "name")); |
1591 | 1591 | $objDrawing->setDescription((string) self::getArrayItem($oneCellAnchor->pic->nvPicPr->cNvPr->attributes(), "descr")); |
1592 | 1592 | $objDrawing->setPath( |
1593 | - "zip://".\PhpSpreadsheet\Shared\File::realpath($pFilename)."#" . |
|
1593 | + "zip://" . \PhpSpreadsheet\Shared\File::realpath($pFilename) . "#" . |
|
1594 | 1594 | $images[(string) self::getArrayItem( |
1595 | 1595 | $blip->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"), |
1596 | 1596 | "embed" |
@@ -1637,7 +1637,7 @@ discard block |
||
1637 | 1637 | $objDrawing->setName((string) self::getArrayItem($twoCellAnchor->pic->nvPicPr->cNvPr->attributes(), "name")); |
1638 | 1638 | $objDrawing->setDescription((string) self::getArrayItem($twoCellAnchor->pic->nvPicPr->cNvPr->attributes(), "descr")); |
1639 | 1639 | $objDrawing->setPath( |
1640 | - "zip://".\PhpSpreadsheet\Shared\File::realpath($pFilename)."#" . |
|
1640 | + "zip://" . \PhpSpreadsheet\Shared\File::realpath($pFilename) . "#" . |
|
1641 | 1641 | $images[(string) self::getArrayItem( |
1642 | 1642 | $blip->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"), |
1643 | 1643 | "embed" |
@@ -1676,7 +1676,7 @@ discard block |
||
1676 | 1676 | $chartRef = $graphic->graphicData->children("http://schemas.openxmlformats.org/drawingml/2006/chart")->chart; |
1677 | 1677 | $thisChart = (string) $chartRef->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"); |
1678 | 1678 | |
1679 | - $chartDetails[$docSheet->getTitle().'!'.$thisChart] = array( |
|
1679 | + $chartDetails[$docSheet->getTitle() . '!' . $thisChart] = array( |
|
1680 | 1680 | 'fromCoordinate' => $fromCoordinate, |
1681 | 1681 | 'fromOffsetX' => $fromOffsetX, |
1682 | 1682 | 'fromOffsetY' => $fromOffsetY, |
@@ -1696,25 +1696,25 @@ discard block |
||
1696 | 1696 | if ($xmlWorkbook->definedNames) { |
1697 | 1697 | foreach ($xmlWorkbook->definedNames->definedName as $definedName) { |
1698 | 1698 | // Extract range |
1699 | - $extractedRange = (string)$definedName; |
|
1699 | + $extractedRange = (string) $definedName; |
|
1700 | 1700 | $extractedRange = preg_replace('/\'(\w+)\'\!/', '', $extractedRange); |
1701 | 1701 | if (($spos = strpos($extractedRange, '!')) !== false) { |
1702 | - $extractedRange = substr($extractedRange, 0, $spos).str_replace('$', '', substr($extractedRange, $spos)); |
|
1702 | + $extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos)); |
|
1703 | 1703 | } else { |
1704 | 1704 | $extractedRange = str_replace('$', '', $extractedRange); |
1705 | 1705 | } |
1706 | 1706 | |
1707 | 1707 | // Valid range? |
1708 | - if (stripos((string)$definedName, '#REF!') !== false || $extractedRange == '') { |
|
1708 | + if (stripos((string) $definedName, '#REF!') !== false || $extractedRange == '') { |
|
1709 | 1709 | continue; |
1710 | 1710 | } |
1711 | 1711 | |
1712 | 1712 | // Some definedNames are only applicable if we are on the same sheet... |
1713 | - if ((string)$definedName['localSheetId'] != '' && (string)$definedName['localSheetId'] == $sheetId) { |
|
1713 | + if ((string) $definedName['localSheetId'] != '' && (string) $definedName['localSheetId'] == $sheetId) { |
|
1714 | 1714 | // Switch on type |
1715 | - switch ((string)$definedName['name']) { |
|
1715 | + switch ((string) $definedName['name']) { |
|
1716 | 1716 | case '_xlnm._FilterDatabase': |
1717 | - if ((string)$definedName['hidden'] !== '1') { |
|
1717 | + if ((string) $definedName['hidden'] !== '1') { |
|
1718 | 1718 | $extractedRange = explode(',', $extractedRange); |
1719 | 1719 | foreach ($extractedRange as $range) { |
1720 | 1720 | $autoFilterRange = $range; |
@@ -1743,10 +1743,10 @@ discard block |
||
1743 | 1743 | } |
1744 | 1744 | break; |
1745 | 1745 | case '_xlnm.Print_Area': |
1746 | - $rangeSets = explode(',', $extractedRange); // FIXME: what if sheetname contains comma? |
|
1746 | + $rangeSets = explode(',', $extractedRange); // FIXME: what if sheetname contains comma? |
|
1747 | 1747 | $newRangeSets = array(); |
1748 | 1748 | foreach ($rangeSets as $rangeSet) { |
1749 | - $range = explode('!', $rangeSet); // FIXME: what if sheetname contains exclamation mark? |
|
1749 | + $range = explode('!', $rangeSet); // FIXME: what if sheetname contains exclamation mark? |
|
1750 | 1750 | $rangeSet = isset($range[1]) ? $range[1] : $range[0]; |
1751 | 1751 | if (strpos($rangeSet, ':') === false) { |
1752 | 1752 | $rangeSet = $rangeSet . ':' . $rangeSet; |
@@ -1771,38 +1771,38 @@ discard block |
||
1771 | 1771 | if ($xmlWorkbook->definedNames) { |
1772 | 1772 | foreach ($xmlWorkbook->definedNames->definedName as $definedName) { |
1773 | 1773 | // Extract range |
1774 | - $extractedRange = (string)$definedName; |
|
1774 | + $extractedRange = (string) $definedName; |
|
1775 | 1775 | $extractedRange = preg_replace('/\'(\w+)\'\!/', '', $extractedRange); |
1776 | 1776 | if (($spos = strpos($extractedRange, '!')) !== false) { |
1777 | - $extractedRange = substr($extractedRange, 0, $spos).str_replace('$', '', substr($extractedRange, $spos)); |
|
1777 | + $extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos)); |
|
1778 | 1778 | } else { |
1779 | 1779 | $extractedRange = str_replace('$', '', $extractedRange); |
1780 | 1780 | } |
1781 | 1781 | |
1782 | 1782 | // Valid range? |
1783 | - if (stripos((string)$definedName, '#REF!') !== false || $extractedRange == '') { |
|
1783 | + if (stripos((string) $definedName, '#REF!') !== false || $extractedRange == '') { |
|
1784 | 1784 | continue; |
1785 | 1785 | } |
1786 | 1786 | |
1787 | 1787 | // Some definedNames are only applicable if we are on the same sheet... |
1788 | - if ((string)$definedName['localSheetId'] != '') { |
|
1788 | + if ((string) $definedName['localSheetId'] != '') { |
|
1789 | 1789 | // Local defined name |
1790 | 1790 | // Switch on type |
1791 | - switch ((string)$definedName['name']) { |
|
1791 | + switch ((string) $definedName['name']) { |
|
1792 | 1792 | case '_xlnm._FilterDatabase': |
1793 | 1793 | case '_xlnm.Print_Titles': |
1794 | 1794 | case '_xlnm.Print_Area': |
1795 | 1795 | break; |
1796 | 1796 | default: |
1797 | 1797 | if ($mapSheetId[(integer) $definedName['localSheetId']] !== null) { |
1798 | - $range = explode('!', (string)$definedName); |
|
1798 | + $range = explode('!', (string) $definedName); |
|
1799 | 1799 | if (count($range) == 2) { |
1800 | 1800 | $range[0] = str_replace("''", "'", $range[0]); |
1801 | 1801 | $range[0] = str_replace("'", "", $range[0]); |
1802 | 1802 | if ($worksheet = $docSheet->getParent()->getSheetByName($range[0])) { |
1803 | 1803 | $extractedRange = str_replace('$', '', $range[1]); |
1804 | 1804 | $scope = $docSheet->getParent()->getSheet($mapSheetId[(integer) $definedName['localSheetId']]); |
1805 | - $excel->addNamedRange(new \PhpSpreadsheet\NamedRange((string)$definedName['name'], $worksheet, $extractedRange, true, $scope)); |
|
1805 | + $excel->addNamedRange(new \PhpSpreadsheet\NamedRange((string) $definedName['name'], $worksheet, $extractedRange, true, $scope)); |
|
1806 | 1806 | } |
1807 | 1807 | } |
1808 | 1808 | } |
@@ -1812,9 +1812,9 @@ discard block |
||
1812 | 1812 | // "Global" definedNames |
1813 | 1813 | $locatedSheet = null; |
1814 | 1814 | $extractedSheetName = ''; |
1815 | - if (strpos((string)$definedName, '!') !== false) { |
|
1815 | + if (strpos((string) $definedName, '!') !== false) { |
|
1816 | 1816 | // Extract sheet name |
1817 | - $extractedSheetName = \PhpSpreadsheet\Worksheet::extractSheetTitle((string)$definedName, true); |
|
1817 | + $extractedSheetName = \PhpSpreadsheet\Worksheet::extractSheetTitle((string) $definedName, true); |
|
1818 | 1818 | $extractedSheetName = $extractedSheetName[0]; |
1819 | 1819 | |
1820 | 1820 | // Locate sheet |
@@ -1826,7 +1826,7 @@ discard block |
||
1826 | 1826 | } |
1827 | 1827 | |
1828 | 1828 | if ($locatedSheet !== null) { |
1829 | - $excel->addNamedRange(new \PhpSpreadsheet\NamedRange((string)$definedName['name'], $locatedSheet, $extractedRange, false)); |
|
1829 | + $excel->addNamedRange(new \PhpSpreadsheet\NamedRange((string) $definedName['name'], $locatedSheet, $extractedRange, false)); |
|
1830 | 1830 | } |
1831 | 1831 | } |
1832 | 1832 | } |
@@ -1877,7 +1877,7 @@ discard block |
||
1877 | 1877 | // var_dump($charts[$chartEntryRef]); |
1878 | 1878 | // |
1879 | 1879 | if (isset($charts[$chartEntryRef])) { |
1880 | - $chartPositionRef = $charts[$chartEntryRef]['sheet'].'!'.$charts[$chartEntryRef]['id']; |
|
1880 | + $chartPositionRef = $charts[$chartEntryRef]['sheet'] . '!' . $charts[$chartEntryRef]['id']; |
|
1881 | 1881 | // echo 'Position Ref ', $chartPositionRef, '<br />'; |
1882 | 1882 | if (isset($chartDetails[$chartPositionRef])) { |
1883 | 1883 | // var_dump($chartDetails[$chartPositionRef]); |
@@ -1901,17 +1901,17 @@ discard block |
||
1901 | 1901 | private static function readColor($color, $background = false) |
1902 | 1902 | { |
1903 | 1903 | if (isset($color["rgb"])) { |
1904 | - return (string)$color["rgb"]; |
|
1904 | + return (string) $color["rgb"]; |
|
1905 | 1905 | } elseif (isset($color["indexed"])) { |
1906 | - return \PhpSpreadsheet\Style\Color::indexedColor($color["indexed"]-7, $background)->getARGB(); |
|
1906 | + return \PhpSpreadsheet\Style\Color::indexedColor($color["indexed"] - 7, $background)->getARGB(); |
|
1907 | 1907 | } elseif (isset($color["theme"])) { |
1908 | 1908 | if (self::$theme !== null) { |
1909 | - $returnColour = self::$theme->getColourByIndex((int)$color["theme"]); |
|
1909 | + $returnColour = self::$theme->getColourByIndex((int) $color["theme"]); |
|
1910 | 1910 | if (isset($color["tint"])) { |
1911 | 1911 | $tintAdjust = (float) $color["tint"]; |
1912 | 1912 | $returnColour = \PhpSpreadsheet\Style\Color::changeBrightness($returnColour, $tintAdjust); |
1913 | 1913 | } |
1914 | - return 'FF'.$returnColour; |
|
1914 | + return 'FF' . $returnColour; |
|
1915 | 1915 | } |
1916 | 1916 | } |
1917 | 1917 | |
@@ -1950,11 +1950,11 @@ discard block |
||
1950 | 1950 | if (isset($style->font->u) && !isset($style->font->u["val"])) { |
1951 | 1951 | $docStyle->getFont()->setUnderline(\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLE); |
1952 | 1952 | } elseif (isset($style->font->u) && isset($style->font->u["val"])) { |
1953 | - $docStyle->getFont()->setUnderline((string)$style->font->u["val"]); |
|
1953 | + $docStyle->getFont()->setUnderline((string) $style->font->u["val"]); |
|
1954 | 1954 | } |
1955 | 1955 | |
1956 | 1956 | if (isset($style->font->vertAlign) && isset($style->font->vertAlign["val"])) { |
1957 | - $vertAlign = strtolower((string)$style->font->vertAlign["val"]); |
|
1957 | + $vertAlign = strtolower((string) $style->font->vertAlign["val"]); |
|
1958 | 1958 | if ($vertAlign == 'superscript') { |
1959 | 1959 | $docStyle->getFont()->setSuperScript(true); |
1960 | 1960 | } |
@@ -1976,7 +1976,7 @@ discard block |
||
1976 | 1976 | $docStyle->getFill()->getStartColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath("sml:stop[@position=0]"))->color)); |
1977 | 1977 | $docStyle->getFill()->getEndColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath("sml:stop[@position=1]"))->color)); |
1978 | 1978 | } elseif ($style->fill->patternFill) { |
1979 | - $patternType = (string)$style->fill->patternFill["patternType"] != '' ? (string)$style->fill->patternFill["patternType"] : 'solid'; |
|
1979 | + $patternType = (string) $style->fill->patternFill["patternType"] != '' ? (string) $style->fill->patternFill["patternType"] : 'solid'; |
|
1980 | 1980 | $docStyle->getFill()->setFillType($patternType); |
1981 | 1981 | if ($style->fill->patternFill->fgColor) { |
1982 | 1982 | $docStyle->getFill()->getStartColor()->setARGB(self::readColor($style->fill->patternFill->fgColor, true)); |
@@ -2015,17 +2015,17 @@ discard block |
||
2015 | 2015 | $docStyle->getAlignment()->setVertical((string) $style->alignment["vertical"]); |
2016 | 2016 | |
2017 | 2017 | $textRotation = 0; |
2018 | - if ((int)$style->alignment["textRotation"] <= 90) { |
|
2019 | - $textRotation = (int)$style->alignment["textRotation"]; |
|
2020 | - } elseif ((int)$style->alignment["textRotation"] > 90) { |
|
2021 | - $textRotation = 90 - (int)$style->alignment["textRotation"]; |
|
2018 | + if ((int) $style->alignment["textRotation"] <= 90) { |
|
2019 | + $textRotation = (int) $style->alignment["textRotation"]; |
|
2020 | + } elseif ((int) $style->alignment["textRotation"] > 90) { |
|
2021 | + $textRotation = 90 - (int) $style->alignment["textRotation"]; |
|
2022 | 2022 | } |
2023 | 2023 | |
2024 | 2024 | $docStyle->getAlignment()->setTextRotation(intval($textRotation)); |
2025 | 2025 | $docStyle->getAlignment()->setWrapText(self::boolean((string) $style->alignment["wrapText"])); |
2026 | 2026 | $docStyle->getAlignment()->setShrinkToFit(self::boolean((string) $style->alignment["shrinkToFit"])); |
2027 | - $docStyle->getAlignment()->setIndent(intval((string)$style->alignment["indent"]) > 0 ? intval((string)$style->alignment["indent"]) : 0); |
|
2028 | - $docStyle->getAlignment()->setReadorder(intval((string)$style->alignment["readingOrder"]) > 0 ? intval((string)$style->alignment["readingOrder"]) : 0); |
|
2027 | + $docStyle->getAlignment()->setIndent(intval((string) $style->alignment["indent"]) > 0 ? intval((string) $style->alignment["indent"]) : 0); |
|
2028 | + $docStyle->getAlignment()->setReadorder(intval((string) $style->alignment["readingOrder"]) > 0 ? intval((string) $style->alignment["readingOrder"]) : 0); |
|
2029 | 2029 | } |
2030 | 2030 | |
2031 | 2031 | // protection |
@@ -2095,7 +2095,7 @@ discard block |
||
2095 | 2095 | $objText->getFont()->setItalic(true); |
2096 | 2096 | } |
2097 | 2097 | if (isset($run->rPr->vertAlign) && isset($run->rPr->vertAlign["val"])) { |
2098 | - $vertAlign = strtolower((string)$run->rPr->vertAlign["val"]); |
|
2098 | + $vertAlign = strtolower((string) $run->rPr->vertAlign["val"]); |
|
2099 | 2099 | if ($vertAlign == 'superscript') { |
2100 | 2100 | $objText->getFont()->setSuperScript(true); |
2101 | 2101 | } |
@@ -2106,7 +2106,7 @@ discard block |
||
2106 | 2106 | if (isset($run->rPr->u) && !isset($run->rPr->u["val"])) { |
2107 | 2107 | $objText->getFont()->setUnderline(\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLE); |
2108 | 2108 | } elseif (isset($run->rPr->u) && isset($run->rPr->u["val"])) { |
2109 | - $objText->getFont()->setUnderline((string)$run->rPr->u["val"]); |
|
2109 | + $objText->getFont()->setUnderline((string) $run->rPr->u["val"]); |
|
2110 | 2110 | } |
2111 | 2111 | if ((isset($run->rPr->strike["val"]) && self::boolean((string) $run->rPr->strike["val"])) || |
2112 | 2112 | (isset($run->rPr->strike) && !isset($run->rPr->strike["val"]))) { |
@@ -2143,8 +2143,8 @@ discard block |
||
2143 | 2143 | foreach ($UIRels->Relationship as $ele) { |
2144 | 2144 | if ($ele["Type"] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image') { |
2145 | 2145 | // an image ? |
2146 | - $customUIImagesNames[(string) $ele['Id']] = (string)$ele['Target']; |
|
2147 | - $customUIImagesBinaries[(string)$ele['Target']] = $this->getFromZipArchive($zip, $baseDir . '/' . (string) $ele['Target']); |
|
2146 | + $customUIImagesNames[(string) $ele['Id']] = (string) $ele['Target']; |
|
2147 | + $customUIImagesBinaries[(string) $ele['Target']] = $this->getFromZipArchive($zip, $baseDir . '/' . (string) $ele['Target']); |
|
2148 | 2148 | } |
2149 | 2149 | } |
2150 | 2150 | } |
@@ -2174,7 +2174,7 @@ discard block |
||
2174 | 2174 | |
2175 | 2175 | private static function toCSSArray($style) |
2176 | 2176 | { |
2177 | - $style = str_replace(array("\r","\n"), "", $style); |
|
2177 | + $style = str_replace(array("\r", "\n"), "", $style); |
|
2178 | 2178 | |
2179 | 2179 | $temp = explode(';', $style); |
2180 | 2180 | $style = array(); |
@@ -26,6 +26,10 @@ discard block |
||
26 | 26 | */ |
27 | 27 | class Chart |
28 | 28 | { |
29 | + /** |
|
30 | + * @param string $name |
|
31 | + * @param string $format |
|
32 | + */ |
|
29 | 33 | private static function getAttribute($component, $name, $format) |
30 | 34 | { |
31 | 35 | $attributes = $component->attributes(); |
@@ -53,6 +57,10 @@ discard block |
||
53 | 57 | } |
54 | 58 | } |
55 | 59 | |
60 | + /** |
|
61 | + * @param \SimpleXMLElement $chartElements |
|
62 | + * @param string $chartName |
|
63 | + */ |
|
56 | 64 | public static function readChart($chartElements, $chartName) |
57 | 65 | { |
58 | 66 | $namespacesChartMeta = $chartElements->getNamespaces(true); |
@@ -195,6 +203,9 @@ discard block |
||
195 | 203 | return $chart; |
196 | 204 | } |
197 | 205 | |
206 | + /** |
|
207 | + * @param string $type |
|
208 | + */ |
|
198 | 209 | private static function chartTitle($titleDetails, $namespacesChartMeta, $type) |
199 | 210 | { |
200 | 211 | $caption = array(); |
@@ -481,6 +492,9 @@ discard block |
||
481 | 492 | return $plotAttributes; |
482 | 493 | } |
483 | 494 | |
495 | + /** |
|
496 | + * @param \PhpSpreadsheet\Chart\Layout $plotArea |
|
497 | + */ |
|
484 | 498 | private static function setChartAttributes($plotArea, $plotAttributes) |
485 | 499 | { |
486 | 500 | foreach ($plotAttributes as $plotAttributeKey => $plotAttributeValue) { |
@@ -47,9 +47,9 @@ |
||
47 | 47 | private static function readColor($color, $background = false) |
48 | 48 | { |
49 | 49 | if (isset($color["rgb"])) { |
50 | - return (string)$color["rgb"]; |
|
50 | + return (string) $color["rgb"]; |
|
51 | 51 | } elseif (isset($color["indexed"])) { |
52 | - return \PhpSpreadsheet\Style\Color::indexedColor($color["indexed"]-7, $background)->getARGB(); |
|
52 | + return \PhpSpreadsheet\Style\Color::indexedColor($color["indexed"] - 7, $background)->getARGB(); |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 |
@@ -163,6 +163,9 @@ discard block |
||
163 | 163 | return $worksheetInfo; |
164 | 164 | } |
165 | 165 | |
166 | + /** |
|
167 | + * @param string $filename |
|
168 | + */ |
|
166 | 169 | private function gzfileGetContents($filename) |
167 | 170 | { |
168 | 171 | $file = @gzopen($filename, 'rb'); |
@@ -180,7 +183,7 @@ discard block |
||
180 | 183 | * Loads PhpSpreadsheet from file |
181 | 184 | * |
182 | 185 | * @param string $pFilename |
183 | - * @return PhpSpreadsheet |
|
186 | + * @return \PhpSpreadsheet\Spreadsheet |
|
184 | 187 | * @throws Exception |
185 | 188 | */ |
186 | 189 | public function load($pFilename) |
@@ -197,7 +200,7 @@ discard block |
||
197 | 200 | * |
198 | 201 | * @param string $pFilename |
199 | 202 | * @param \PhpSpreadsheet\Spreadsheet $spreadsheet |
200 | - * @return PhpSpreadsheet |
|
203 | + * @return \PhpSpreadsheet\Spreadsheet |
|
201 | 204 | * @throws Exception |
202 | 205 | */ |
203 | 206 | public function loadIntoExisting($pFilename, \PhpSpreadsheet\Spreadsheet $spreadsheet) |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function __construct() |
49 | 49 | { |
50 | - $this->readFilter = new DefaultReadFilter(); |
|
50 | + $this->readFilter = new DefaultReadFilter(); |
|
51 | 51 | $this->referenceHelper = \PhpSpreadsheet\ReferenceHelper::getInstance(); |
52 | 52 | } |
53 | 53 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $data = fread($fh, 2); |
76 | 76 | fclose($fh); |
77 | 77 | |
78 | - if ($data != chr(0x1F).chr(0x8B)) { |
|
78 | + if ($data != chr(0x1F) . chr(0x8B)) { |
|
79 | 79 | return false; |
80 | 80 | } |
81 | 81 | |
@@ -96,13 +96,13 @@ discard block |
||
96 | 96 | } |
97 | 97 | |
98 | 98 | $xml = new XMLReader(); |
99 | - $xml->xml($this->securityScanFile('compress.zlib://'.realpath($pFilename)), null, \PhpSpreadsheet\Settings::getLibXmlLoaderOptions()); |
|
99 | + $xml->xml($this->securityScanFile('compress.zlib://' . realpath($pFilename)), null, \PhpSpreadsheet\Settings::getLibXmlLoaderOptions()); |
|
100 | 100 | $xml->setParserProperty(2, true); |
101 | 101 | |
102 | 102 | $worksheetNames = array(); |
103 | 103 | while ($xml->read()) { |
104 | 104 | if ($xml->name == 'gnm:SheetName' && $xml->nodeType == XMLReader::ELEMENT) { |
105 | - $xml->read(); // Move onto the value node |
|
105 | + $xml->read(); // Move onto the value node |
|
106 | 106 | $worksheetNames[] = (string) $xml->value; |
107 | 107 | } elseif ($xml->name == 'gnm:Sheets') { |
108 | 108 | // break out of the loop once we've got our sheet names rather than parse the entire file |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | } |
128 | 128 | |
129 | 129 | $xml = new XMLReader(); |
130 | - $xml->xml($this->securityScanFile('compress.zlib://'.realpath($pFilename)), null, \PhpSpreadsheet\Settings::getLibXmlLoaderOptions()); |
|
130 | + $xml->xml($this->securityScanFile('compress.zlib://' . realpath($pFilename)), null, \PhpSpreadsheet\Settings::getLibXmlLoaderOptions()); |
|
131 | 131 | $xml->setParserProperty(2, true); |
132 | 132 | |
133 | 133 | $worksheetInfo = array(); |
@@ -143,14 +143,14 @@ discard block |
||
143 | 143 | |
144 | 144 | while ($xml->read()) { |
145 | 145 | if ($xml->name == 'gnm:Name' && $xml->nodeType == XMLReader::ELEMENT) { |
146 | - $xml->read(); // Move onto the value node |
|
146 | + $xml->read(); // Move onto the value node |
|
147 | 147 | $tmpInfo['worksheetName'] = (string) $xml->value; |
148 | 148 | } elseif ($xml->name == 'gnm:MaxCol' && $xml->nodeType == XMLReader::ELEMENT) { |
149 | - $xml->read(); // Move onto the value node |
|
149 | + $xml->read(); // Move onto the value node |
|
150 | 150 | $tmpInfo['lastColumnIndex'] = (int) $xml->value; |
151 | 151 | $tmpInfo['totalColumns'] = (int) $xml->value + 1; |
152 | 152 | } elseif ($xml->name == 'gnm:MaxRow' && $xml->nodeType == XMLReader::ELEMENT) { |
153 | - $xml->read(); // Move onto the value node |
|
153 | + $xml->read(); // Move onto the value node |
|
154 | 154 | $tmpInfo['totalRows'] = (int) $xml->value + 1; |
155 | 155 | break; |
156 | 156 | } |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | if (isset($sheet->PrintInformation->Margins)) { |
349 | 349 | foreach ($sheet->PrintInformation->Margins->children('gnm', true) as $key => $margin) { |
350 | 350 | $marginAttributes = $margin->attributes(); |
351 | - $marginSize = 72 / 100; // Default |
|
351 | + $marginSize = 72 / 100; // Default |
|
352 | 352 | switch ($marginAttributes['PrefUnit']) { |
353 | 353 | case 'mm': |
354 | 354 | $marginSize = intval($marginAttributes['Points']) / 100; |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | break; |
435 | 435 | case '20': // Boolean |
436 | 436 | $type = \PhpSpreadsheet\Cell\DataType::TYPE_BOOL; |
437 | - $cell = ($cell == 'TRUE') ? true: false; |
|
437 | + $cell = ($cell == 'TRUE') ? true : false; |
|
438 | 438 | break; |
439 | 439 | case '30': // Integer |
440 | 440 | $cell = intval($cell); |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | case '80': // Array |
453 | 453 | } |
454 | 454 | } |
455 | - $spreadsheet->getActiveSheet()->getCell($column.$row)->setValueExplicit($cell, $type); |
|
455 | + $spreadsheet->getActiveSheet()->getCell($column . $row)->setValueExplicit($cell, $type); |
|
456 | 456 | } |
457 | 457 | |
458 | 458 | if ((!$this->readDataOnly) && (isset($sheet->Objects))) { |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | $commentAttributes = $comment->attributes(); |
461 | 461 | // Only comment objects are handled at the moment |
462 | 462 | if ($commentAttributes->Text) { |
463 | - $spreadsheet->getActiveSheet()->getComment((string)$commentAttributes->ObjectBound)->setAuthor((string)$commentAttributes->Author)->setText($this->parseRichText((string)$commentAttributes->Text)); |
|
463 | + $spreadsheet->getActiveSheet()->getComment((string) $commentAttributes->ObjectBound)->setAuthor((string) $commentAttributes->Author)->setText($this->parseRichText((string) $commentAttributes->Text)); |
|
464 | 464 | } |
465 | 465 | } |
466 | 466 | } |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | $endColumn = \PhpSpreadsheet\Cell::stringFromColumnIndex($endColumn); |
478 | 478 | $endRow = ($styleAttributes['endRow'] > $maxRow) ? $maxRow : $styleAttributes['endRow']; |
479 | 479 | $endRow += 1; |
480 | - $cellRange = $startColumn.$startRow.':'.$endColumn.$endRow; |
|
480 | + $cellRange = $startColumn . $startRow . ':' . $endColumn . $endRow; |
|
481 | 481 | // echo $cellRange,'<br />'; |
482 | 482 | |
483 | 483 | $styleAttributes = $styleRegion->Style->attributes(); |
@@ -677,19 +677,19 @@ discard block |
||
677 | 677 | if ((!$this->readDataOnly) && (isset($sheet->Cols))) { |
678 | 678 | // Column Widths |
679 | 679 | $columnAttributes = $sheet->Cols->attributes(); |
680 | - $defaultWidth = $columnAttributes['DefaultSizePts'] / 5.4; |
|
680 | + $defaultWidth = $columnAttributes['DefaultSizePts'] / 5.4; |
|
681 | 681 | $c = 0; |
682 | 682 | foreach ($sheet->Cols->ColInfo as $columnOverride) { |
683 | 683 | $columnAttributes = $columnOverride->attributes(); |
684 | 684 | $column = $columnAttributes['No']; |
685 | - $columnWidth = $columnAttributes['Unit'] / 5.4; |
|
685 | + $columnWidth = $columnAttributes['Unit'] / 5.4; |
|
686 | 686 | $hidden = ((isset($columnAttributes['Hidden'])) && ($columnAttributes['Hidden'] == '1')) ? true : false; |
687 | 687 | $columnCount = (isset($columnAttributes['Count'])) ? $columnAttributes['Count'] : 1; |
688 | 688 | while ($c < $column) { |
689 | 689 | $spreadsheet->getActiveSheet()->getColumnDimension(\PhpSpreadsheet\Cell::stringFromColumnIndex($c))->setWidth($defaultWidth); |
690 | 690 | ++$c; |
691 | 691 | } |
692 | - while (($c < ($column+$columnCount)) && ($c <= $maxCol)) { |
|
692 | + while (($c < ($column + $columnCount)) && ($c <= $maxCol)) { |
|
693 | 693 | $spreadsheet->getActiveSheet()->getColumnDimension(\PhpSpreadsheet\Cell::stringFromColumnIndex($c))->setWidth($columnWidth); |
694 | 694 | if ($hidden) { |
695 | 695 | $spreadsheet->getActiveSheet()->getColumnDimension(\PhpSpreadsheet\Cell::stringFromColumnIndex($c))->setVisible(false); |
@@ -719,7 +719,7 @@ discard block |
||
719 | 719 | ++$r; |
720 | 720 | $spreadsheet->getActiveSheet()->getRowDimension($r)->setRowHeight($defaultHeight); |
721 | 721 | } |
722 | - while (($r < ($row+$rowCount)) && ($r < $maxRow)) { |
|
722 | + while (($r < ($row + $rowCount)) && ($r < $maxRow)) { |
|
723 | 723 | ++$r; |
724 | 724 | $spreadsheet->getActiveSheet()->getRowDimension($r)->setRowHeight($rowHeight); |
725 | 725 | if ($hidden) { |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | * Loads PhpSpreadsheet from file |
136 | 136 | * |
137 | 137 | * @param string $pFilename |
138 | - * @return PhpSpreadsheet |
|
138 | + * @return \PhpSpreadsheet\Spreadsheet |
|
139 | 139 | * @throws Exception |
140 | 140 | */ |
141 | 141 | public function load($pFilename) |
@@ -217,6 +217,12 @@ discard block |
||
217 | 217 | $cellContent = (string) ''; |
218 | 218 | } |
219 | 219 | |
220 | + /** |
|
221 | + * @param \PhpSpreadsheet\Worksheet $sheet |
|
222 | + * @param integer $row |
|
223 | + * @param string $column |
|
224 | + * @param string $cellContent |
|
225 | + */ |
|
220 | 226 | protected function processDomElement(DOMNode $element, $sheet, &$row, &$column, &$cellContent, $format = null) |
221 | 227 | { |
222 | 228 | foreach ($element->childNodes as $child) { |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | * Calculate an (approximate) OpenXML column width, based on font size and text contained |
238 | 238 | * |
239 | 239 | * @param \PhpSpreadsheet\Style\Font $font Font object |
240 | - * @param \PhpSpreadsheet\RichText|string $cellText Text to calculate width |
|
240 | + * @param string $cellText Text to calculate width |
|
241 | 241 | * @param integer $rotation Rotation angle |
242 | 242 | * @param \PhpSpreadsheet\Style\Font|NULL $defaultFont Font object |
243 | 243 | * @return integer Column width |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | * Calculate an (approximate) pixel size, based on centimeter size |
407 | 407 | * |
408 | 408 | * @param int $sizeInCm Font size (in centimeters) |
409 | - * @return int Size (in pixels) |
|
409 | + * @return double Size (in pixels) |
|
410 | 410 | */ |
411 | 411 | public static function centimeterSizeToPixels($sizeInCm = 1) |
412 | 412 | { |
@@ -417,6 +417,7 @@ discard block |
||
417 | 417 | * Returns the font path given the font |
418 | 418 | * |
419 | 419 | * @param \PhpSpreadsheet\Style\Font |
420 | + * @param \PhpSpreadsheet\Style\Font $font |
|
420 | 421 | * @return string Path to TrueType font file |
421 | 422 | */ |
422 | 423 | public static function getTrueTypeFontFileFromFont($font) |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | const CHARSET_ANSI_JAPANESE_SHIFTJIS = 0x80; |
46 | 46 | const CHARSET_ANSI_KOREAN_HANGUL = 0x81; |
47 | 47 | const CHARSET_ANSI_KOREAN_JOHAB = 0x82; |
48 | - const CHARSET_ANSI_CHINESE_SIMIPLIFIED = 0x86; // gb2312 |
|
49 | - const CHARSET_ANSI_CHINESE_TRADITIONAL = 0x88; // big5 |
|
48 | + const CHARSET_ANSI_CHINESE_SIMIPLIFIED = 0x86; // gb2312 |
|
49 | + const CHARSET_ANSI_CHINESE_TRADITIONAL = 0x88; // big5 |
|
50 | 50 | const CHARSET_ANSI_GREEK = 0xA1; |
51 | 51 | const CHARSET_ANSI_TURKISH = 0xA2; |
52 | 52 | const CHARSET_ANSI_VIETNAMESE = 0xA3; |
@@ -511,7 +511,7 @@ discard block |
||
511 | 511 | ); |
512 | 512 | break; |
513 | 513 | default: |
514 | - throw new \PhpSpreadsheet\Exception('Unknown font name "'. $name .'". Cannot map to TrueType font file'); |
|
514 | + throw new \PhpSpreadsheet\Exception('Unknown font name "' . $name . '". Cannot map to TrueType font file'); |
|
515 | 515 | break; |
516 | 516 | } |
517 | 517 |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | /** |
137 | 137 | * The workbook has macros ? |
138 | 138 | * |
139 | - * @return true if workbook has macros, false if not |
|
139 | + * @return boolean if workbook has macros, false if not |
|
140 | 140 | */ |
141 | 141 | public function hasMacros() |
142 | 142 | { |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | /** |
178 | 178 | * Set the macros certificate |
179 | 179 | * |
180 | - * @param string|null $Certificate |
|
180 | + * @param string|null $certificate |
|
181 | 181 | */ |
182 | 182 | public function setMacrosCertificate($certificate = null) |
183 | 183 | { |
@@ -232,6 +232,7 @@ discard block |
||
232 | 232 | * retrieve ribbon XML Data |
233 | 233 | * |
234 | 234 | * return string|null|array |
235 | + * @return string |
|
235 | 236 | */ |
236 | 237 | public function getRibbonXMLData($what = 'all') //we need some constants here... |
237 | 238 | { |
@@ -307,7 +308,7 @@ discard block |
||
307 | 308 | /** |
308 | 309 | * This workbook have a custom UI ? |
309 | 310 | * |
310 | - * @return true|false |
|
311 | + * @return boolean |
|
311 | 312 | */ |
312 | 313 | public function hasRibbon() |
313 | 314 | { |
@@ -317,7 +318,7 @@ discard block |
||
317 | 318 | /** |
318 | 319 | * This workbook have additionnal object for the ribbon ? |
319 | 320 | * |
320 | - * @return true|false |
|
321 | + * @return boolean |
|
321 | 322 | */ |
322 | 323 | public function hasRibbonBinObjects() |
323 | 324 | { |
@@ -615,7 +616,7 @@ discard block |
||
615 | 616 | * Get index for sheet |
616 | 617 | * |
617 | 618 | * @param Worksheet $pSheet |
618 | - * @return Sheet index |
|
619 | + * @return integer index |
|
619 | 620 | * @throws Exception |
620 | 621 | */ |
621 | 622 | public function getIndex(Worksheet $pSheet) |
@@ -634,7 +635,7 @@ discard block |
||
634 | 635 | * |
635 | 636 | * @param string $sheetName Sheet name to modify index for |
636 | 637 | * @param int $newIndex New index for the sheet |
637 | - * @return New sheet index |
|
638 | + * @return integer sheet index |
|
638 | 639 | * @throws Exception |
639 | 640 | */ |
640 | 641 | public function setIndexByName($sheetName, $newIndex) |
@@ -776,7 +777,7 @@ discard block |
||
776 | 777 | * Add named range |
777 | 778 | * |
778 | 779 | * @param NamedRange $namedRange |
779 | - * @return PhpSpreadsheet |
|
780 | + * @return boolean |
|
780 | 781 | */ |
781 | 782 | public function addNamedRange(NamedRange $namedRange) |
782 | 783 | { |
@@ -821,7 +822,7 @@ discard block |
||
821 | 822 | * |
822 | 823 | * @param string $namedRange |
823 | 824 | * @param Worksheet|null $pSheet Scope: use null for global scope. |
824 | - * @return PhpSpreadsheet |
|
825 | + * @return Spreadsheet |
|
825 | 826 | */ |
826 | 827 | public function removeNamedRange($namedRange, Worksheet $pSheet = null) |
827 | 828 | { |
@@ -840,7 +841,7 @@ discard block |
||
840 | 841 | /** |
841 | 842 | * Get worksheet iterator |
842 | 843 | * |
843 | - * @return WorksheetIterator |
|
844 | + * @return Worksheet\Iterator |
|
844 | 845 | */ |
845 | 846 | public function getWorksheetIterator() |
846 | 847 | { |
@@ -850,7 +851,7 @@ discard block |
||
850 | 851 | /** |
851 | 852 | * Copy workbook (!= clone!) |
852 | 853 | * |
853 | - * @return PhpSpreadsheet |
|
854 | + * @return Spreadsheet |
|
854 | 855 | */ |
855 | 856 | public function copy() |
856 | 857 | { |
@@ -99,65 +99,65 @@ discard block |
||
99 | 99 | private $cellStyleXfCollection = array(); |
100 | 100 | |
101 | 101 | /** |
102 | - * hasMacros : this workbook have macros ? |
|
103 | - * |
|
104 | - * @var bool |
|
105 | - */ |
|
102 | + * hasMacros : this workbook have macros ? |
|
103 | + * |
|
104 | + * @var bool |
|
105 | + */ |
|
106 | 106 | private $hasMacros = false; |
107 | 107 | |
108 | 108 | /** |
109 | - * macrosCode : all macros code (the vbaProject.bin file, this include form, code, etc.), null if no macro |
|
110 | - * |
|
111 | - * @var binary |
|
112 | - */ |
|
109 | + * macrosCode : all macros code (the vbaProject.bin file, this include form, code, etc.), null if no macro |
|
110 | + * |
|
111 | + * @var binary |
|
112 | + */ |
|
113 | 113 | private $macrosCode; |
114 | 114 | /** |
115 | - * macrosCertificate : if macros are signed, contains vbaProjectSignature.bin file, null if not signed |
|
116 | - * |
|
117 | - * @var binary |
|
118 | - */ |
|
115 | + * macrosCertificate : if macros are signed, contains vbaProjectSignature.bin file, null if not signed |
|
116 | + * |
|
117 | + * @var binary |
|
118 | + */ |
|
119 | 119 | private $macrosCertificate; |
120 | 120 | |
121 | 121 | /** |
122 | - * ribbonXMLData : null if workbook is'nt Excel 2007 or not contain a customized UI |
|
123 | - * |
|
124 | - * @var null|string |
|
125 | - */ |
|
122 | + * ribbonXMLData : null if workbook is'nt Excel 2007 or not contain a customized UI |
|
123 | + * |
|
124 | + * @var null|string |
|
125 | + */ |
|
126 | 126 | private $ribbonXMLData; |
127 | 127 | |
128 | 128 | /** |
129 | - * ribbonBinObjects : null if workbook is'nt Excel 2007 or not contain embedded objects (picture(s)) for Ribbon Elements |
|
130 | - * ignored if $ribbonXMLData is null |
|
131 | - * |
|
132 | - * @var null|array |
|
133 | - */ |
|
129 | + * ribbonBinObjects : null if workbook is'nt Excel 2007 or not contain embedded objects (picture(s)) for Ribbon Elements |
|
130 | + * ignored if $ribbonXMLData is null |
|
131 | + * |
|
132 | + * @var null|array |
|
133 | + */ |
|
134 | 134 | private $ribbonBinObjects; |
135 | 135 | |
136 | 136 | /** |
137 | - * The workbook has macros ? |
|
138 | - * |
|
139 | - * @return true if workbook has macros, false if not |
|
140 | - */ |
|
137 | + * The workbook has macros ? |
|
138 | + * |
|
139 | + * @return true if workbook has macros, false if not |
|
140 | + */ |
|
141 | 141 | public function hasMacros() |
142 | 142 | { |
143 | 143 | return $this->hasMacros; |
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
147 | - * Define if a workbook has macros |
|
148 | - * |
|
149 | - * @param boolean $hasMacros true|false |
|
150 | - */ |
|
147 | + * Define if a workbook has macros |
|
148 | + * |
|
149 | + * @param boolean $hasMacros true|false |
|
150 | + */ |
|
151 | 151 | public function setHasMacros($hasMacros = false) |
152 | 152 | { |
153 | 153 | $this->hasMacros = (bool) $hasMacros; |
154 | 154 | } |
155 | 155 | |
156 | 156 | /** |
157 | - * Set the macros code |
|
158 | - * |
|
159 | - * @param string $macroCode string|null |
|
160 | - */ |
|
157 | + * Set the macros code |
|
158 | + * |
|
159 | + * @param string $macroCode string|null |
|
160 | + */ |
|
161 | 161 | public function setMacrosCode($macroCode = null) |
162 | 162 | { |
163 | 163 | $this->macrosCode = $macroCode; |
@@ -165,49 +165,49 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
168 | - * Return the macros code |
|
169 | - * |
|
170 | - * @return string|null |
|
171 | - */ |
|
168 | + * Return the macros code |
|
169 | + * |
|
170 | + * @return string|null |
|
171 | + */ |
|
172 | 172 | public function getMacrosCode() |
173 | 173 | { |
174 | 174 | return $this->macrosCode; |
175 | 175 | } |
176 | 176 | |
177 | 177 | /** |
178 | - * Set the macros certificate |
|
179 | - * |
|
180 | - * @param string|null $Certificate |
|
181 | - */ |
|
178 | + * Set the macros certificate |
|
179 | + * |
|
180 | + * @param string|null $Certificate |
|
181 | + */ |
|
182 | 182 | public function setMacrosCertificate($certificate = null) |
183 | 183 | { |
184 | 184 | $this->macrosCertificate = $certificate; |
185 | 185 | } |
186 | 186 | |
187 | 187 | /** |
188 | - * Is the project signed ? |
|
189 | - * |
|
190 | - * @return boolean true|false |
|
191 | - */ |
|
188 | + * Is the project signed ? |
|
189 | + * |
|
190 | + * @return boolean true|false |
|
191 | + */ |
|
192 | 192 | public function hasMacrosCertificate() |
193 | 193 | { |
194 | 194 | return !is_null($this->macrosCertificate); |
195 | 195 | } |
196 | 196 | |
197 | 197 | /** |
198 | - * Return the macros certificate |
|
199 | - * |
|
200 | - * @return string|null |
|
201 | - */ |
|
198 | + * Return the macros certificate |
|
199 | + * |
|
200 | + * @return string|null |
|
201 | + */ |
|
202 | 202 | public function getMacrosCertificate() |
203 | 203 | { |
204 | 204 | return $this->macrosCertificate; |
205 | 205 | } |
206 | 206 | |
207 | 207 | /** |
208 | - * Remove all macros, certificate from spreadsheet |
|
209 | - * |
|
210 | - */ |
|
208 | + * Remove all macros, certificate from spreadsheet |
|
209 | + * |
|
210 | + */ |
|
211 | 211 | public function discardMacros() |
212 | 212 | { |
213 | 213 | $this->hasMacros = false; |
@@ -216,9 +216,9 @@ discard block |
||
216 | 216 | } |
217 | 217 | |
218 | 218 | /** |
219 | - * set ribbon XML data |
|
220 | - * |
|
221 | - */ |
|
219 | + * set ribbon XML data |
|
220 | + * |
|
221 | + */ |
|
222 | 222 | public function setRibbonXMLData($target = null, $xmlData = null) |
223 | 223 | { |
224 | 224 | if (!is_null($target) && !is_null($xmlData)) { |
@@ -229,10 +229,10 @@ discard block |
||
229 | 229 | } |
230 | 230 | |
231 | 231 | /** |
232 | - * retrieve ribbon XML Data |
|
233 | - * |
|
234 | - * return string|null|array |
|
235 | - */ |
|
232 | + * retrieve ribbon XML Data |
|
233 | + * |
|
234 | + * return string|null|array |
|
235 | + */ |
|
236 | 236 | public function getRibbonXMLData($what = 'all') //we need some constants here... |
237 | 237 | { |
238 | 238 | $returnData = null; |
@@ -253,9 +253,9 @@ discard block |
||
253 | 253 | } |
254 | 254 | |
255 | 255 | /** |
256 | - * store binaries ribbon objects (pictures) |
|
257 | - * |
|
258 | - */ |
|
256 | + * store binaries ribbon objects (pictures) |
|
257 | + * |
|
258 | + */ |
|
259 | 259 | public function setRibbonBinObjects($BinObjectsNames = null, $BinObjectsData = null) |
260 | 260 | { |
261 | 261 | if (!is_null($BinObjectsNames) && !is_null($BinObjectsData)) { |
@@ -265,18 +265,18 @@ discard block |
||
265 | 265 | } |
266 | 266 | } |
267 | 267 | /** |
268 | - * return the extension of a filename. Internal use for a array_map callback (php<5.3 don't like lambda function) |
|
269 | - * |
|
270 | - */ |
|
268 | + * return the extension of a filename. Internal use for a array_map callback (php<5.3 don't like lambda function) |
|
269 | + * |
|
270 | + */ |
|
271 | 271 | private function getExtensionOnly($ThePath) |
272 | 272 | { |
273 | 273 | return pathinfo($ThePath, PATHINFO_EXTENSION); |
274 | 274 | } |
275 | 275 | |
276 | 276 | /** |
277 | - * retrieve Binaries Ribbon Objects |
|
278 | - * |
|
279 | - */ |
|
277 | + * retrieve Binaries Ribbon Objects |
|
278 | + * |
|
279 | + */ |
|
280 | 280 | public function getRibbonBinObjects($What = 'all') |
281 | 281 | { |
282 | 282 | $ReturnData = null; |
@@ -305,20 +305,20 @@ discard block |
||
305 | 305 | } |
306 | 306 | |
307 | 307 | /** |
308 | - * This workbook have a custom UI ? |
|
309 | - * |
|
310 | - * @return true|false |
|
311 | - */ |
|
308 | + * This workbook have a custom UI ? |
|
309 | + * |
|
310 | + * @return true|false |
|
311 | + */ |
|
312 | 312 | public function hasRibbon() |
313 | 313 | { |
314 | 314 | return !is_null($this->ribbonXMLData); |
315 | 315 | } |
316 | 316 | |
317 | 317 | /** |
318 | - * This workbook have additionnal object for the ribbon ? |
|
319 | - * |
|
320 | - * @return true|false |
|
321 | - */ |
|
318 | + * This workbook have additionnal object for the ribbon ? |
|
319 | + * |
|
320 | + * @return true|false |
|
321 | + */ |
|
322 | 322 | public function hasRibbonBinObjects() |
323 | 323 | { |
324 | 324 | return !is_null($this->ribbonBinObjects); |
@@ -353,9 +353,9 @@ discard block |
||
353 | 353 | return null; |
354 | 354 | } |
355 | 355 | |
356 | - /** |
|
357 | - * Create a new PhpSpreadsheet with one Worksheet |
|
358 | - */ |
|
356 | + /** |
|
357 | + * Create a new PhpSpreadsheet with one Worksheet |
|
358 | + */ |
|
359 | 359 | public function __construct() |
360 | 360 | { |
361 | 361 | $this->uniqueID = uniqid(); |
@@ -147,7 +147,7 @@ |
||
147 | 147 | /** |
148 | 148 | * Get parent. Only used for style supervisor |
149 | 149 | * |
150 | - * @return PhpSpreadsheet |
|
150 | + * @return Style |
|
151 | 151 | */ |
152 | 152 | public function getParent() |
153 | 153 | { |