Completed
Push — develop ( e0a9f9...ba7054 )
by Adrien
19:36
created
tests/PhpSpreadsheet/Cell/DefaultValueBinderTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/PhpSpreadsheet/Cell/AdvancedValueBinderTest.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -45,22 +45,22 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart/Renderer/JpGraph.php 2 patches
Doc Comments   +62 added lines patch added patch discarded remove patch
@@ -62,6 +62,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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');
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
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
 
@@ -178,21 +178,21 @@  discard block
 block discarded – undo
178 178
             $legendOverlay = $legend->getOverlay();
179 179
             switch ($legendPosition) {
180 180
                 case 'r':
181
-                    $this->graph->legend->SetPos(0.01, 0.5, 'right', 'center');    //    right
181
+                    $this->graph->legend->SetPos(0.01, 0.5, 'right', 'center'); //    right
182 182
                     $this->graph->legend->SetColumns(1);
183 183
                     break;
184 184
                 case 'l':
185
-                    $this->graph->legend->SetPos(0.01, 0.5, 'left', 'center');    //    left
185
+                    $this->graph->legend->SetPos(0.01, 0.5, 'left', 'center'); //    left
186 186
                     $this->graph->legend->SetColumns(1);
187 187
                     break;
188 188
                 case 't':
189
-                    $this->graph->legend->SetPos(0.5, 0.01, 'center', 'top');    //    top
189
+                    $this->graph->legend->SetPos(0.5, 0.01, 'center', 'top'); //    top
190 190
                     break;
191 191
                 case 'b':
192
-                    $this->graph->legend->SetPos(0.5, 0.99, 'center', 'bottom');    //    bottom
192
+                    $this->graph->legend->SetPos(0.5, 0.99, 'center', 'bottom'); //    bottom
193 193
                     break;
194 194
                 default:
195
-                    $this->graph->legend->SetPos(0.01, 0.01, 'right', 'top');    //    top-right
195
+                    $this->graph->legend->SetPos(0.01, 0.01, 'right', 'top'); //    top-right
196 196
                     $this->graph->legend->SetColumns(1);
197 197
                     break;
198 198
             }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Document/Properties.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
209 209
     /**
210 210
      * Get Modified
211 211
      *
212
-     * @return datetime
212
+     * @return integer|null
213 213
      */
214 214
     public function getModified()
215 215
     {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Excel2007.php 2 patches
Doc Comments   +18 added lines, -1 removed lines patch added patch discarded remove patch
@@ -285,6 +285,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                             'SimpleXMLElement',
137 137
                             \PhpSpreadsheet\Settings::getLibXmlLoaderOptions()
138 138
                         )
139
-                    );  //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main"
139
+                    ); //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main"
140 140
 
141 141
                     if ($xmlWorkbook->sheets) {
142 142
                         foreach ($xmlWorkbook->sheets->sheet as $eleSheet) {
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
                     }
542 542
 
543 543
                     if (!is_null($macros)) {
544
-                        $macrosCode = $this->getFromZipArchive($zip, 'xl/vbaProject.bin');//vbaProject.bin always in 'xl' dir and always named vbaProject.bin
544
+                        $macrosCode = $this->getFromZipArchive($zip, 'xl/vbaProject.bin'); //vbaProject.bin always in 'xl' dir and always named vbaProject.bin
545 545
                         if ($macrosCode !== false) {
546 546
                             $excel->setMacrosCode($macrosCode);
547 547
                             $excel->setHasMacros(true);
@@ -1313,7 +1313,7 @@  discard block
 block discarded – undo
1313 1313
                                         foreach (\PhpSpreadsheet\Cell::extractAllCellReferencesInRange($hyperlink['ref']) as $cellReference) {
1314 1314
                                             $cell = $docSheet->getCell($cellReference);
1315 1315
                                             if (isset($linkRel['id'])) {
1316
-                                                $hyperlinkUrl = $hyperlinks[ (string) $linkRel['id'] ];
1316
+                                                $hyperlinkUrl = $hyperlinks[(string) $linkRel['id']];
1317 1317
                                                 if (isset($hyperlink['location'])) {
1318 1318
                                                     $hyperlinkUrl .= '#' . (string) $hyperlink['location'];
1319 1319
                                                 }
@@ -1740,10 +1740,10 @@  discard block
 block discarded – undo
1740 1740
                                                 }
1741 1741
                                                 break;
1742 1742
                                             case '_xlnm.Print_Area':
1743
-                                                $rangeSets = explode(',', $extractedRange);        // FIXME: what if sheetname contains comma?
1743
+                                                $rangeSets = explode(',', $extractedRange); // FIXME: what if sheetname contains comma?
1744 1744
                                                 $newRangeSets = [];
1745 1745
                                                 foreach ($rangeSets as $rangeSet) {
1746
-                                                    $range = explode('!', $rangeSet);    // FIXME: what if sheetname contains exclamation mark?
1746
+                                                    $range = explode('!', $rangeSet); // FIXME: what if sheetname contains exclamation mark?
1747 1747
                                                     $rangeSet = isset($range[1]) ? $range[1] : $range[0];
1748 1748
                                                     if (strpos($rangeSet, ':') === false) {
1749 1749
                                                         $rangeSet = $rangeSet . ':' . $rangeSet;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Excel2007/Chart.php 1 patch
Doc Comments   +14 added lines patch added patch discarded remove patch
@@ -26,6 +26,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Gnumeric.php 2 patches
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -163,6 +163,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         $worksheetNames = [];
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
@@ -143,14 +143,14 @@  discard block
 block discarded – undo
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
                     }
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
                 if (isset($sheet->PrintInformation->Margins)) {
350 350
                     foreach ($sheet->PrintInformation->Margins->children('gnm', true) as $key => $margin) {
351 351
                         $marginAttributes = $margin->attributes();
352
-                        $marginSize = 72 / 100;    //    Default
352
+                        $marginSize = 72 / 100; //    Default
353 353
                         switch ($marginAttributes['PrefUnit']) {
354 354
                             case 'mm':
355 355
                                 $marginSize = intval($marginAttributes['Points']) / 100;
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
                             break;
436 436
                         case '20':        //    Boolean
437 437
                             $type = \PhpSpreadsheet\Cell\DataType::TYPE_BOOL;
438
-                            $cell = ($cell == 'TRUE') ? true: false;
438
+                            $cell = ($cell == 'TRUE') ? true : false;
439 439
                             break;
440 440
                         case '30':        //    Integer
441 441
                             $cell = intval($cell);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Font.php 3 patches
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -143,40 +143,40 @@
 block discarded – undo
143 143
      */
144 144
     public static $defaultColumnWidths = [
145 145
         'Arial' => [
146
-             1 => ['px' => 24, 'width' => 12.00000000],
147
-             2 => ['px' => 24, 'width' => 12.00000000],
148
-             3 => ['px' => 32, 'width' => 10.66406250],
149
-             4 => ['px' => 32, 'width' => 10.66406250],
150
-             5 => ['px' => 40, 'width' => 10.00000000],
151
-             6 => ['px' => 48, 'width' => 9.59765625],
152
-             7 => ['px' => 48, 'width' => 9.59765625],
153
-             8 => ['px' => 56, 'width' => 9.33203125],
154
-             9 => ['px' => 64, 'width' => 9.14062500],
146
+                1 => ['px' => 24, 'width' => 12.00000000],
147
+                2 => ['px' => 24, 'width' => 12.00000000],
148
+                3 => ['px' => 32, 'width' => 10.66406250],
149
+                4 => ['px' => 32, 'width' => 10.66406250],
150
+                5 => ['px' => 40, 'width' => 10.00000000],
151
+                6 => ['px' => 48, 'width' => 9.59765625],
152
+                7 => ['px' => 48, 'width' => 9.59765625],
153
+                8 => ['px' => 56, 'width' => 9.33203125],
154
+                9 => ['px' => 64, 'width' => 9.14062500],
155 155
             10 => ['px' => 64, 'width' => 9.14062500],
156 156
         ],
157 157
         'Calibri' => [
158
-             1 => ['px' => 24, 'width' => 12.00000000],
159
-             2 => ['px' => 24, 'width' => 12.00000000],
160
-             3 => ['px' => 32, 'width' => 10.66406250],
161
-             4 => ['px' => 32, 'width' => 10.66406250],
162
-             5 => ['px' => 40, 'width' => 10.00000000],
163
-             6 => ['px' => 48, 'width' => 9.59765625],
164
-             7 => ['px' => 48, 'width' => 9.59765625],
165
-             8 => ['px' => 56, 'width' => 9.33203125],
166
-             9 => ['px' => 56, 'width' => 9.33203125],
158
+                1 => ['px' => 24, 'width' => 12.00000000],
159
+                2 => ['px' => 24, 'width' => 12.00000000],
160
+                3 => ['px' => 32, 'width' => 10.66406250],
161
+                4 => ['px' => 32, 'width' => 10.66406250],
162
+                5 => ['px' => 40, 'width' => 10.00000000],
163
+                6 => ['px' => 48, 'width' => 9.59765625],
164
+                7 => ['px' => 48, 'width' => 9.59765625],
165
+                8 => ['px' => 56, 'width' => 9.33203125],
166
+                9 => ['px' => 56, 'width' => 9.33203125],
167 167
             10 => ['px' => 64, 'width' => 9.14062500],
168 168
             11 => ['px' => 64, 'width' => 9.14062500],
169 169
         ],
170 170
         'Verdana' => [
171
-             1 => ['px' => 24, 'width' => 12.00000000],
172
-             2 => ['px' => 24, 'width' => 12.00000000],
173
-             3 => ['px' => 32, 'width' => 10.66406250],
174
-             4 => ['px' => 32, 'width' => 10.66406250],
175
-             5 => ['px' => 40, 'width' => 10.00000000],
176
-             6 => ['px' => 48, 'width' => 9.59765625],
177
-             7 => ['px' => 48, 'width' => 9.59765625],
178
-             8 => ['px' => 64, 'width' => 9.14062500],
179
-             9 => ['px' => 72, 'width' => 9.00000000],
171
+                1 => ['px' => 24, 'width' => 12.00000000],
172
+                2 => ['px' => 24, 'width' => 12.00000000],
173
+                3 => ['px' => 32, 'width' => 10.66406250],
174
+                4 => ['px' => 32, 'width' => 10.66406250],
175
+                5 => ['px' => 40, 'width' => 10.00000000],
176
+                6 => ['px' => 48, 'width' => 9.59765625],
177
+                7 => ['px' => 48, 'width' => 9.59765625],
178
+                8 => ['px' => 64, 'width' => 9.14062500],
179
+                9 => ['px' => 72, 'width' => 9.00000000],
180 180
             10 => ['px' => 72, 'width' => 9.00000000],
181 181
         ],
182 182
     ];
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet.php 2 patches
Doc Comments   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
     /**
329 329
      * Create a new worksheet
330 330
      *
331
-     * @param Spreadsheet        $Parent
331
+     * @param Spreadsheet        $parent
332 332
      * @param string        $pTitle
333 333
      */
334 334
     public function __construct(Spreadsheet $parent = null, $pTitle = 'Worksheet')
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
      * Get a chart by its index position
586 586
      *
587 587
      * @param string $index Chart index position
588
-     * @return false|Chart
588
+     * @return null|Chart
589 589
      * @throws Exception
590 590
      */
591 591
     public function getChartByIndex($index = null)
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
     /**
768 768
      * Get parent
769 769
      *
770
-     * @return PhpSpreadsheet
770
+     * @return Spreadsheet
771 771
      */
772 772
     public function getParent()
773 773
     {
@@ -1077,7 +1077,7 @@  discard block
 block discarded – undo
1077 1077
      * Set a cell value
1078 1078
      *
1079 1079
      * @param string $pCoordinate Coordinate of the cell
1080
-     * @param mixed $pValue Value of the cell
1080
+     * @param integer $pValue Value of the cell
1081 1081
      * @param bool $returnCell   Return the worksheet (false, default) or the cell (true)
1082 1082
      * @return Worksheet|Cell    Depending on the last parameter being specified
1083 1083
      */
@@ -1090,8 +1090,8 @@  discard block
 block discarded – undo
1090 1090
     /**
1091 1091
      * Set a cell value by using numeric cell coordinates
1092 1092
      *
1093
-     * @param string $pColumn Numeric column coordinate of the cell (A = 0)
1094
-     * @param string $pRow Numeric row coordinate of the cell
1093
+     * @param integer $pColumn Numeric column coordinate of the cell (A = 0)
1094
+     * @param integer $pRow Numeric row coordinate of the cell
1095 1095
      * @param mixed $pValue Value of the cell
1096 1096
      * @param bool $returnCell Return the worksheet (false, default) or the cell (true)
1097 1097
      * @return Worksheet|Cell    Depending on the last parameter being specified
@@ -1121,8 +1121,8 @@  discard block
 block discarded – undo
1121 1121
     /**
1122 1122
      * Set a cell value by using numeric cell coordinates
1123 1123
      *
1124
-     * @param string $pColumn Numeric column coordinate of the cell
1125
-     * @param string $pRow Numeric row coordinate of the cell
1124
+     * @param integer $pColumn Numeric column coordinate of the cell
1125
+     * @param integer $pRow Numeric row coordinate of the cell
1126 1126
      * @param mixed $pValue Value of the cell
1127 1127
      * @param string $pDataType Explicit data type
1128 1128
      * @param bool $returnCell Return the worksheet (false, default) or the cell (true)
@@ -1182,8 +1182,8 @@  discard block
 block discarded – undo
1182 1182
     /**
1183 1183
      * Get cell at a specific coordinate by using numeric cell coordinates
1184 1184
      *
1185
-     * @param  string $pColumn Numeric column coordinate of the cell
1186
-     * @param string $pRow Numeric row coordinate of the cell
1185
+     * @param  integer $pColumn Numeric column coordinate of the cell
1186
+     * @param integer $pRow Numeric row coordinate of the cell
1187 1187
      * @param boolean $createIfNotExists  Flag indicating whether a new cell should be created if it doesn't
1188 1188
      *                                       already exist, or a null should be returned instead
1189 1189
      * @return null|Cell Cell that was found/created or null
@@ -1290,8 +1290,8 @@  discard block
 block discarded – undo
1290 1290
     /**
1291 1291
      * Cell at a specific coordinate by using numeric cell coordinates exists?
1292 1292
      *
1293
-     * @param string $pColumn Numeric column coordinate of the cell
1294
-     * @param string $pRow Numeric row coordinate of the cell
1293
+     * @param integer $pColumn Numeric column coordinate of the cell
1294
+     * @param integer $pRow Numeric row coordinate of the cell
1295 1295
      * @return boolean
1296 1296
      */
1297 1297
     public function cellExistsByColumnAndRow($pColumn = 0, $pRow = 1)
@@ -1350,7 +1350,7 @@  discard block
 block discarded – undo
1350 1350
     /**
1351 1351
      * Get column dimension at a specific column by using numeric cell coordinates
1352 1352
      *
1353
-     * @param string $pColumn Numeric column coordinate of the cell
1353
+     * @param integer $pColumn Numeric column coordinate of the cell
1354 1354
      * @return Worksheet\ColumnDimension
1355 1355
      */
1356 1356
     public function getColumnDimensionByColumn($pColumn = 0)
@@ -1471,7 +1471,7 @@  discard block
 block discarded – undo
1471 1471
     /**
1472 1472
      * Set conditional styles
1473 1473
      *
1474
-     * @param $pCoordinate string E.g. 'A1'
1474
+     * @param string $pCoordinate string E.g. 'A1'
1475 1475
      * @param $pValue Style\Conditional[]
1476 1476
      * @return Worksheet
1477 1477
      */
@@ -1892,7 +1892,7 @@  discard block
 block discarded – undo
1892 1892
     /**
1893 1893
      *    Set AutoFilter
1894 1894
      *
1895
-     *    @param    Worksheet\AutoFilter|string   $pValue
1895
+     *    @param    string   $pValue
1896 1896
      *            A simple string containing a Cell range like 'A1:E10' is permitted for backward compatibility
1897 1897
      *    @throws Exception
1898 1898
      *    @return Worksheet
@@ -2902,7 +2902,7 @@  discard block
 block discarded – undo
2902 2902
      * Define the code name of the sheet
2903 2903
      *
2904 2904
      * @param null|string Same rule as Title minus space not allowed (but, like Excel, change silently space to underscore)
2905
-     * @return objWorksheet
2905
+     * @return Worksheet
2906 2906
      * @throws Exception
2907 2907
     */
2908 2908
     public function setCodeName($pValue = null)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2962,7 +2962,7 @@  discard block
 block discarded – undo
2962 2962
         if ($this->getCodeName() == $pValue) {
2963 2963
             return $this;
2964 2964
         }
2965
-        $pValue = str_replace(' ', '_', $pValue);//Excel does this automatically without flinching, we are doing the same
2965
+        $pValue = str_replace(' ', '_', $pValue); //Excel does this automatically without flinching, we are doing the same
2966 2966
         // Syntax check
2967 2967
         // throw an exception if not valid
2968 2968
         self::checkSheetCodeName($pValue);
@@ -2991,7 +2991,7 @@  discard block
 block discarded – undo
2991 2991
                     }
2992 2992
                 }
2993 2993
 
2994
-                $pValue = $pValue . '_' . $i;// ok, we have a valid name
2994
+                $pValue = $pValue . '_' . $i; // ok, we have a valid name
2995 2995
                 //codeName is'nt used in formula : no need to call for an update
2996 2996
                 //return $this->setTitle($altTitle, $updateFormulaCellReferences);
2997 2997
             }
Please login to merge, or discard this patch.