Completed
Push — develop ( aa97bb...91573b )
by
unknown
09:37
created
src/PhpSpreadsheet/NamedRange.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@
 block discarded – undo
226 226
      * Resolve a named range to a regular cell range
227 227
      *
228 228
      * @param string $pNamedRange Named range
229
-     * @param Worksheet|null $pSheet Scope. Use null for global scope
229
+     * @param Worksheet $pSheet Scope. Use null for global scope
230 230
      * @return NamedRange
231 231
      */
232 232
     public static function resolveRange($pNamedRange, Worksheet $pSheet)
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/BaseReader.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
      *
120 120
      * @param    boolean    $pValue
121 121
      *
122
-     * @return    PHPExcel_Reader_IReader
122
+     * @return    BaseReader
123 123
      */
124 124
     public function setReadEmptyCells($pValue = true)
125 125
     {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/CSV.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -392,7 +392,7 @@
 block discarded – undo
392 392
     /**
393 393
      * Get Contiguous
394 394
      *
395
-     * @return boolean
395
+     * @return integer
396 396
      */
397 397
     public function getContiguous()
398 398
     {
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -262,8 +262,8 @@
 block discarded – undo
262 262
         $sheet = $objPHPExcel->setActiveSheetIndex($this->sheetIndex);
263 263
 
264 264
         $escapeEnclosures = array( "\\" . $this->enclosure,
265
-                                   $this->enclosure . $this->enclosure
266
-                                 );
265
+                                    $this->enclosure . $this->enclosure
266
+                                    );
267 267
 
268 268
         // Set our starting row based on whether we're in contiguous mode or not
269 269
         $currentRow = 1;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         $this->skipBOM();
191 191
         $this->checkSeparator();
192 192
 
193
-        $escapeEnclosures = array( "\\" . $this->enclosure, $this->enclosure . $this->enclosure );
193
+        $escapeEnclosures = array("\\" . $this->enclosure, $this->enclosure . $this->enclosure);
194 194
 
195 195
         $worksheetInfo = array();
196 196
         $worksheetInfo[0]['worksheetName'] = 'Worksheet';
@@ -261,14 +261,14 @@  discard block
 block discarded – undo
261 261
         }
262 262
         $sheet = $objPHPExcel->setActiveSheetIndex($this->sheetIndex);
263 263
 
264
-        $escapeEnclosures = array( "\\" . $this->enclosure,
264
+        $escapeEnclosures = array("\\" . $this->enclosure,
265 265
                                    $this->enclosure . $this->enclosure
266 266
                                  );
267 267
 
268 268
         // Set our starting row based on whether we're in contiguous mode or not
269 269
         $currentRow = 1;
270 270
         if ($this->contiguous) {
271
-            $currentRow = ($this->contiguousRow == -1) ? $sheet->getHighestRow(): $this->contiguousRow;
271
+            $currentRow = ($this->contiguousRow == -1) ? $sheet->getHighestRow() : $this->contiguousRow;
272 272
         }
273 273
 
274 274
         // Loop through each line of the file in turn
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Excel2003XML.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -231,6 +231,9 @@  discard block
 block discarded – undo
231 231
         return $this->loadIntoExisting($pFilename, $objPHPExcel);
232 232
     }
233 233
 
234
+    /**
235
+     * @param string $styleAttributeValue
236
+     */
234 237
     protected static function identifyFixedStyleValue($styleList, &$styleAttributeValue)
235 238
     {
236 239
         $styleAttributeValue = strtolower($styleAttributeValue);
@@ -786,6 +789,9 @@  discard block
 block discarded – undo
786 789
     }
787 790
 
788 791
 
792
+    /**
793
+     * @param string $charset
794
+     */
789 795
     protected static function convertStringEncoding($string, $charset)
790 796
     {
791 797
         if ($charset != 'UTF-8') {
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -288,20 +288,20 @@  discard block
 block discarded – undo
288 288
         $fromFormats    = array('\-', '\ ');
289 289
         $toFormats      = array('-', ' ');
290 290
 
291
-        $underlineStyles = array (
291
+        $underlineStyles = array(
292 292
             \PHPExcel\Style\Font::UNDERLINE_NONE,
293 293
             \PHPExcel\Style\Font::UNDERLINE_DOUBLE,
294 294
             \PHPExcel\Style\Font::UNDERLINE_DOUBLEACCOUNTING,
295 295
             \PHPExcel\Style\Font::UNDERLINE_SINGLE,
296 296
             \PHPExcel\Style\Font::UNDERLINE_SINGLEACCOUNTING
297 297
         );
298
-        $verticalAlignmentStyles = array (
298
+        $verticalAlignmentStyles = array(
299 299
             \PHPExcel\Style\Alignment::VERTICAL_BOTTOM,
300 300
             \PHPExcel\Style\Alignment::VERTICAL_TOP,
301 301
             \PHPExcel\Style\Alignment::VERTICAL_CENTER,
302 302
             \PHPExcel\Style\Alignment::VERTICAL_JUSTIFY
303 303
         );
304
-        $horizontalAlignmentStyles = array (
304
+        $horizontalAlignmentStyles = array(
305 305
             \PHPExcel\Style\Alignment::HORIZONTAL_GENERAL,
306 306
             \PHPExcel\Style\Alignment::HORIZONTAL_LEFT,
307 307
             \PHPExcel\Style\Alignment::HORIZONTAL_RIGHT,
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
                 foreach ($worksheet->Table->Column as $columnData) {
556 556
                     $columnData_ss = $columnData->attributes($namespaces['ss']);
557 557
                     if (isset($columnData_ss['Index'])) {
558
-                        $columnID = \PHPExcel\Cell::stringFromColumnIndex($columnData_ss['Index']-1);
558
+                        $columnID = \PHPExcel\Cell::stringFromColumnIndex($columnData_ss['Index'] - 1);
559 559
                     }
560 560
                     if (isset($columnData_ss['Width'])) {
561 561
                         $columnWidth = $columnData_ss['Width'];
@@ -581,9 +581,9 @@  discard block
 block discarded – undo
581 581
                     foreach ($rowData->Cell as $cell) {
582 582
                         $cell_ss = $cell->attributes($namespaces['ss']);
583 583
                         if (isset($cell_ss['Index'])) {
584
-                            $columnID = \PHPExcel\Cell::stringFromColumnIndex($cell_ss['Index']-1);
584
+                            $columnID = \PHPExcel\Cell::stringFromColumnIndex($cell_ss['Index'] - 1);
585 585
                         }
586
-                        $cellRange = $columnID.$rowID;
586
+                        $cellRange = $columnID . $rowID;
587 587
 
588 588
                         if ($this->getReadFilter() !== null) {
589 589
                             if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) {
@@ -594,14 +594,14 @@  discard block
 block discarded – undo
594 594
                         if ((isset($cell_ss['MergeAcross'])) || (isset($cell_ss['MergeDown']))) {
595 595
                             $columnTo = $columnID;
596 596
                             if (isset($cell_ss['MergeAcross'])) {
597
-                                $additionalMergedCells += (int)$cell_ss['MergeAcross'];
598
-                                $columnTo = \PHPExcel\Cell::stringFromColumnIndex(\PHPExcel\Cell::columnIndexFromString($columnID) + $cell_ss['MergeAcross'] -1);
597
+                                $additionalMergedCells += (int) $cell_ss['MergeAcross'];
598
+                                $columnTo = \PHPExcel\Cell::stringFromColumnIndex(\PHPExcel\Cell::columnIndexFromString($columnID) + $cell_ss['MergeAcross'] - 1);
599 599
                             }
600 600
                             $rowTo = $rowID;
601 601
                             if (isset($cell_ss['MergeDown'])) {
602 602
                                 $rowTo = $rowTo + $cell_ss['MergeDown'];
603 603
                             }
604
-                            $cellRange .= ':'.$columnTo.$rowTo;
604
+                            $cellRange .= ':' . $columnTo . $rowTo;
605 605
                             $objPHPExcel->getActiveSheet()->mergeCells($cellRange);
606 606
                         }
607 607
 
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
                                                 if ($columnReference{0} == '[') {
707 707
                                                     $columnReference = $columnNumber + trim($columnReference, '[]');
708 708
                                                 }
709
-                                                $A1CellReference = \PHPExcel\Cell::stringFromColumnIndex($columnReference-1).$rowReference;
709
+                                                $A1CellReference = \PHPExcel\Cell::stringFromColumnIndex($columnReference - 1) . $rowReference;
710 710
                                                 $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0]));
711 711
                                             }
712 712
                                         }
@@ -720,10 +720,10 @@  discard block
 block discarded – undo
720 720
 
721 721
 //                            echo 'Cell '.$columnID.$rowID.' is a '.$type.' with a value of '.(($hasCalculatedValue) ? $cellDataFormula : $cellValue).'<br />';
722 722
 //
723
-                            $objPHPExcel->getActiveSheet()->getCell($columnID.$rowID)->setValueExplicit((($hasCalculatedValue) ? $cellDataFormula : $cellValue), $type);
723
+                            $objPHPExcel->getActiveSheet()->getCell($columnID . $rowID)->setValueExplicit((($hasCalculatedValue) ? $cellDataFormula : $cellValue), $type);
724 724
                             if ($hasCalculatedValue) {
725 725
 //                                echo 'Formula result is '.$cellValue.'<br />';
726
-                                $objPHPExcel->getActiveSheet()->getCell($columnID.$rowID)->setCalculatedValue($cellValue);
726
+                                $objPHPExcel->getActiveSheet()->getCell($columnID . $rowID)->setCalculatedValue($cellValue);
727 727
                             }
728 728
                             $cellIsSet = $rowHasData = true;
729 729
                         }
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
                             $commentAttributes = $cell->Comment->attributes($namespaces['ss']);
734 734
                             $author = 'unknown';
735 735
                             if (isset($commentAttributes->Author)) {
736
-                                $author = (string)$commentAttributes->Author;
736
+                                $author = (string) $commentAttributes->Author;
737 737
 //                                echo 'Author: ', $author,'<br />';
738 738
                             }
739 739
                             $node = $cell->Comment->Data->asXML();
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
 //                            echo $annotation,'<br />';
742 742
                             $annotation = strip_tags($node);
743 743
 //                            echo 'Annotation: ', $annotation,'<br />';
744
-                            $objPHPExcel->getActiveSheet()->getComment($columnID.$rowID)->setAuthor(self::convertStringEncoding($author, $this->charSet))->setText($this->parseRichText($annotation));
744
+                            $objPHPExcel->getActiveSheet()->getComment($columnID . $rowID)->setAuthor(self::convertStringEncoding($author, $this->charSet))->setText($this->parseRichText($annotation));
745 745
                         }
746 746
 
747 747
                         if (($cellIsSet) && (isset($cell_ss['StyleID']))) {
@@ -751,8 +751,8 @@  discard block
 block discarded – undo
751 751
 //                                echo 'Cell '.$columnID.$rowID.'<br />';
752 752
 //                                print_r($this->styles[$style]);
753 753
 //                                echo '<br />';
754
-                                if (!$objPHPExcel->getActiveSheet()->cellExists($columnID.$rowID)) {
755
-                                    $objPHPExcel->getActiveSheet()->getCell($columnID.$rowID)->setValue(null);
754
+                                if (!$objPHPExcel->getActiveSheet()->cellExists($columnID . $rowID)) {
755
+                                    $objPHPExcel->getActiveSheet()->getCell($columnID . $rowID)->setValue(null);
756 756
                                 }
757 757
                                 $objPHPExcel->getActiveSheet()->getStyle($cellRange)->applyFromArray($this->styles[$style]);
758 758
                             }
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
@@ -288,6 +288,11 @@  discard block
 block discarded – undo
288 288
         return isset($c->v) ? (string) $c->v : null;
289 289
     }
290 290
 
291
+    /**
292
+     * @param string $r
293
+     * @param string $cellDataType
294
+     * @param string $castBaseType
295
+     */
291 296
     private function castToFormula($c, $r, &$cellDataType, &$value, &$calculatedValue, &$sharedFormulas, $castBaseType)
292 297
     {
293 298
 //        echo 'Formula', PHP_EOL;
@@ -330,6 +335,9 @@  discard block
 block discarded – undo
330 335
     }
331 336
 
332 337
 
338
+    /**
339
+     * @return string|null
340
+     */
333 341
     private function getFromZipArchive($archive, $fileName = '')
334 342
     {
335 343
         // Root-relative paths
@@ -359,7 +367,7 @@  discard block
 block discarded – undo
359 367
      * Loads Spreadsheet from file
360 368
      *
361 369
      * @param     string         $pFilename
362
-     * @return    Spreadsheet
370
+     * @return    \PHPExcel\Spreadsheet
363 371
      * @throws    Exception
364 372
      */
365 373
     public function load($pFilename)
@@ -1924,6 +1932,9 @@  discard block
 block discarded – undo
1924 1932
         return 'FF000000';
1925 1933
     }
1926 1934
 
1935
+    /**
1936
+     * @param \PHPExcel\Style $docStyle
1937
+     */
1927 1938
     private static function readStyle($docStyle, $style)
1928 1939
     {
1929 1940
         // format code
@@ -2123,6 +2134,9 @@  discard block
 block discarded – undo
2123 2134
         return $value;
2124 2135
     }
2125 2136
 
2137
+    /**
2138
+     * @param \PHPExcel\Spreadsheet $excel
2139
+     */
2126 2140
     private function readRibbon($excel, $customUITarget, $zip)
2127 2141
     {
2128 2142
         $baseDir = dirname($customUITarget);
@@ -2175,6 +2189,9 @@  discard block
 block discarded – undo
2175 2189
         return preg_replace('~[^/]+/\.\./~', '', dirname($base) . "/$add");
2176 2190
     }
2177 2191
 
2192
+    /**
2193
+     * @param string $style
2194
+     */
2178 2195
     private static function toCSSArray($style)
2179 2196
     {
2180 2197
         $style = str_replace(array("\r","\n"), "", $style);
Please login to merge, or discard this patch.
Spacing   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                             'SimpleXMLElement',
141 141
                             \PHPExcel\Settings::getLibXmlLoaderOptions()
142 142
                         )
143
-                    );  //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main"
143
+                    ); //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main"
144 144
 
145 145
                     if ($xmlWorkbook->sheets) {
146 146
                         foreach ($xmlWorkbook->sheets->sheet as $eleSheet) {
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
                         $xml = new \XMLReader();
228 228
                         $res = $xml->xml(
229 229
                             $this->securityScanFile(
230
-                                'zip://'.\PHPExcel\Shared\File::realpath($pFilename).'#'."$dir/$fileWorksheet"
230
+                                'zip://' . \PHPExcel\Shared\File::realpath($pFilename) . '#' . "$dir/$fileWorksheet"
231 231
                             ),
232 232
                             null,
233 233
                             \PHPExcel\Settings::getLibXmlLoaderOptions()
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
         } elseif ($value == '1') {
272 272
             return true;
273 273
         } else {
274
-            return (bool)$c->v;
274
+            return (bool) $c->v;
275 275
         }
276 276
         return $value;
277 277
     }
@@ -297,15 +297,15 @@  discard block
 block discarded – undo
297 297
         $calculatedValue    = self::$castBaseType($c);
298 298
 
299 299
         // Shared formula?
300
-        if (isset($c->f['t']) && strtolower((string)$c->f['t']) == 'shared') {
300
+        if (isset($c->f['t']) && strtolower((string) $c->f['t']) == 'shared') {
301 301
 //            echo 'SHARED FORMULA', PHP_EOL;
302
-            $instance = (string)$c->f['si'];
302
+            $instance = (string) $c->f['si'];
303 303
 
304 304
 //            echo 'Instance ID = ', $instance, PHP_EOL;
305 305
 //
306 306
 //            echo 'Shared Formula Array:', PHP_EOL;
307 307
 //            print_r($sharedFormulas);
308
-            if (!isset($sharedFormulas[(string)$c->f['si']])) {
308
+            if (!isset($sharedFormulas[(string) $c->f['si']])) {
309 309
 //                echo 'SETTING NEW SHARED FORMULA', PHP_EOL;
310 310
 //                echo 'Master is ', $r, PHP_EOL;
311 311
 //                echo 'Formula is ', $value, PHP_EOL;
@@ -403,10 +403,10 @@  discard block
 block discarded – undo
403 403
                     if (is_object($xmlTheme)) {
404 404
                         $xmlThemeName = $xmlTheme->attributes();
405 405
                         $xmlTheme = $xmlTheme->children("http://schemas.openxmlformats.org/drawingml/2006/main");
406
-                        $themeName = (string)$xmlThemeName['name'];
406
+                        $themeName = (string) $xmlThemeName['name'];
407 407
 
408 408
                         $colourScheme = $xmlTheme->themeElements->clrScheme->attributes();
409
-                        $colourSchemeName = (string)$colourScheme['name'];
409
+                        $colourSchemeName = (string) $colourScheme['name'];
410 410
                         $colourScheme = $xmlTheme->themeElements->clrScheme->children("http://schemas.openxmlformats.org/drawingml/2006/main");
411 411
 
412 412
                         $themeColours = array();
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
                     }
548 548
 
549 549
                     if (!is_null($macros)) {
550
-                        $macrosCode = $this->getFromZipArchive($zip, 'xl/vbaProject.bin');//vbaProject.bin always in 'xl' dir and always named vbaProject.bin
550
+                        $macrosCode = $this->getFromZipArchive($zip, 'xl/vbaProject.bin'); //vbaProject.bin always in 'xl' dir and always named vbaProject.bin
551 551
                         if ($macrosCode !== false) {
552 552
                             $excel->setMacrosCode($macrosCode);
553 553
                             $excel->setHasMacros(true);
@@ -590,9 +590,9 @@  discard block
 block discarded – undo
590 590
                                 // We shouldn't override any of the built-in MS Excel values (values below id 164)
591 591
                                 //  But there's a lot of naughty homebrew xlsx writers that do use "reserved" id values that aren't actually used
592 592
                                 //  So we make allowance for them rather than lose formatting masks
593
-                                if ((int)$xf["numFmtId"] < 164 &&
594
-                                    \PHPExcel\Style\NumberFormat::builtInFormatCode((int)$xf["numFmtId"]) !== '') {
595
-                                    $numFmt = \PHPExcel\Style\NumberFormat::builtInFormatCode((int)$xf["numFmtId"]);
593
+                                if ((int) $xf["numFmtId"] < 164 &&
594
+                                    \PHPExcel\Style\NumberFormat::builtInFormatCode((int) $xf["numFmtId"]) !== '') {
595
+                                    $numFmt = \PHPExcel\Style\NumberFormat::builtInFormatCode((int) $xf["numFmtId"]);
596 596
                                 }
597 597
                             }
598 598
                             $quotePrefix = false;
@@ -623,8 +623,8 @@  discard block
 block discarded – undo
623 623
                                 $tmpNumFmt = self::getArrayItem($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]"));
624 624
                                 if (isset($tmpNumFmt["formatCode"])) {
625 625
                                     $numFmt = (string) $tmpNumFmt["formatCode"];
626
-                                } elseif ((int)$xf["numFmtId"] < 165) {
627
-                                    $numFmt = \PHPExcel\Style\NumberFormat::builtInFormatCode((int)$xf["numFmtId"]);
626
+                                } elseif ((int) $xf["numFmtId"] < 165) {
627
+                                    $numFmt = \PHPExcel\Style\NumberFormat::builtInFormatCode((int) $xf["numFmtId"]);
628 628
                                 }
629 629
                             }
630 630
 
@@ -743,17 +743,17 @@  discard block
 block discarded – undo
743 743
                                     $docSheet->getSheetView()->setView((string) $xmlSheet->sheetViews->sheetView['view']);
744 744
                                 }
745 745
                                 if (isset($xmlSheet->sheetViews->sheetView['showGridLines'])) {
746
-                                    $docSheet->setShowGridLines(self::boolean((string)$xmlSheet->sheetViews->sheetView['showGridLines']));
746
+                                    $docSheet->setShowGridLines(self::boolean((string) $xmlSheet->sheetViews->sheetView['showGridLines']));
747 747
                                 }
748 748
                                 if (isset($xmlSheet->sheetViews->sheetView['showRowColHeaders'])) {
749
-                                    $docSheet->setShowRowColHeaders(self::boolean((string)$xmlSheet->sheetViews->sheetView['showRowColHeaders']));
749
+                                    $docSheet->setShowRowColHeaders(self::boolean((string) $xmlSheet->sheetViews->sheetView['showRowColHeaders']));
750 750
                                 }
751 751
                                 if (isset($xmlSheet->sheetViews->sheetView['rightToLeft'])) {
752
-                                    $docSheet->setRightToLeft(self::boolean((string)$xmlSheet->sheetViews->sheetView['rightToLeft']));
752
+                                    $docSheet->setRightToLeft(self::boolean((string) $xmlSheet->sheetViews->sheetView['rightToLeft']));
753 753
                                 }
754 754
                                 if (isset($xmlSheet->sheetViews->sheetView->pane)) {
755 755
                                     if (isset($xmlSheet->sheetViews->sheetView->pane['topLeftCell'])) {
756
-                                        $docSheet->freezePane((string)$xmlSheet->sheetViews->sheetView->pane['topLeftCell']);
756
+                                        $docSheet->freezePane((string) $xmlSheet->sheetViews->sheetView->pane['topLeftCell']);
757 757
                                     } else {
758 758
                                         $xSplit = 0;
759 759
                                         $ySplit = 0;
@@ -772,7 +772,7 @@  discard block
 block discarded – undo
772 772
 
773 773
                                 if (isset($xmlSheet->sheetViews->sheetView->selection)) {
774 774
                                     if (isset($xmlSheet->sheetViews->sheetView->selection['sqref'])) {
775
-                                        $sqref = (string)$xmlSheet->sheetViews->sheetView->selection['sqref'];
775
+                                        $sqref = (string) $xmlSheet->sheetViews->sheetView->selection['sqref'];
776 776
                                         $sqref = explode(' ', $sqref);
777 777
                                         $sqref = $sqref[0];
778 778
                                         $docSheet->setSelectedCells($sqref);
@@ -782,7 +782,7 @@  discard block
 block discarded – undo
782 782
 
783 783
                             if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr->tabColor)) {
784 784
                                 if (isset($xmlSheet->sheetPr->tabColor['rgb'])) {
785
-                                    $docSheet->getTabColor()->setARGB((string)$xmlSheet->sheetPr->tabColor['rgb']);
785
+                                    $docSheet->getTabColor()->setARGB((string) $xmlSheet->sheetPr->tabColor['rgb']);
786 786
                                 }
787 787
                             }
788 788
                             if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr['codeName'])) {
@@ -817,13 +817,13 @@  discard block
 block discarded – undo
817 817
                                 if (isset($xmlSheet->sheetFormatPr['customHeight']) &&
818 818
                                     self::boolean((string) $xmlSheet->sheetFormatPr['customHeight']) &&
819 819
                                     isset($xmlSheet->sheetFormatPr['defaultRowHeight'])) {
820
-                                    $docSheet->getDefaultRowDimension()->setRowHeight((float)$xmlSheet->sheetFormatPr['defaultRowHeight']);
820
+                                    $docSheet->getDefaultRowDimension()->setRowHeight((float) $xmlSheet->sheetFormatPr['defaultRowHeight']);
821 821
                                 }
822 822
                                 if (isset($xmlSheet->sheetFormatPr['defaultColWidth'])) {
823
-                                    $docSheet->getDefaultColumnDimension()->setWidth((float)$xmlSheet->sheetFormatPr['defaultColWidth']);
823
+                                    $docSheet->getDefaultColumnDimension()->setWidth((float) $xmlSheet->sheetFormatPr['defaultColWidth']);
824 824
                                 }
825 825
                                 if (isset($xmlSheet->sheetFormatPr['zeroHeight']) &&
826
-                                    ((string)$xmlSheet->sheetFormatPr['zeroHeight'] == '1')) {
826
+                                    ((string) $xmlSheet->sheetFormatPr['zeroHeight'] == '1')) {
827 827
                                     $docSheet->getDefaultRowDimension()->setZeroHeight(true);
828 828
                                 }
829 829
                             }
@@ -890,10 +890,10 @@  discard block
 block discarded – undo
890 890
                                     }
891 891
 
892 892
                                     foreach ($row->c as $c) {
893
-                                        $r                     = (string) $c["r"];
893
+                                        $r = (string) $c["r"];
894 894
                                         $cellDataType         = (string) $c["t"];
895 895
                                         $value                = null;
896
-                                        $calculatedValue     = null;
896
+                                        $calculatedValue = null;
897 897
 
898 898
                                         // Read cell?
899 899
                                         if ($this->getReadFilter() !== null) {
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
                                         switch ($cellDataType) {
914 914
                                             case "s":
915 915
     //                                            echo 'String', PHP_EOL;
916
-                                                if ((string)$c->v != '') {
916
+                                                if ((string) $c->v != '') {
917 917
                                                     $value = $sharedStrings[intval($c->v)];
918 918
 
919 919
                                                     if ($value instanceof \PHPExcel\RichText) {
@@ -973,12 +973,12 @@  discard block
 block discarded – undo
973 973
 
974 974
                                         // Check for numeric values
975 975
                                         if (is_numeric($value) && $cellDataType != 's') {
976
-                                            if ($value == (int)$value) {
977
-                                                $value = (int)$value;
978
-                                            } elseif ($value == (float)$value) {
979
-                                                $value = (float)$value;
980
-                                            } elseif ($value == (double)$value) {
981
-                                                $value = (double)$value;
976
+                                            if ($value == (int) $value) {
977
+                                                $value = (int) $value;
978
+                                            } elseif ($value == (float) $value) {
979
+                                                $value = (float) $value;
980
+                                            } elseif ($value == (double) $value) {
981
+                                                $value = (double) $value;
982 982
                                             }
983 983
                                         }
984 984
 
@@ -1012,7 +1012,7 @@  discard block
 block discarded – undo
1012 1012
                             if (!$this->readDataOnly && $xmlSheet && $xmlSheet->conditionalFormatting) {
1013 1013
                                 foreach ($xmlSheet->conditionalFormatting as $conditional) {
1014 1014
                                     foreach ($conditional->cfRule as $cfRule) {
1015
-                                        if (((string)$cfRule["type"] == \PHPExcel\Style\Conditional::CONDITION_NONE || (string)$cfRule["type"] == \PHPExcel\Style\Conditional::CONDITION_CELLIS || (string)$cfRule["type"] == \PHPExcel\Style\Conditional::CONDITION_CONTAINSTEXT || (string)$cfRule["type"] == \PHPExcel\Style\Conditional::CONDITION_EXPRESSION) && isset($dxfs[intval($cfRule["dxfId"])])) {
1015
+                                        if (((string) $cfRule["type"] == \PHPExcel\Style\Conditional::CONDITION_NONE || (string) $cfRule["type"] == \PHPExcel\Style\Conditional::CONDITION_CELLIS || (string) $cfRule["type"] == \PHPExcel\Style\Conditional::CONDITION_CONTAINSTEXT || (string) $cfRule["type"] == \PHPExcel\Style\Conditional::CONDITION_EXPRESSION) && isset($dxfs[intval($cfRule["dxfId"])])) {
1016 1016
                                             $conditionals[(string) $conditional["sqref"]][intval($cfRule["priority"])] = $cfRule;
1017 1017
                                         }
1018 1018
                                     }
@@ -1023,19 +1023,19 @@  discard block
 block discarded – undo
1023 1023
                                     $conditionalStyles = array();
1024 1024
                                     foreach ($cfRules as $cfRule) {
1025 1025
                                         $objConditional = new \PHPExcel\Style\Conditional();
1026
-                                        $objConditional->setConditionType((string)$cfRule["type"]);
1027
-                                        $objConditional->setOperatorType((string)$cfRule["operator"]);
1026
+                                        $objConditional->setConditionType((string) $cfRule["type"]);
1027
+                                        $objConditional->setOperatorType((string) $cfRule["operator"]);
1028 1028
 
1029
-                                        if ((string)$cfRule["text"] != '') {
1030
-                                            $objConditional->setText((string)$cfRule["text"]);
1029
+                                        if ((string) $cfRule["text"] != '') {
1030
+                                            $objConditional->setText((string) $cfRule["text"]);
1031 1031
                                         }
1032 1032
 
1033 1033
                                         if (count($cfRule->formula) > 1) {
1034 1034
                                             foreach ($cfRule->formula as $formula) {
1035
-                                                $objConditional->addCondition((string)$formula);
1035
+                                                $objConditional->addCondition((string) $formula);
1036 1036
                                             }
1037 1037
                                         } else {
1038
-                                            $objConditional->addCondition((string)$cfRule->formula);
1038
+                                            $objConditional->addCondition((string) $cfRule->formula);
1039 1039
                                         }
1040 1040
                                         $objConditional->setStyle(clone $dxfs[intval($cfRule["dxfId"])]);
1041 1041
                                         $conditionalStyles[] = $objConditional;
@@ -1213,25 +1213,25 @@  discard block
 block discarded – undo
1213 1213
                                 $docHeaderFooter = $docSheet->getHeaderFooter();
1214 1214
 
1215 1215
                                 if (isset($xmlSheet->headerFooter["differentOddEven"]) &&
1216
-                                    self::boolean((string)$xmlSheet->headerFooter["differentOddEven"])) {
1216
+                                    self::boolean((string) $xmlSheet->headerFooter["differentOddEven"])) {
1217 1217
                                     $docHeaderFooter->setDifferentOddEven(true);
1218 1218
                                 } else {
1219 1219
                                     $docHeaderFooter->setDifferentOddEven(false);
1220 1220
                                 }
1221 1221
                                 if (isset($xmlSheet->headerFooter["differentFirst"]) &&
1222
-                                    self::boolean((string)$xmlSheet->headerFooter["differentFirst"])) {
1222
+                                    self::boolean((string) $xmlSheet->headerFooter["differentFirst"])) {
1223 1223
                                     $docHeaderFooter->setDifferentFirst(true);
1224 1224
                                 } else {
1225 1225
                                     $docHeaderFooter->setDifferentFirst(false);
1226 1226
                                 }
1227 1227
                                 if (isset($xmlSheet->headerFooter["scaleWithDoc"]) &&
1228
-                                    !self::boolean((string)$xmlSheet->headerFooter["scaleWithDoc"])) {
1228
+                                    !self::boolean((string) $xmlSheet->headerFooter["scaleWithDoc"])) {
1229 1229
                                     $docHeaderFooter->setScaleWithDocument(false);
1230 1230
                                 } else {
1231 1231
                                     $docHeaderFooter->setScaleWithDocument(true);
1232 1232
                                 }
1233 1233
                                 if (isset($xmlSheet->headerFooter["alignWithMargins"]) &&
1234
-                                    !self::boolean((string)$xmlSheet->headerFooter["alignWithMargins"])) {
1234
+                                    !self::boolean((string) $xmlSheet->headerFooter["alignWithMargins"])) {
1235 1235
                                     $docHeaderFooter->setAlignWithMargins(false);
1236 1236
                                 } else {
1237 1237
                                     $docHeaderFooter->setAlignWithMargins(true);
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
                                     );
1306 1306
                                     foreach ($relsWorksheet->Relationship as $ele) {
1307 1307
                                         if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink") {
1308
-                                            $hyperlinks[(string)$ele["Id"]] = (string)$ele["Target"];
1308
+                                            $hyperlinks[(string) $ele["Id"]] = (string) $ele["Target"];
1309 1309
                                         }
1310 1310
                                     }
1311 1311
                                 }
@@ -1319,18 +1319,18 @@  discard block
 block discarded – undo
1319 1319
                                         foreach (\PHPExcel\Cell::extractAllCellReferencesInRange($hyperlink['ref']) as $cellReference) {
1320 1320
                                             $cell = $docSheet->getCell($cellReference);
1321 1321
                                             if (isset($linkRel['id'])) {
1322
-                                                $hyperlinkUrl = $hyperlinks[ (string)$linkRel['id'] ];
1322
+                                                $hyperlinkUrl = $hyperlinks[(string) $linkRel['id']];
1323 1323
                                                 if (isset($hyperlink['location'])) {
1324 1324
                                                     $hyperlinkUrl .= '#' . (string) $hyperlink['location'];
1325 1325
                                                 }
1326 1326
                                                 $cell->getHyperlink()->setUrl($hyperlinkUrl);
1327 1327
                                             } elseif (isset($hyperlink['location'])) {
1328
-                                                $cell->getHyperlink()->setUrl('sheet://' . (string)$hyperlink['location']);
1328
+                                                $cell->getHyperlink()->setUrl('sheet://' . (string) $hyperlink['location']);
1329 1329
                                             }
1330 1330
 
1331 1331
                                             // Tooltip
1332 1332
                                             if (isset($hyperlink['tooltip'])) {
1333
-                                                $cell->getHyperlink()->setTooltip((string)$hyperlink['tooltip']);
1333
+                                                $cell->getHyperlink()->setTooltip((string) $hyperlink['tooltip']);
1334 1334
                                             }
1335 1335
                                         }
1336 1336
                                     }
@@ -1353,10 +1353,10 @@  discard block
 block discarded – undo
1353 1353
                                     );
1354 1354
                                     foreach ($relsWorksheet->Relationship as $ele) {
1355 1355
                                         if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments") {
1356
-                                            $comments[(string)$ele["Id"]] = (string)$ele["Target"];
1356
+                                            $comments[(string) $ele["Id"]] = (string) $ele["Target"];
1357 1357
                                         }
1358 1358
                                         if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing") {
1359
-                                            $vmlComments[(string)$ele["Id"]] = (string)$ele["Target"];
1359
+                                            $vmlComments[(string) $ele["Id"]] = (string) $ele["Target"];
1360 1360
                                         }
1361 1361
                                     }
1362 1362
                                 }
@@ -1376,15 +1376,15 @@  discard block
 block discarded – undo
1376 1376
 
1377 1377
                                     // Loop through authors
1378 1378
                                     foreach ($commentsFile->authors->author as $author) {
1379
-                                        $authors[] = (string)$author;
1379
+                                        $authors[] = (string) $author;
1380 1380
                                     }
1381 1381
 
1382 1382
                                     // Loop through contents
1383 1383
                                     foreach ($commentsFile->commentList->comment as $comment) {
1384 1384
                                         if (!empty($comment['authorId'])) {
1385
-                                            $docSheet->getComment((string)$comment['ref'])->setAuthor($authors[(string)$comment['authorId']]);
1385
+                                            $docSheet->getComment((string) $comment['ref'])->setAuthor($authors[(string) $comment['authorId']]);
1386 1386
                                         }
1387
-                                        $docSheet->getComment((string)$comment['ref'])->setText($this->parseRichText($comment->text));
1387
+                                        $docSheet->getComment((string) $comment['ref'])->setText($this->parseRichText($comment->text));
1388 1388
                                     }
1389 1389
                                 }
1390 1390
 
@@ -1404,16 +1404,16 @@  discard block
 block discarded – undo
1404 1404
                                         $shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml');
1405 1405
 
1406 1406
                                         if (isset($shape['style'])) {
1407
-                                            $style        = (string)$shape['style'];
1408
-                                            $fillColor    = strtoupper(substr((string)$shape['fillcolor'], 1));
1407
+                                            $style        = (string) $shape['style'];
1408
+                                            $fillColor    = strtoupper(substr((string) $shape['fillcolor'], 1));
1409 1409
                                             $column       = null;
1410 1410
                                             $row          = null;
1411 1411
 
1412 1412
                                             $clientData   = $shape->xpath('.//x:ClientData');
1413 1413
                                             if (is_array($clientData) && !empty($clientData)) {
1414
-                                                $clientData   = $clientData[0];
1414
+                                                $clientData = $clientData[0];
1415 1415
 
1416
-                                                if (isset($clientData['ObjectType']) && (string)$clientData['ObjectType'] == 'Note') {
1416
+                                                if (isset($clientData['ObjectType']) && (string) $clientData['ObjectType'] == 'Note') {
1417 1417
                                                     $temp = $clientData->xpath('.//x:Row');
1418 1418
                                                     if (is_array($temp)) {
1419 1419
                                                         $row = $temp[0];
@@ -1510,14 +1510,14 @@  discard block
 block discarded – undo
1510 1510
                                                 $imageData = $imageData[$idx];
1511 1511
 
1512 1512
                                                 $imageData = $imageData->attributes('urn:schemas-microsoft-com:office:office');
1513
-                                                $style = self::toCSSArray((string)$shape['style']);
1513
+                                                $style = self::toCSSArray((string) $shape['style']);
1514 1514
 
1515 1515
                                                 $hfImages[(string) $shape['id']] = new \PHPExcel\Worksheet\HeaderFooterDrawing();
1516 1516
                                                 if (isset($imageData['title'])) {
1517
-                                                    $hfImages[(string) $shape['id']]->setName((string)$imageData['title']);
1517
+                                                    $hfImages[(string) $shape['id']]->setName((string) $imageData['title']);
1518 1518
                                                 }
1519 1519
 
1520
-                                                $hfImages[(string) $shape['id']]->setPath("zip://".\PHPExcel\Shared_File::realpath($pFilename)."#" . $drawings[(string)$imageData['relid']], false);
1520
+                                                $hfImages[(string) $shape['id']]->setPath("zip://" . \PHPExcel\Shared_File::realpath($pFilename) . "#" . $drawings[(string) $imageData['relid']], false);
1521 1521
                                                 $hfImages[(string) $shape['id']]->setResizeProportional(false);
1522 1522
                                                 $hfImages[(string) $shape['id']]->setWidth($style['width']);
1523 1523
                                                 $hfImages[(string) $shape['id']]->setHeight($style['height']);
@@ -1593,7 +1593,7 @@  discard block
 block discarded – undo
1593 1593
                                                     $objDrawing->setName((string) self::getArrayItem($oneCellAnchor->pic->nvPicPr->cNvPr->attributes(), "name"));
1594 1594
                                                     $objDrawing->setDescription((string) self::getArrayItem($oneCellAnchor->pic->nvPicPr->cNvPr->attributes(), "descr"));
1595 1595
                                                     $objDrawing->setPath(
1596
-                                                        "zip://".\PHPExcel\Shared\File::realpath($pFilename)."#" .
1596
+                                                        "zip://" . \PHPExcel\Shared\File::realpath($pFilename) . "#" .
1597 1597
                                                         $images[(string) self::getArrayItem(
1598 1598
                                                             $blip->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"),
1599 1599
                                                             "embed"
@@ -1640,7 +1640,7 @@  discard block
 block discarded – undo
1640 1640
                                                     $objDrawing->setName((string) self::getArrayItem($twoCellAnchor->pic->nvPicPr->cNvPr->attributes(), "name"));
1641 1641
                                                     $objDrawing->setDescription((string) self::getArrayItem($twoCellAnchor->pic->nvPicPr->cNvPr->attributes(), "descr"));
1642 1642
                                                     $objDrawing->setPath(
1643
-                                                        "zip://".\PHPExcel\Shared\File::realpath($pFilename)."#" .
1643
+                                                        "zip://" . \PHPExcel\Shared\File::realpath($pFilename) . "#" .
1644 1644
                                                         $images[(string) self::getArrayItem(
1645 1645
                                                             $blip->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"),
1646 1646
                                                             "embed"
@@ -1679,7 +1679,7 @@  discard block
 block discarded – undo
1679 1679
                                                     $chartRef       = $graphic->graphicData->children("http://schemas.openxmlformats.org/drawingml/2006/chart")->chart;
1680 1680
                                                     $thisChart      = (string) $chartRef->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships");
1681 1681
 
1682
-                                                    $chartDetails[$docSheet->getTitle().'!'.$thisChart] = array(
1682
+                                                    $chartDetails[$docSheet->getTitle() . '!' . $thisChart] = array(
1683 1683
                                                         'fromCoordinate'    => $fromCoordinate,
1684 1684
                                                         'fromOffsetX'       => $fromOffsetX,
1685 1685
                                                         'fromOffsetY'       => $fromOffsetY,
@@ -1699,25 +1699,25 @@  discard block
 block discarded – undo
1699 1699
                             if ($xmlWorkbook->definedNames) {
1700 1700
                                 foreach ($xmlWorkbook->definedNames->definedName as $definedName) {
1701 1701
                                     // Extract range
1702
-                                    $extractedRange = (string)$definedName;
1702
+                                    $extractedRange = (string) $definedName;
1703 1703
                                     $extractedRange = preg_replace('/\'(\w+)\'\!/', '', $extractedRange);
1704 1704
                                     if (($spos = strpos($extractedRange, '!')) !== false) {
1705
-                                        $extractedRange = substr($extractedRange, 0, $spos).str_replace('$', '', substr($extractedRange, $spos));
1705
+                                        $extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos));
1706 1706
                                     } else {
1707 1707
                                         $extractedRange = str_replace('$', '', $extractedRange);
1708 1708
                                     }
1709 1709
 
1710 1710
                                     // Valid range?
1711
-                                    if (stripos((string)$definedName, '#REF!') !== false || $extractedRange == '') {
1711
+                                    if (stripos((string) $definedName, '#REF!') !== false || $extractedRange == '') {
1712 1712
                                         continue;
1713 1713
                                     }
1714 1714
 
1715 1715
                                     // Some definedNames are only applicable if we are on the same sheet...
1716
-                                    if ((string)$definedName['localSheetId'] != '' && (string)$definedName['localSheetId'] == $sheetId) {
1716
+                                    if ((string) $definedName['localSheetId'] != '' && (string) $definedName['localSheetId'] == $sheetId) {
1717 1717
                                         // Switch on type
1718
-                                        switch ((string)$definedName['name']) {
1718
+                                        switch ((string) $definedName['name']) {
1719 1719
                                             case '_xlnm._FilterDatabase':
1720
-                                                if ((string)$definedName['hidden'] !== '1') {
1720
+                                                if ((string) $definedName['hidden'] !== '1') {
1721 1721
                                                     $extractedRange = explode(',', $extractedRange);
1722 1722
                                                     foreach ($extractedRange as $range) {
1723 1723
                                                         $autoFilterRange = $range;
@@ -1746,10 +1746,10 @@  discard block
 block discarded – undo
1746 1746
                                                 }
1747 1747
                                                 break;
1748 1748
                                             case '_xlnm.Print_Area':
1749
-                                                $rangeSets = explode(',', $extractedRange);        // FIXME: what if sheetname contains comma?
1749
+                                                $rangeSets = explode(',', $extractedRange); // FIXME: what if sheetname contains comma?
1750 1750
                                                 $newRangeSets = array();
1751 1751
                                                 foreach ($rangeSets as $rangeSet) {
1752
-                                                    $range = explode('!', $rangeSet);    // FIXME: what if sheetname contains exclamation mark?
1752
+                                                    $range = explode('!', $rangeSet); // FIXME: what if sheetname contains exclamation mark?
1753 1753
                                                     $rangeSet = isset($range[1]) ? $range[1] : $range[0];
1754 1754
                                                     if (strpos($rangeSet, ':') === false) {
1755 1755
                                                         $rangeSet = $rangeSet . ':' . $rangeSet;
@@ -1774,38 +1774,38 @@  discard block
 block discarded – undo
1774 1774
                         if ($xmlWorkbook->definedNames) {
1775 1775
                             foreach ($xmlWorkbook->definedNames->definedName as $definedName) {
1776 1776
                                 // Extract range
1777
-                                $extractedRange = (string)$definedName;
1777
+                                $extractedRange = (string) $definedName;
1778 1778
                                 $extractedRange = preg_replace('/\'(\w+)\'\!/', '', $extractedRange);
1779 1779
                                 if (($spos = strpos($extractedRange, '!')) !== false) {
1780
-                                    $extractedRange = substr($extractedRange, 0, $spos).str_replace('$', '', substr($extractedRange, $spos));
1780
+                                    $extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos));
1781 1781
                                 } else {
1782 1782
                                     $extractedRange = str_replace('$', '', $extractedRange);
1783 1783
                                 }
1784 1784
 
1785 1785
                                 // Valid range?
1786
-                                if (stripos((string)$definedName, '#REF!') !== false || $extractedRange == '') {
1786
+                                if (stripos((string) $definedName, '#REF!') !== false || $extractedRange == '') {
1787 1787
                                     continue;
1788 1788
                                 }
1789 1789
 
1790 1790
                                 // Some definedNames are only applicable if we are on the same sheet...
1791
-                                if ((string)$definedName['localSheetId'] != '') {
1791
+                                if ((string) $definedName['localSheetId'] != '') {
1792 1792
                                     // Local defined name
1793 1793
                                     // Switch on type
1794
-                                    switch ((string)$definedName['name']) {
1794
+                                    switch ((string) $definedName['name']) {
1795 1795
                                         case '_xlnm._FilterDatabase':
1796 1796
                                         case '_xlnm.Print_Titles':
1797 1797
                                         case '_xlnm.Print_Area':
1798 1798
                                             break;
1799 1799
                                         default:
1800 1800
                                             if ($mapSheetId[(integer) $definedName['localSheetId']] !== null) {
1801
-                                                $range = explode('!', (string)$definedName);
1801
+                                                $range = explode('!', (string) $definedName);
1802 1802
                                                 if (count($range) == 2) {
1803 1803
                                                     $range[0] = str_replace("''", "'", $range[0]);
1804 1804
                                                     $range[0] = str_replace("'", "", $range[0]);
1805 1805
                                                     if ($worksheet = $docSheet->getParent()->getSheetByName($range[0])) {
1806 1806
                                                         $extractedRange = str_replace('$', '', $range[1]);
1807 1807
                                                         $scope = $docSheet->getParent()->getSheet($mapSheetId[(integer) $definedName['localSheetId']]);
1808
-                                                        $excel->addNamedRange(new \PHPExcel\NamedRange((string)$definedName['name'], $worksheet, $extractedRange, true, $scope));
1808
+                                                        $excel->addNamedRange(new \PHPExcel\NamedRange((string) $definedName['name'], $worksheet, $extractedRange, true, $scope));
1809 1809
                                                     }
1810 1810
                                                 }
1811 1811
                                             }
@@ -1815,9 +1815,9 @@  discard block
 block discarded – undo
1815 1815
                                     // "Global" definedNames
1816 1816
                                     $locatedSheet = null;
1817 1817
                                     $extractedSheetName = '';
1818
-                                    if (strpos((string)$definedName, '!') !== false) {
1818
+                                    if (strpos((string) $definedName, '!') !== false) {
1819 1819
                                         // Extract sheet name
1820
-                                        $extractedSheetName = \PHPExcel\Worksheet::extractSheetTitle((string)$definedName, true);
1820
+                                        $extractedSheetName = \PHPExcel\Worksheet::extractSheetTitle((string) $definedName, true);
1821 1821
                                         $extractedSheetName = $extractedSheetName[0];
1822 1822
 
1823 1823
                                         // Locate sheet
@@ -1829,7 +1829,7 @@  discard block
 block discarded – undo
1829 1829
                                     }
1830 1830
 
1831 1831
                                     if ($locatedSheet !== null) {
1832
-                                        $excel->addNamedRange(new \PHPExcel\NamedRange((string)$definedName['name'], $locatedSheet, $extractedRange, false));
1832
+                                        $excel->addNamedRange(new \PHPExcel\NamedRange((string) $definedName['name'], $locatedSheet, $extractedRange, false));
1833 1833
                                     }
1834 1834
                                 }
1835 1835
                             }
@@ -1880,7 +1880,7 @@  discard block
 block discarded – undo
1880 1880
 //                            var_dump($charts[$chartEntryRef]);
1881 1881
 //
1882 1882
                             if (isset($charts[$chartEntryRef])) {
1883
-                                $chartPositionRef = $charts[$chartEntryRef]['sheet'].'!'.$charts[$chartEntryRef]['id'];
1883
+                                $chartPositionRef = $charts[$chartEntryRef]['sheet'] . '!' . $charts[$chartEntryRef]['id'];
1884 1884
 //                                echo 'Position Ref ', $chartPositionRef, '<br />';
1885 1885
                                 if (isset($chartDetails[$chartPositionRef])) {
1886 1886
 //                                    var_dump($chartDetails[$chartPositionRef]);
@@ -1904,17 +1904,17 @@  discard block
 block discarded – undo
1904 1904
     private static function readColor($color, $background = false)
1905 1905
     {
1906 1906
         if (isset($color["rgb"])) {
1907
-            return (string)$color["rgb"];
1907
+            return (string) $color["rgb"];
1908 1908
         } elseif (isset($color["indexed"])) {
1909
-            return \PHPExcel\Style\Color::indexedColor($color["indexed"]-7, $background)->getARGB();
1909
+            return \PHPExcel\Style\Color::indexedColor($color["indexed"] - 7, $background)->getARGB();
1910 1910
         } elseif (isset($color["theme"])) {
1911 1911
             if (self::$theme !== null) {
1912
-                $returnColour = self::$theme->getColourByIndex((int)$color["theme"]);
1912
+                $returnColour = self::$theme->getColourByIndex((int) $color["theme"]);
1913 1913
                 if (isset($color["tint"])) {
1914 1914
                     $tintAdjust = (float) $color["tint"];
1915 1915
                     $returnColour = \PHPExcel\Style\Color::changeBrightness($returnColour, $tintAdjust);
1916 1916
                 }
1917
-                return 'FF'.$returnColour;
1917
+                return 'FF' . $returnColour;
1918 1918
             }
1919 1919
         }
1920 1920
 
@@ -1953,11 +1953,11 @@  discard block
 block discarded – undo
1953 1953
             if (isset($style->font->u) && !isset($style->font->u["val"])) {
1954 1954
                 $docStyle->getFont()->setUnderline(\PHPExcel\Style\Font::UNDERLINE_SINGLE);
1955 1955
             } elseif (isset($style->font->u) && isset($style->font->u["val"])) {
1956
-                $docStyle->getFont()->setUnderline((string)$style->font->u["val"]);
1956
+                $docStyle->getFont()->setUnderline((string) $style->font->u["val"]);
1957 1957
             }
1958 1958
 
1959 1959
             if (isset($style->font->vertAlign) && isset($style->font->vertAlign["val"])) {
1960
-                $vertAlign = strtolower((string)$style->font->vertAlign["val"]);
1960
+                $vertAlign = strtolower((string) $style->font->vertAlign["val"]);
1961 1961
                 if ($vertAlign == 'superscript') {
1962 1962
                     $docStyle->getFont()->setSuperScript(true);
1963 1963
                 }
@@ -1979,7 +1979,7 @@  discard block
 block discarded – undo
1979 1979
                 $docStyle->getFill()->getStartColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath("sml:stop[@position=0]"))->color));
1980 1980
                 $docStyle->getFill()->getEndColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath("sml:stop[@position=1]"))->color));
1981 1981
             } elseif ($style->fill->patternFill) {
1982
-                $patternType = (string)$style->fill->patternFill["patternType"] != '' ? (string)$style->fill->patternFill["patternType"] : 'solid';
1982
+                $patternType = (string) $style->fill->patternFill["patternType"] != '' ? (string) $style->fill->patternFill["patternType"] : 'solid';
1983 1983
                 $docStyle->getFill()->setFillType($patternType);
1984 1984
                 if ($style->fill->patternFill->fgColor) {
1985 1985
                     $docStyle->getFill()->getStartColor()->setARGB(self::readColor($style->fill->patternFill->fgColor, true));
@@ -2018,17 +2018,17 @@  discard block
 block discarded – undo
2018 2018
             $docStyle->getAlignment()->setVertical((string) $style->alignment["vertical"]);
2019 2019
 
2020 2020
             $textRotation = 0;
2021
-            if ((int)$style->alignment["textRotation"] <= 90) {
2022
-                $textRotation = (int)$style->alignment["textRotation"];
2023
-            } elseif ((int)$style->alignment["textRotation"] > 90) {
2024
-                $textRotation = 90 - (int)$style->alignment["textRotation"];
2021
+            if ((int) $style->alignment["textRotation"] <= 90) {
2022
+                $textRotation = (int) $style->alignment["textRotation"];
2023
+            } elseif ((int) $style->alignment["textRotation"] > 90) {
2024
+                $textRotation = 90 - (int) $style->alignment["textRotation"];
2025 2025
             }
2026 2026
 
2027 2027
             $docStyle->getAlignment()->setTextRotation(intval($textRotation));
2028 2028
             $docStyle->getAlignment()->setWrapText(self::boolean((string) $style->alignment["wrapText"]));
2029 2029
             $docStyle->getAlignment()->setShrinkToFit(self::boolean((string) $style->alignment["shrinkToFit"]));
2030
-            $docStyle->getAlignment()->setIndent(intval((string)$style->alignment["indent"]) > 0 ? intval((string)$style->alignment["indent"]) : 0);
2031
-            $docStyle->getAlignment()->setReadorder(intval((string)$style->alignment["readingOrder"]) > 0 ? intval((string)$style->alignment["readingOrder"]) : 0);
2030
+            $docStyle->getAlignment()->setIndent(intval((string) $style->alignment["indent"]) > 0 ? intval((string) $style->alignment["indent"]) : 0);
2031
+            $docStyle->getAlignment()->setReadorder(intval((string) $style->alignment["readingOrder"]) > 0 ? intval((string) $style->alignment["readingOrder"]) : 0);
2032 2032
         }
2033 2033
 
2034 2034
         // protection
@@ -2098,7 +2098,7 @@  discard block
 block discarded – undo
2098 2098
                             $objText->getFont()->setItalic(true);
2099 2099
                         }
2100 2100
                         if (isset($run->rPr->vertAlign) && isset($run->rPr->vertAlign["val"])) {
2101
-                            $vertAlign = strtolower((string)$run->rPr->vertAlign["val"]);
2101
+                            $vertAlign = strtolower((string) $run->rPr->vertAlign["val"]);
2102 2102
                             if ($vertAlign == 'superscript') {
2103 2103
                                 $objText->getFont()->setSuperScript(true);
2104 2104
                             }
@@ -2109,7 +2109,7 @@  discard block
 block discarded – undo
2109 2109
                         if (isset($run->rPr->u) && !isset($run->rPr->u["val"])) {
2110 2110
                             $objText->getFont()->setUnderline(\PHPExcel\Style\Font::UNDERLINE_SINGLE);
2111 2111
                         } elseif (isset($run->rPr->u) && isset($run->rPr->u["val"])) {
2112
-                            $objText->getFont()->setUnderline((string)$run->rPr->u["val"]);
2112
+                            $objText->getFont()->setUnderline((string) $run->rPr->u["val"]);
2113 2113
                         }
2114 2114
                         if ((isset($run->rPr->strike["val"]) && self::boolean((string) $run->rPr->strike["val"])) ||
2115 2115
                             (isset($run->rPr->strike) && !isset($run->rPr->strike["val"]))) {
@@ -2146,8 +2146,8 @@  discard block
 block discarded – undo
2146 2146
                 foreach ($UIRels->Relationship as $ele) {
2147 2147
                     if ($ele["Type"] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image') {
2148 2148
                         // an image ?
2149
-                        $customUIImagesNames[(string) $ele['Id']] = (string)$ele['Target'];
2150
-                        $customUIImagesBinaries[(string)$ele['Target']] = $this->getFromZipArchive($zip, $baseDir . '/' . (string) $ele['Target']);
2149
+                        $customUIImagesNames[(string) $ele['Id']] = (string) $ele['Target'];
2150
+                        $customUIImagesBinaries[(string) $ele['Target']] = $this->getFromZipArchive($zip, $baseDir . '/' . (string) $ele['Target']);
2151 2151
                     }
2152 2152
                 }
2153 2153
             }
@@ -2177,7 +2177,7 @@  discard block
 block discarded – undo
2177 2177
 
2178 2178
     private static function toCSSArray($style)
2179 2179
     {
2180
-        $style = str_replace(array("\r","\n"), "", $style);
2180
+        $style = str_replace(array("\r", "\n"), "", $style);
2181 2181
 
2182 2182
         $temp = explode(';', $style);
2183 2183
         $style = array();
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Excel2007/Chart.php 2 patches
Doc Comments   +14 added lines patch added patch discarded remove patch
@@ -29,6 +29,10 @@  discard block
 block discarded – undo
29 29
  */
30 30
 class Chart
31 31
 {
32
+    /**
33
+     * @param string $name
34
+     * @param string $format
35
+     */
32 36
     private static function getAttribute($component, $name, $format)
33 37
     {
34 38
         $attributes = $component->attributes();
@@ -56,6 +60,10 @@  discard block
 block discarded – undo
56 60
         }
57 61
     }
58 62
 
63
+    /**
64
+     * @param \SimpleXMLElement $chartElements
65
+     * @param string $chartName
66
+     */
59 67
     public static function readChart($chartElements, $chartName)
60 68
     {
61 69
         $namespacesChartMeta = $chartElements->getNamespaces(true);
@@ -198,6 +206,9 @@  discard block
 block discarded – undo
198 206
         return $chart;
199 207
     }
200 208
 
209
+    /**
210
+     * @param string $type
211
+     */
201 212
     private static function chartTitle($titleDetails, $namespacesChartMeta, $type)
202 213
     {
203 214
         $caption = array();
@@ -484,6 +495,9 @@  discard block
 block discarded – undo
484 495
         return $plotAttributes;
485 496
     }
486 497
 
498
+    /**
499
+     * @param \PHPExcel\Chart\Layout $plotArea
500
+     */
487 501
     private static function setChartAttributes($plotArea, $plotAttributes)
488 502
     {
489 503
         foreach ($plotAttributes as $plotAttributeKey => $plotAttributeValue) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,9 +50,9 @@
 block discarded – undo
50 50
     private static function readColor($color, $background = false)
51 51
     {
52 52
         if (isset($color["rgb"])) {
53
-            return (string)$color["rgb"];
53
+            return (string) $color["rgb"];
54 54
         } elseif (isset($color["indexed"])) {
55
-            return \PHPExcel\Style\Color::indexedColor($color["indexed"]-7, $background)->getARGB();
55
+            return \PHPExcel\Style\Color::indexedColor($color["indexed"] - 7, $background)->getARGB();
56 56
         }
57 57
     }
58 58
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Excel5.php 2 patches
Doc Comments   +16 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1211,7 +1211,7 @@  discard block
 block discarded – undo
1211 1211
      *
1212 1212
      * @param string $data   Data stream to read from
1213 1213
      * @param int    $pos    Position to start reading from
1214
-     * @param int    $length Record data length
1214
+     * @param integer $len
1215 1215
      *
1216 1216
      * @return string Record data
1217 1217
      */
@@ -1754,6 +1754,7 @@  discard block
 block discarded – undo
1754 1754
      * @var int    $block      Block for which to create decrypto
1755 1755
      * @var string $valContext MD5 context state
1756 1756
      *
1757
+     * @param string $valContext
1757 1758
      * @return Excel5\RC4
1758 1759
      */
1759 1760
     private function makeKey($block, $valContext)
@@ -1788,6 +1789,11 @@  discard block
 block discarded – undo
1788 1789
      * @var string $hashedsalt_data Hashed salt data
1789 1790
      * @var string &$valContext     Set to the MD5 context of the value
1790 1791
      *
1792
+     * @param string $password
1793
+     * @param string $docid
1794
+     * @param string $salt_data
1795
+     * @param string $hashedsalt_data
1796
+     * @param string $valContext
1791 1797
      * @return bool Success
1792 1798
      */
1793 1799
     private function verifyPassword($password, $docid, $salt_data, $hashedsalt_data, &$valContext)
@@ -5227,7 +5233,7 @@  discard block
 block discarded – undo
5227 5233
      * is in one piece.
5228 5234
      * Moves to next current position in data stream to start of next record different from a CONtINUE record
5229 5235
      *
5230
-     * @return array
5236
+     * @return integer|null
5231 5237
      */
5232 5238
     private function getSplicedRecordData()
5233 5239
     {
@@ -5331,8 +5337,7 @@  discard block
 block discarded – undo
5331 5337
      * Take array of tokens together with additional data for formula and return human readable formula
5332 5338
      *
5333 5339
      * @param array $tokens
5334
-     * @param array $additionalData Additional binary data going with the formula
5335
-     * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas
5340
+     * @param string $additionalData Additional binary data going with the formula
5336 5341
      * @return string Human readable formula
5337 5342
      */
5338 5343
     private function createFormulaFromTokens($tokens, $additionalData)
@@ -5496,7 +5501,8 @@  discard block
 block discarded – undo
5496 5501
      *
5497 5502
      * @param string Formula data
5498 5503
      * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas
5499
-     * @return array
5504
+     * @param string $formulaData
5505
+     * @return string
5500 5506
      * @throws Exception
5501 5507
      */
5502 5508
     private function getNextToken($formulaData, $baseCell = 'A1')
@@ -7070,7 +7076,7 @@  discard block
 block discarded – undo
7070 7076
      * section 2.5.15
7071 7077
      *
7072 7078
      * @param string $subData
7073
-     * @return array
7079
+     * @return string
7074 7080
      */
7075 7081
     private function readBIFF8CellRangeAddressList($subData)
7076 7082
     {
@@ -7463,6 +7469,9 @@  discard block
 block discarded – undo
7463 7469
     }
7464 7470
 
7465 7471
 
7472
+    /**
7473
+     * @param integer $rknum
7474
+     */
7466 7475
     private static function getIEEE754($rknum)
7467 7476
     {
7468 7477
         if (($rknum & 0x02) != 0) {
@@ -7493,7 +7502,7 @@  discard block
 block discarded – undo
7493 7502
      * Get UTF-8 string from (compressed or uncompressed) UTF-16 string
7494 7503
      *
7495 7504
      * @param string $string
7496
-     * @param bool $compressed
7505
+     * @param string|boolean $compressed
7497 7506
      * @return string
7498 7507
      */
7499 7508
     private static function encodeUTF16($string, $compressed = '')
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -459,8 +459,8 @@  discard block
 block discarded – undo
459 459
         // total byte size of Excel data (workbook global substream + sheet substreams)
460 460
         $this->dataSize = strlen($this->data);
461 461
 
462
-        $this->pos        = 0;
463
-        $this->sheets    = array();
462
+        $this->pos = 0;
463
+        $this->sheets = array();
464 464
 
465 465
         // Parse Workbook Global Substream
466 466
         while ($this->pos < $this->dataSize) {
@@ -1126,7 +1126,7 @@  discard block
 block discarded – undo
1126 1126
                             // $range should look like one of these
1127 1127
                             //        Foo!$C$7:$J$66
1128 1128
                             //        Bar!$A$1:$IV$2
1129
-                            $explodes = explode('!', $range);    // FIXME: what if sheetname contains exclamation mark?
1129
+                            $explodes = explode('!', $range); // FIXME: what if sheetname contains exclamation mark?
1130 1130
                             $sheetName = trim($explodes[0], "'");
1131 1131
                             if (count($explodes) == 2) {
1132 1132
                                 if (strpos($explodes[1], ':') === false) {
@@ -1309,7 +1309,7 @@  discard block
 block discarded – undo
1309 1309
         $secLength = self::getInt4d($this->summaryInformation, $secOffset);
1310 1310
 
1311 1311
         // offset: $secOffset+4; size: 4; property count
1312
-        $countProperties = self::getInt4d($this->summaryInformation, $secOffset+4);
1312
+        $countProperties = self::getInt4d($this->summaryInformation, $secOffset + 4);
1313 1313
 
1314 1314
         // initialize code page (used to resolve string values)
1315 1315
         $codePage = 'CP1252';
@@ -1318,11 +1318,11 @@  discard block
 block discarded – undo
1318 1318
         // loop through property decarations and properties
1319 1319
         for ($i = 0; $i < $countProperties; ++$i) {
1320 1320
             // offset: ($secOffset+8) + (8 * $i); size: 4; property ID
1321
-            $id = self::getInt4d($this->summaryInformation, ($secOffset+8) + (8 * $i));
1321
+            $id = self::getInt4d($this->summaryInformation, ($secOffset + 8) + (8 * $i));
1322 1322
 
1323 1323
             // Use value of property id as appropriate
1324 1324
             // offset: ($secOffset+12) + (8 * $i); size: 4; offset from beginning of section (48)
1325
-            $offset = self::getInt4d($this->summaryInformation, ($secOffset+12) + (8 * $i));
1325
+            $offset = self::getInt4d($this->summaryInformation, ($secOffset + 12) + (8 * $i));
1326 1326
 
1327 1327
             $type = self::getInt4d($this->summaryInformation, $secOffset + $offset);
1328 1328
 
@@ -1447,7 +1447,7 @@  discard block
 block discarded – undo
1447 1447
 //        echo '$secLength = ', $secLength,'<br />';
1448 1448
 
1449 1449
         //    offset: $secOffset+4;    size: 4;    property count
1450
-        $countProperties = self::getInt4d($this->documentSummaryInformation, $secOffset+4);
1450
+        $countProperties = self::getInt4d($this->documentSummaryInformation, $secOffset + 4);
1451 1451
 //        echo '$countProperties = ', $countProperties,'<br />';
1452 1452
 
1453 1453
         // initialize code page (used to resolve string values)
@@ -1458,12 +1458,12 @@  discard block
 block discarded – undo
1458 1458
         for ($i = 0; $i < $countProperties; ++$i) {
1459 1459
 //            echo 'Property ', $i,'<br />';
1460 1460
             //    offset: ($secOffset+8) + (8 * $i);    size: 4;    property ID
1461
-            $id = self::getInt4d($this->documentSummaryInformation, ($secOffset+8) + (8 * $i));
1461
+            $id = self::getInt4d($this->documentSummaryInformation, ($secOffset + 8) + (8 * $i));
1462 1462
 //            echo 'ID is ', $id,'<br />';
1463 1463
 
1464 1464
             // Use value of property id as appropriate
1465 1465
             // offset: 60 + 8 * $i;    size: 4;    offset from beginning of section (48)
1466
-            $offset = self::getInt4d($this->documentSummaryInformation, ($secOffset+12) + (8 * $i));
1466
+            $offset = self::getInt4d($this->documentSummaryInformation, ($secOffset + 12) + (8 * $i));
1467 1467
 
1468 1468
             $type = self::getInt4d($this->documentSummaryInformation, $secOffset + $offset);
1469 1469
 //            echo 'Type is ', $type,', ';
@@ -1621,7 +1621,7 @@  discard block
 block discarded – undo
1621 1621
                 //    Concatenate this extension with the currently set comment for the cell
1622 1622
                 $comment = $this->phpSheet->getComment($cellAddress);
1623 1623
                 $commentText = $comment->getText()->getPlainText();
1624
-                $comment->setText($this->parseRichText($commentText.$noteText));
1624
+                $comment->setText($this->parseRichText($commentText . $noteText));
1625 1625
             } else {
1626 1626
                 //    Set comment for the cell
1627 1627
                 $this->phpSheet->getComment($cellAddress)->setText($this->parseRichText($noteText));
@@ -1660,7 +1660,7 @@  discard block
 block discarded – undo
1660 1660
         $text       = $this->getSplicedRecordData();
1661 1661
 
1662 1662
         $this->textObjects[$this->textObjRef] = array(
1663
-            'text'      => substr($text["recordData"], $text["spliceOffsets"][0]+1, $cchText),
1663
+            'text'      => substr($text["recordData"], $text["spliceOffsets"][0] + 1, $cchText),
1664 1664
             'format'    => substr($text["recordData"], $text["spliceOffsets"][1], $cbRuns),
1665 1665
             'alignment' => $grbitOpts,
1666 1666
             'rotation'  => $rot
@@ -2876,7 +2876,7 @@  discard block
 block discarded – undo
2876 2876
             ++$pos;
2877 2877
 
2878 2878
             // bit: 0; mask: 0x01; 0 = compressed; 1 = uncompressed
2879
-            $isCompressed = (($optionFlags & 0x01) == 0) ;
2879
+            $isCompressed = (($optionFlags & 0x01) == 0);
2880 2880
 
2881 2881
             // bit: 2; mask: 0x02; 0 = ordinary; 1 = Asian phonetic
2882 2882
             $hasAsian = (($optionFlags & 0x04) != 0);
@@ -3390,7 +3390,7 @@  discard block
 block discarded – undo
3390 3390
 
3391 3391
         // bit 0, mask 0x01; 1 = sheet is protected
3392 3392
         $bool = (0x01 & self::getInt2d($recordData, 0)) >> 0;
3393
-        $this->phpSheet->getProtection()->setSheet((bool)$bool);
3393
+        $this->phpSheet->getProtection()->setSheet((bool) $bool);
3394 3394
     }
3395 3395
 
3396 3396
 
@@ -3414,7 +3414,7 @@  discard block
 block discarded – undo
3414 3414
         // bit: 0, mask 0x01; 1 = scenarios are protected
3415 3415
         $bool = (0x01 & self::getInt2d($recordData, 0)) >> 0;
3416 3416
 
3417
-        $this->phpSheet->getProtection()->setScenarios((bool)$bool);
3417
+        $this->phpSheet->getProtection()->setScenarios((bool) $bool);
3418 3418
     }
3419 3419
 
3420 3420
 
@@ -3438,7 +3438,7 @@  discard block
 block discarded – undo
3438 3438
         // bit: 0, mask 0x01; 1 = objects are protected
3439 3439
         $bool = (0x01 & self::getInt2d($recordData, 0)) >> 0;
3440 3440
 
3441
-        $this->phpSheet->getProtection()->setObjects((bool)$bool);
3441
+        $this->phpSheet->getProtection()->setObjects((bool) $bool);
3442 3442
     }
3443 3443
 
3444 3444
 
@@ -3874,7 +3874,7 @@  discard block
 block discarded – undo
3874 3874
             // get the base cell, grab tExp token
3875 3875
             $baseRow = self::getInt2d($formulaStructure, 3);
3876 3876
             $baseCol = self::getInt2d($formulaStructure, 5);
3877
-            $this->_baseCell = \PHPExcel\Cell::stringFromColumnIndex($baseCol). ($baseRow + 1);
3877
+            $this->_baseCell = \PHPExcel\Cell::stringFromColumnIndex($baseCol) . ($baseRow + 1);
3878 3878
         }
3879 3879
 
3880 3880
         // Read cell?
@@ -4303,7 +4303,7 @@  discard block
 block discarded – undo
4303 4303
         $this->frozen = (bool) ((0x0008 & $options) >> 3);
4304 4304
 
4305 4305
         // bit: 6; mask: 0x0040; 0 = columns from left to right, 1 = columns from right to left
4306
-        $this->phpSheet->setRightToLeft((bool)((0x0040 & $options) >> 6));
4306
+        $this->phpSheet->setRightToLeft((bool) ((0x0040 & $options) >> 6));
4307 4307
 
4308 4308
         // bit: 10; mask: 0x0400; 0 = sheet not active, 1 = sheet active
4309 4309
         $isActive = (bool) ((0x0400 & $options) >> 10);
@@ -4878,9 +4878,9 @@  discard block
 block discarded – undo
4878 4878
                 $objValidation = $this->phpSheet->getCell($coordinate)->getDataValidation();
4879 4879
                 $objValidation->setType($type);
4880 4880
                 $objValidation->setErrorStyle($errorStyle);
4881
-                $objValidation->setAllowBlank((bool)$allowBlank);
4882
-                $objValidation->setShowInputMessage((bool)$showInputMessage);
4883
-                $objValidation->setShowErrorMessage((bool)$showErrorMessage);
4881
+                $objValidation->setAllowBlank((bool) $allowBlank);
4882
+                $objValidation->setShowInputMessage((bool) $showInputMessage);
4883
+                $objValidation->setShowErrorMessage((bool) $showErrorMessage);
4884 4884
                 $objValidation->setShowDropDown(!$suppressDropDown);
4885 4885
                 $objValidation->setOperator($operator);
4886 4886
                 $objValidation->setErrorTitle($errorTitle);
@@ -5706,7 +5706,7 @@  discard block
 block discarded – undo
5706 5706
                 $name = 'tNum';
5707 5707
                 $size = 9;
5708 5708
                 $data = self::extractNumber(substr($formulaData, 1));
5709
-                $data = str_replace(',', '.', (string)$data); // in case non-English locale
5709
+                $data = str_replace(',', '.', (string) $data); // in case non-English locale
5710 5710
                 break;
5711 5711
             case 0x20:    //    array constant
5712 5712
             case 0x40:
@@ -7476,7 +7476,7 @@  discard block
 block discarded – undo
7476 7476
             $sign = ($rknum & 0x80000000) >> 31;
7477 7477
             $exp = ($rknum & 0x7ff00000) >> 20;
7478 7478
             $mantissa = (0x100000 | ($rknum & 0x000ffffc));
7479
-            $value = $mantissa / pow(2, (20- ($exp - 1023)));
7479
+            $value = $mantissa / pow(2, (20 - ($exp - 1023)));
7480 7480
             if ($sign) {
7481 7481
                 $value = -1 * $value;
7482 7482
             }
@@ -7545,7 +7545,7 @@  discard block
 block discarded – undo
7545 7545
      */
7546 7546
     public static function getInt2d($data, $pos)
7547 7547
     {
7548
-        return ord($data[$pos]) | (ord($data[$pos+1]) << 8);
7548
+        return ord($data[$pos]) | (ord($data[$pos + 1]) << 8);
7549 7549
     }
7550 7550
 
7551 7551
 
@@ -7568,7 +7568,7 @@  discard block
 block discarded – undo
7568 7568
         } else {
7569 7569
             $_ord_24 = ($_or_24 & 127) << 24;
7570 7570
         }
7571
-        return ord($data[$pos]) | (ord($data[$pos+1]) << 8) | (ord($data[$pos+2]) << 16) | $_ord_24;
7571
+        return ord($data[$pos]) | (ord($data[$pos + 1]) << 8) | (ord($data[$pos + 2]) << 16) | $_ord_24;
7572 7572
     }
7573 7573
 
7574 7574
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Excel5/Color.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -9,6 +9,7 @@
 block discarded – undo
9 9
      *
10 10
      * @param int $color Indexed color
11 11
      * @param array $palette Color palette
12
+     * @param integer $version
12 13
      * @return array RGB color value, example: array('rgb' => 'FF0000')
13 14
      */
14 15
     public static function map($color, $palette, $version)
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Excel5/MD5.php 2 patches
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -190,6 +190,11 @@
 block discarded – undo
190 190
         return ($Y ^ ($X | (~ $Z))) ; // Y XOR (X OR NOT Z)
191 191
     }
192 192
 
193
+    /**
194
+     * @param string[] $func
195
+     * @param integer $s
196
+     * @param integer $t
197
+     */
193 198
     private static function step($func, &$A, $B, $C, $D, $M, $s, $t)
194 199
     {
195 200
         $A = ($A + call_user_func($func, $B, $C, $D) + $M + $t) & 0xffffffff;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
         $C = $this->c;
88 88
         $D = $this->d;
89 89
 
90
-        $F = ['self','f'];
91
-        $G = ['self','g'];
92
-        $H = ['self','h'];
93
-        $I = ['self','i'];
90
+        $F = ['self', 'f'];
91
+        $G = ['self', 'g'];
92
+        $H = ['self', 'h'];
93
+        $I = ['self', 'i'];
94 94
 
95 95
         /* ROUND 1 */
96 96
         self::step($F, $A, $B, $C, $D, $words[0], 7, 0xd76aa478);
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
     private static function i($X, $Y, $Z)
189 189
     {
190
-        return ($Y ^ ($X | (~ $Z))) ; // Y XOR (X OR NOT Z)
190
+        return ($Y ^ ($X | (~ $Z))); // Y XOR (X OR NOT Z)
191 191
     }
192 192
 
193 193
     private static function step($func, &$A, $B, $C, $D, $M, $s, $t)
@@ -200,6 +200,6 @@  discard block
 block discarded – undo
200 200
     private static function rotate($decimal, $bits)
201 201
     {
202 202
         $binary = str_pad(decbin($decimal), 32, "0", STR_PAD_LEFT);
203
-        return bindec(substr($binary, $bits).substr($binary, 0, $bits));
203
+        return bindec(substr($binary, $bits) . substr($binary, 0, $bits));
204 204
     }
205 205
 }
Please login to merge, or discard this patch.