@@ -13,8 +13,8 @@ |
||
13 | 13 | ->disableOriginalConstructor() |
14 | 14 | ->getMock(); |
15 | 15 | $this->mockWorksheet->expects($this->any()) |
16 | - ->method('getHighestRow') |
|
17 | - ->will($this->returnValue(5)); |
|
16 | + ->method('getHighestRow') |
|
17 | + ->will($this->returnValue(5)); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 |
@@ -45,22 +45,22 @@ |
||
45 | 45 | ->disableOriginalConstructor() |
46 | 46 | ->getMock(); |
47 | 47 | $cache->expects($this->any()) |
48 | - ->method('getParent') |
|
49 | - ->will($this->returnValue($sheet)); |
|
48 | + ->method('getParent') |
|
49 | + ->will($this->returnValue($sheet)); |
|
50 | 50 | |
51 | 51 | $sheet->expects($this->once()) |
52 | - ->method('getStyle') |
|
53 | - ->will($this->returnSelf()); |
|
52 | + ->method('getStyle') |
|
53 | + ->will($this->returnSelf()); |
|
54 | 54 | $sheet->expects($this->once()) |
55 | - ->method('getNumberFormat') |
|
56 | - ->will($this->returnSelf()); |
|
55 | + ->method('getNumberFormat') |
|
56 | + ->will($this->returnSelf()); |
|
57 | 57 | $sheet->expects($this->once()) |
58 | - ->method('setFormatCode') |
|
59 | - ->with($format) |
|
60 | - ->will($this->returnSelf()); |
|
58 | + ->method('setFormatCode') |
|
59 | + ->with($format) |
|
60 | + ->will($this->returnSelf()); |
|
61 | 61 | $sheet->expects($this->any()) |
62 | - ->method('getCellCacheController') |
|
63 | - ->will($this->returnValue($cache)); |
|
62 | + ->method('getCellCacheController') |
|
63 | + ->will($this->returnValue($cache)); |
|
64 | 64 | |
65 | 65 | \PHPExcel\Shared\StringHelper::setCurrencyCode($currencyCode); |
66 | 66 | \PHPExcel\Shared\StringHelper::setDecimalSeparator($decimalSeparator); |
@@ -24,8 +24,8 @@ |
||
24 | 24 | ->getMock(); |
25 | 25 | // Configure the stub. |
26 | 26 | $this->cellStub->expects($this->any()) |
27 | - ->method('setValueExplicit') |
|
28 | - ->will($this->returnValue(true)); |
|
27 | + ->method('setValueExplicit') |
|
28 | + ->will($this->returnValue(true)); |
|
29 | 29 | |
30 | 30 | } |
31 | 31 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | public function testSample($sample) |
13 | 13 | { |
14 | 14 | // Suppress output to console |
15 | - $this->setOutputCallback(function () { |
|
15 | + $this->setOutputCallback(function() { |
|
16 | 16 | }); |
17 | 17 | |
18 | 18 | require $sample; |
@@ -96,7 +96,7 @@ |
||
96 | 96 | // Merge cells |
97 | 97 | $helper->log('Merge cells'); |
98 | 98 | $spreadsheet->getActiveSheet()->mergeCells('A18:E22'); |
99 | -$spreadsheet->getActiveSheet()->mergeCells('A28:B28'); // Just to test... |
|
99 | +$spreadsheet->getActiveSheet()->mergeCells('A28:B28'); // Just to test... |
|
100 | 100 | $spreadsheet->getActiveSheet()->unmergeCells('A28:B28'); // Just to test... |
101 | 101 | // Protect cells |
102 | 102 | $helper->log('Protect cells'); |
@@ -60,6 +60,9 @@ discard block |
||
60 | 60 | |
61 | 61 | private static $plotMark = 0; |
62 | 62 | |
63 | + /** |
|
64 | + * @param string $markerID |
|
65 | + */ |
|
63 | 66 | private function formatPointMarker($seriesPlot, $markerID) |
64 | 67 | { |
65 | 68 | $plotMarkKeys = array_keys(self::$markSet); |
@@ -87,6 +90,9 @@ discard block |
||
87 | 90 | return $seriesPlot; |
88 | 91 | } |
89 | 92 | |
93 | + /** |
|
94 | + * @param integer $labelCount |
|
95 | + */ |
|
90 | 96 | private function formatDataSetLabels($groupID, $datasetLabels, $labelCount, $rotation = '') |
91 | 97 | { |
92 | 98 | $datasetLabelFormatCode = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getFormatCode(); |
@@ -116,6 +122,9 @@ discard block |
||
116 | 122 | return $datasetLabels; |
117 | 123 | } |
118 | 124 | |
125 | + /** |
|
126 | + * @param integer $seriesCount |
|
127 | + */ |
|
119 | 128 | private function percentageSumCalculation($groupID, $seriesCount) |
120 | 129 | { |
121 | 130 | // Adjust our values to a percentage value across all series in the group |
@@ -146,6 +155,9 @@ discard block |
||
146 | 155 | return $dataValues; |
147 | 156 | } |
148 | 157 | |
158 | + /** |
|
159 | + * @param \PhpOffice\PhpSpreadsheet\Chart\Title $captionElement |
|
160 | + */ |
|
149 | 161 | private function getCaption($captionElement) |
150 | 162 | { |
151 | 163 | // Read any caption |
@@ -253,6 +265,9 @@ discard block |
||
253 | 265 | $this->renderTitle(); |
254 | 266 | } |
255 | 267 | |
268 | + /** |
|
269 | + * @param integer $groupID |
|
270 | + */ |
|
256 | 271 | private function renderPlotLine($groupID, $filled = false, $combination = false, $dimensions = '2d') |
257 | 272 | { |
258 | 273 | $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); |
@@ -316,6 +331,9 @@ discard block |
||
316 | 331 | $this->graph->Add($groupPlot); |
317 | 332 | } |
318 | 333 | |
334 | + /** |
|
335 | + * @param integer $groupID |
|
336 | + */ |
|
319 | 337 | private function renderPlotBar($groupID, $dimensions = '2d') |
320 | 338 | { |
321 | 339 | $rotation = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotDirection(); |
@@ -400,6 +418,10 @@ discard block |
||
400 | 418 | $this->graph->Add($groupPlot); |
401 | 419 | } |
402 | 420 | |
421 | + /** |
|
422 | + * @param integer $groupID |
|
423 | + * @param boolean $bubble |
|
424 | + */ |
|
403 | 425 | private function renderPlotScatter($groupID, $bubble) |
404 | 426 | { |
405 | 427 | $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); |
@@ -445,6 +467,9 @@ discard block |
||
445 | 467 | } |
446 | 468 | } |
447 | 469 | |
470 | + /** |
|
471 | + * @param integer $groupID |
|
472 | + */ |
|
448 | 473 | private function renderPlotRadar($groupID) |
449 | 474 | { |
450 | 475 | $radarStyle = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); |
@@ -483,6 +508,9 @@ discard block |
||
483 | 508 | } |
484 | 509 | } |
485 | 510 | |
511 | + /** |
|
512 | + * @param integer $groupID |
|
513 | + */ |
|
486 | 514 | private function renderPlotContour($groupID) |
487 | 515 | { |
488 | 516 | $contourStyle = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); |
@@ -503,6 +531,9 @@ discard block |
||
503 | 531 | $this->graph->Add($seriesPlot); |
504 | 532 | } |
505 | 533 | |
534 | + /** |
|
535 | + * @param integer $groupID |
|
536 | + */ |
|
506 | 537 | private function renderPlotStock($groupID) |
507 | 538 | { |
508 | 539 | $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); |
@@ -542,6 +573,9 @@ discard block |
||
542 | 573 | $this->graph->Add($seriesPlot); |
543 | 574 | } |
544 | 575 | |
576 | + /** |
|
577 | + * @param integer $groupCount |
|
578 | + */ |
|
545 | 579 | private function renderAreaChart($groupCount, $dimensions = '2d') |
546 | 580 | { |
547 | 581 | require_once \PhpOffice\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_line.php'; |
@@ -553,6 +587,9 @@ discard block |
||
553 | 587 | } |
554 | 588 | } |
555 | 589 | |
590 | + /** |
|
591 | + * @param integer $groupCount |
|
592 | + */ |
|
556 | 593 | private function renderLineChart($groupCount, $dimensions = '2d') |
557 | 594 | { |
558 | 595 | require_once \PhpOffice\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_line.php'; |
@@ -564,6 +601,9 @@ discard block |
||
564 | 601 | } |
565 | 602 | } |
566 | 603 | |
604 | + /** |
|
605 | + * @param integer $groupCount |
|
606 | + */ |
|
567 | 607 | private function renderBarChart($groupCount, $dimensions = '2d') |
568 | 608 | { |
569 | 609 | require_once \PhpOffice\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_bar.php'; |
@@ -575,6 +615,9 @@ discard block |
||
575 | 615 | } |
576 | 616 | } |
577 | 617 | |
618 | + /** |
|
619 | + * @param integer $groupCount |
|
620 | + */ |
|
578 | 621 | private function renderScatterChart($groupCount) |
579 | 622 | { |
580 | 623 | require_once \PhpOffice\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_scatter.php'; |
@@ -588,6 +631,9 @@ discard block |
||
588 | 631 | } |
589 | 632 | } |
590 | 633 | |
634 | + /** |
|
635 | + * @param integer $groupCount |
|
636 | + */ |
|
591 | 637 | private function renderBubbleChart($groupCount) |
592 | 638 | { |
593 | 639 | require_once \PhpOffice\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_scatter.php'; |
@@ -599,6 +645,9 @@ discard block |
||
599 | 645 | } |
600 | 646 | } |
601 | 647 | |
648 | + /** |
|
649 | + * @param integer $groupCount |
|
650 | + */ |
|
602 | 651 | private function renderPieChart($groupCount, $dimensions = '2d', $doughnut = false, $multiplePlots = false) |
603 | 652 | { |
604 | 653 | require_once \PhpOffice\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_pie.php'; |
@@ -675,6 +724,9 @@ discard block |
||
675 | 724 | } |
676 | 725 | } |
677 | 726 | |
727 | + /** |
|
728 | + * @param integer $groupCount |
|
729 | + */ |
|
678 | 730 | private function renderRadarChart($groupCount) |
679 | 731 | { |
680 | 732 | require_once \PhpOffice\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_radar.php'; |
@@ -686,6 +738,9 @@ discard block |
||
686 | 738 | } |
687 | 739 | } |
688 | 740 | |
741 | + /** |
|
742 | + * @param integer $groupCount |
|
743 | + */ |
|
689 | 744 | private function renderStockChart($groupCount) |
690 | 745 | { |
691 | 746 | require_once \PhpOffice\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_stock.php'; |
@@ -697,6 +752,10 @@ discard block |
||
697 | 752 | } |
698 | 753 | } |
699 | 754 | |
755 | + /** |
|
756 | + * @param integer $groupCount |
|
757 | + * @param string|null $dimensions |
|
758 | + */ |
|
700 | 759 | private function renderContourChart($groupCount, $dimensions) |
701 | 760 | { |
702 | 761 | require_once \PhpOffice\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_contour.php'; |
@@ -708,6 +767,9 @@ discard block |
||
708 | 767 | } |
709 | 768 | } |
710 | 769 | |
770 | + /** |
|
771 | + * @param integer $groupCount |
|
772 | + */ |
|
711 | 773 | private function renderCombinationChart($groupCount, $dimensions, $outputDestination) |
712 | 774 | { |
713 | 775 | require_once \PhpOffice\PhpSpreadsheet\Settings::getChartRendererPath() . 'jpgraph_line.php'; |
@@ -202,6 +202,10 @@ |
||
202 | 202 | return array_pop($this->nestedColumn); |
203 | 203 | } |
204 | 204 | |
205 | + /** |
|
206 | + * @param \PhpOffice\PhpSpreadsheet\Worksheet $sheet |
|
207 | + * @param integer $row |
|
208 | + */ |
|
205 | 209 | protected function flushCell($sheet, $column, $row, &$cellContent) |
206 | 210 | { |
207 | 211 | if (is_string($cellContent)) { |
@@ -235,7 +235,7 @@ |
||
235 | 235 | * Calculate an (approximate) OpenXML column width, based on font size and text contained |
236 | 236 | * |
237 | 237 | * @param \PhpOffice\PhpSpreadsheet\Style\Font $font Font object |
238 | - * @param \PhpOffice\PhpSpreadsheet\RichText|string $cellText Text to calculate width |
|
238 | + * @param string $cellText Text to calculate width |
|
239 | 239 | * @param int $rotation Rotation angle |
240 | 240 | * @param \PhpOffice\PhpSpreadsheet\Style\Font|null $defaultFont Font object |
241 | 241 | * @return int Column width |
@@ -164,21 +164,21 @@ |
||
164 | 164 | $ret = str_pad($this->Name, 64, "\x00"); |
165 | 165 | |
166 | 166 | $ret .= pack('v', strlen($this->Name) + 2) // 66 |
167 | - . pack('c', $this->Type) // 67 |
|
168 | - . pack('c', 0x00) //UK // 68 |
|
169 | - . pack('V', $this->PrevPps) //Prev // 72 |
|
170 | - . pack('V', $this->NextPps) //Next // 76 |
|
171 | - . pack('V', $this->DirPps) //Dir // 80 |
|
172 | - . "\x00\x09\x02\x00" // 84 |
|
173 | - . "\x00\x00\x00\x00" // 88 |
|
174 | - . "\xc0\x00\x00\x00" // 92 |
|
175 | - . "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root |
|
176 | - . "\x00\x00\x00\x00" // 100 |
|
177 | - . \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st) // 108 |
|
178 | - . \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd) // 116 |
|
179 | - . pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120 |
|
180 | - . pack('V', $this->Size) // 124 |
|
181 | - . pack('V', 0); // 128 |
|
167 | + . pack('c', $this->Type) // 67 |
|
168 | + . pack('c', 0x00) //UK // 68 |
|
169 | + . pack('V', $this->PrevPps) //Prev // 72 |
|
170 | + . pack('V', $this->NextPps) //Next // 76 |
|
171 | + . pack('V', $this->DirPps) //Dir // 80 |
|
172 | + . "\x00\x09\x02\x00" // 84 |
|
173 | + . "\x00\x00\x00\x00" // 88 |
|
174 | + . "\xc0\x00\x00\x00" // 92 |
|
175 | + . "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root |
|
176 | + . "\x00\x00\x00\x00" // 100 |
|
177 | + . \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st) // 108 |
|
178 | + . \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd) // 116 |
|
179 | + . pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120 |
|
180 | + . pack('V', $this->Size) // 124 |
|
181 | + . pack('V', 0); // 128 |
|
182 | 182 | return $ret; |
183 | 183 | } |
184 | 184 |