Completed
Push — develop ( aa97bb...91573b )
by
unknown
09:37
created
src/PhpSpreadsheet/Writer/Excel5/Workbook.php 2 patches
Doc Comments   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -192,7 +192,9 @@  discard block
 block discarded – undo
192 192
      * @param int        &$str_unique    Total number of unique strings
193 193
      * @param array        &$str_table        String Table
194 194
      * @param array        &$colors        Colour Table
195
-     * @param mixed        $parser            The formula parser created for the Workbook
195
+     * @param Parser        $parser            The formula parser created for the Workbook
196
+     * @param integer $str_total
197
+     * @param integer $str_unique
196 198
      */
197 199
     public function __construct(\PHPExcel\Spreadsheet $phpExcel, &$str_total, &$str_unique, &$str_table, &$colors, $parser)
198 200
     {
@@ -792,7 +794,7 @@  discard block
 block discarded – undo
792 794
      *
793 795
      * @param    string        $name            The name in UTF-8
794 796
      * @param    string        $formulaData    The binary formula data
795
-     * @param    string        $sheetIndex        1-based sheet index the defined name applies to. 0 = global
797
+     * @param    integer        $sheetIndex        1-based sheet index the defined name applies to. 0 = global
796 798
      * @param    boolean        $isBuiltIn        Built-in name?
797 799
      * @return    string    Complete binary record data
798 800
      */
Please login to merge, or discard this patch.
Spacing   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         // It needs to call its parent's constructor explicitly
200 200
         parent::__construct();
201 201
 
202
-        $this->parser        = $parser;
202
+        $this->parser = $parser;
203 203
         $this->biffSize     = 0;
204 204
         $this->palette      = array();
205 205
         $this->countryCode = -1;
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         $this->stringTotal      = &$str_total;
208 208
         $this->stringUnique     = &$str_unique;
209 209
         $this->stringTable      = &$str_table;
210
-        $this->colors        = &$colors;
210
+        $this->colors = &$colors;
211 211
         $this->setPaletteXl97();
212 212
 
213 213
         $this->phpExcel = $phpExcel;
@@ -221,11 +221,11 @@  discard block
 block discarded – undo
221 221
         for ($i = 0; $i < $countSheets; ++$i) {
222 222
             $phpSheet = $phpExcel->getSheet($i);
223 223
 
224
-            $this->parser->setExtSheet($phpSheet->getTitle(), $i);  // Register worksheet name with parser
224
+            $this->parser->setExtSheet($phpSheet->getTitle(), $i); // Register worksheet name with parser
225 225
 
226 226
             $supbook_index = 0x00;
227 227
             $ref = pack('vvv', $supbook_index, $i, $i);
228
-            $this->parser->references[] = $ref;  // Register reference with parser
228
+            $this->parser->references[] = $ref; // Register reference with parser
229 229
 
230 230
             // Sheet tab colors?
231 231
             if ($phpSheet->isTabColorSet()) {
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
      */
473 473
     private function calcSheetOffsets()
474 474
     {
475
-        $boundsheet_length = 10;  // fixed length for a BOUNDSHEET record
475
+        $boundsheet_length = 10; // fixed length for a BOUNDSHEET record
476 476
 
477 477
         // size of Workbook globals part 1 + 3
478 478
         $offset            = $this->_datasize;
@@ -836,9 +836,9 @@  discard block
 block discarded – undo
836 836
         $record = 0x0018;
837 837
 
838 838
         // option flags
839
-        $options = ($isHidden  ? 0x21 : 0x00);
839
+        $options = ($isHidden ? 0x21 : 0x00);
840 840
 
841
-        $extra  = pack(
841
+        $extra = pack(
842 842
             'Cvvvvv',
843 843
             0x3B,
844 844
             $sheetIndex - 1,
@@ -866,9 +866,9 @@  discard block
 block discarded – undo
866 866
      */
867 867
     private function writeCodepage()
868 868
     {
869
-        $record = 0x0042;             // Record identifier
870
-        $length = 0x0002;             // Number of bytes to follow
871
-        $cv  = $this->codepage;   // The code page
869
+        $record = 0x0042; // Record identifier
870
+        $length = 0x0002; // Number of bytes to follow
871
+        $cv = $this->codepage; // The code page
872 872
 
873 873
         $header = pack('vv', $record, $length);
874 874
         $data   = pack('v', $cv);
@@ -881,24 +881,24 @@  discard block
 block discarded – undo
881 881
      */
882 882
     private function writeWindow1()
883 883
     {
884
-        $record = 0x003D;   // Record identifier
885
-        $length = 0x0012;   // Number of bytes to follow
884
+        $record = 0x003D; // Record identifier
885
+        $length = 0x0012; // Number of bytes to follow
886 886
 
887
-        $xWn  = 0x0000;     // Horizontal position of window
888
-        $yWn  = 0x0000;     // Vertical position of window
889
-        $dxWn = 0x25BC;     // Width of window
890
-        $dyWn = 0x1572;     // Height of window
887
+        $xWn  = 0x0000; // Horizontal position of window
888
+        $yWn  = 0x0000; // Vertical position of window
889
+        $dxWn = 0x25BC; // Width of window
890
+        $dyWn = 0x1572; // Height of window
891 891
 
892
-        $grbit = 0x0038;    // Option flags
892
+        $grbit = 0x0038; // Option flags
893 893
 
894 894
         // not supported by PHPExcel, so there is only one selected sheet, the active
895
-        $ctabsel = 1;       // Number of workbook tabs selected
895
+        $ctabsel = 1; // Number of workbook tabs selected
896 896
 
897
-        $wTabRatio = 0x0258;    // Tab to scrollbar ratio
897
+        $wTabRatio = 0x0258; // Tab to scrollbar ratio
898 898
 
899 899
         // not supported by PHPExcel, set to 0
900
-        $itabFirst = 0;     // 1st displayed worksheet
901
-        $itabCur   = $this->phpExcel->getActiveSheetIndex();    // Active worksheet
900
+        $itabFirst = 0; // 1st displayed worksheet
901
+        $itabCur   = $this->phpExcel->getActiveSheetIndex(); // Active worksheet
902 902
 
903 903
         $header = pack("vv", $record, $length);
904 904
         $data   = pack("vvvvvvvvv", $xWn, $yWn, $dxWn, $dyWn, $grbit, $itabCur, $itabFirst, $ctabsel, $wTabRatio);
@@ -914,7 +914,7 @@  discard block
 block discarded – undo
914 914
     private function writeBoundSheet($sheet, $offset)
915 915
     {
916 916
         $sheetname = $sheet->getTitle();
917
-        $record    = 0x0085;                    // Record identifier
917
+        $record    = 0x0085; // Record identifier
918 918
 
919 919
         // sheet state
920 920
         switch ($sheet->getSheetState()) {
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
         // sheet type
936 936
         $st = 0x00;
937 937
 
938
-        $grbit = 0x0000;                    // Visibility and sheet type
938
+        $grbit = 0x0000; // Visibility and sheet type
939 939
 
940 940
         $data = pack("VCC", $offset, $ss, $st);
941 941
         $data .= \PHPExcel\Shared\StringHelper::UTF8toBIFF8UnicodeShort($sheetname);
@@ -950,8 +950,8 @@  discard block
 block discarded – undo
950 950
      */
951 951
     private function writeSupbookInternal()
952 952
     {
953
-        $record    = 0x01AE;   // Record identifier
954
-        $length    = 0x0004;   // Bytes to follow
953
+        $record    = 0x01AE; // Record identifier
954
+        $length    = 0x0004; // Bytes to follow
955 955
 
956 956
         $header    = pack("vv", $record, $length);
957 957
         $data      = pack("vv", $this->phpExcel->getSheetCount(), 0x0401);
@@ -966,10 +966,10 @@  discard block
 block discarded – undo
966 966
     private function writeExternalsheetBiff8()
967 967
     {
968 968
         $totalReferences = count($this->parser->references);
969
-        $record = 0x0017;                     // Record identifier
970
-        $length = 2 + 6 * $totalReferences;  // Number of bytes to follow
969
+        $record = 0x0017; // Record identifier
970
+        $length = 2 + 6 * $totalReferences; // Number of bytes to follow
971 971
 
972
-        $supbook_index = 0;           // FIXME: only using internal SUPBOOK record
972
+        $supbook_index = 0; // FIXME: only using internal SUPBOOK record
973 973
         $header = pack("vv", $record, $length);
974 974
         $data   = pack('v', $totalReferences);
975 975
         for ($i = 0; $i < $totalReferences; ++$i) {
@@ -983,12 +983,12 @@  discard block
 block discarded – undo
983 983
      */
984 984
     private function writeStyle()
985 985
     {
986
-        $record = 0x0293;   // Record identifier
987
-        $length = 0x0004;   // Bytes to follow
986
+        $record = 0x0293; // Record identifier
987
+        $length = 0x0004; // Bytes to follow
988 988
 
989
-        $ixfe    = 0x8000;  // Index to cell style XF
990
-        $BuiltIn = 0x00;     // Built-in style
991
-        $iLevel  = 0xff;     // Outline style level
989
+        $ixfe    = 0x8000; // Index to cell style XF
990
+        $BuiltIn = 0x00; // Built-in style
991
+        $iLevel  = 0xff; // Outline style level
992 992
 
993 993
         $header = pack("vv", $record, $length);
994 994
         $data   = pack("vCC", $ixfe, $BuiltIn, $iLevel);
@@ -1003,14 +1003,14 @@  discard block
 block discarded – undo
1003 1003
      */
1004 1004
     private function writeNumberFormat($format, $ifmt)
1005 1005
     {
1006
-        $record = 0x041E;    // Record identifier
1006
+        $record = 0x041E; // Record identifier
1007 1007
 
1008 1008
         $numberFormatString = \PHPExcel\Shared\StringHelper::UTF8toBIFF8UnicodeLong($format);
1009
-        $length = 2 + strlen($numberFormatString);    // Number of bytes to follow
1009
+        $length = 2 + strlen($numberFormatString); // Number of bytes to follow
1010 1010
 
1011 1011
 
1012 1012
         $header = pack("vv", $record, $length);
1013
-        $data   = pack("v", $ifmt) .  $numberFormatString;
1013
+        $data   = pack("v", $ifmt) . $numberFormatString;
1014 1014
         $this->append($header . $data);
1015 1015
     }
1016 1016
 
@@ -1019,12 +1019,12 @@  discard block
 block discarded – undo
1019 1019
      */
1020 1020
     private function writeDateMode()
1021 1021
     {
1022
-        $record = 0x0022;   // Record identifier
1023
-        $length = 0x0002;   // Bytes to follow
1022
+        $record = 0x0022; // Record identifier
1023
+        $length = 0x0002; // Bytes to follow
1024 1024
 
1025 1025
         $f1904  = (\PHPExcel\Shared\Date::getExcelCalendar() == \PHPExcel\Shared\Date::CALENDAR_MAC_1904)
1026 1026
             ? 1
1027
-            : 0;   // Flag for 1904 date system
1027
+            : 0; // Flag for 1904 date system
1028 1028
 
1029 1029
         $header = pack("vv", $record, $length);
1030 1030
         $data   = pack("v", $f1904);
@@ -1045,8 +1045,8 @@  discard block
 block discarded – undo
1045 1045
      */
1046 1046
     private function writeExternalCount($cxals)
1047 1047
     {
1048
-        $record = 0x0016;   // Record identifier
1049
-        $length = 0x0002;   // Number of bytes to follow
1048
+        $record = 0x0016; // Record identifier
1049
+        $length = 0x0002; // Number of bytes to follow
1050 1050
 
1051 1051
         $header = pack("vv", $record, $length);
1052 1052
         $data   = pack("v", $cxals);
@@ -1064,11 +1064,11 @@  discard block
 block discarded – undo
1064 1064
      */
1065 1065
     private function writeExternalSheet($sheetname)
1066 1066
     {
1067
-        $record = 0x0017;                     // Record identifier
1068
-        $length = 0x02 + strlen($sheetname);  // Number of bytes to follow
1067
+        $record = 0x0017; // Record identifier
1068
+        $length = 0x02 + strlen($sheetname); // Number of bytes to follow
1069 1069
 
1070
-        $cch    = strlen($sheetname);         // Length of sheet name
1071
-        $rgch   = 0x03;                       // Filename encoding
1070
+        $cch    = strlen($sheetname); // Length of sheet name
1071
+        $rgch   = 0x03; // Filename encoding
1072 1072
 
1073 1073
         $header = pack("vv", $record, $length);
1074 1074
         $data   = pack("CC", $cch, $rgch);
@@ -1088,20 +1088,20 @@  discard block
 block discarded – undo
1088 1088
      */
1089 1089
     private function writeNameShort($index, $type, $rowmin, $rowmax, $colmin, $colmax)
1090 1090
     {
1091
-        $record = 0x0018;       // Record identifier
1092
-        $length = 0x0024;       // Number of bytes to follow
1093
-
1094
-        $grbit  = 0x0020;       // Option flags
1095
-        $chKey  = 0x00;         // Keyboard shortcut
1096
-        $cch    = 0x01;         // Length of text name
1097
-        $cce    = 0x0015;       // Length of text definition
1098
-        $ixals  = $index + 1;   // Sheet index
1099
-        $itab   = $ixals;       // Equal to ixals
1100
-        $cchCustMenu    = 0x00;         // Length of cust menu text
1101
-        $cchDescription = 0x00;         // Length of description text
1102
-        $cchHelptopic   = 0x00;         // Length of help topic text
1103
-        $cchStatustext  = 0x00;         // Length of status bar text
1104
-        $rgch           = $type;        // Built-in name type
1091
+        $record = 0x0018; // Record identifier
1092
+        $length = 0x0024; // Number of bytes to follow
1093
+
1094
+        $grbit  = 0x0020; // Option flags
1095
+        $chKey  = 0x00; // Keyboard shortcut
1096
+        $cch    = 0x01; // Length of text name
1097
+        $cce    = 0x0015; // Length of text definition
1098
+        $ixals  = $index + 1; // Sheet index
1099
+        $itab   = $ixals; // Equal to ixals
1100
+        $cchCustMenu    = 0x00; // Length of cust menu text
1101
+        $cchDescription = 0x00; // Length of description text
1102
+        $cchHelptopic   = 0x00; // Length of help topic text
1103
+        $cchStatustext  = 0x00; // Length of status bar text
1104
+        $rgch           = $type; // Built-in name type
1105 1105
 
1106 1106
         $unknown03 = 0x3b;
1107 1107
         $unknown04 = 0xffff - $index;
@@ -1152,24 +1152,24 @@  discard block
 block discarded – undo
1152 1152
      */
1153 1153
     private function writeNameLong($index, $type, $rowmin, $rowmax, $colmin, $colmax)
1154 1154
     {
1155
-        $record          = 0x0018;       // Record identifier
1156
-        $length          = 0x003d;       // Number of bytes to follow
1157
-        $grbit           = 0x0020;       // Option flags
1158
-        $chKey           = 0x00;         // Keyboard shortcut
1159
-        $cch             = 0x01;         // Length of text name
1160
-        $cce             = 0x002e;       // Length of text definition
1161
-        $ixals           = $index + 1;   // Sheet index
1162
-        $itab            = $ixals;       // Equal to ixals
1163
-        $cchCustMenu     = 0x00;         // Length of cust menu text
1164
-        $cchDescription  = 0x00;         // Length of description text
1165
-        $cchHelptopic    = 0x00;         // Length of help topic text
1166
-        $cchStatustext   = 0x00;         // Length of status bar text
1167
-        $rgch            = $type;        // Built-in name type
1155
+        $record          = 0x0018; // Record identifier
1156
+        $length          = 0x003d; // Number of bytes to follow
1157
+        $grbit           = 0x0020; // Option flags
1158
+        $chKey           = 0x00; // Keyboard shortcut
1159
+        $cch             = 0x01; // Length of text name
1160
+        $cce             = 0x002e; // Length of text definition
1161
+        $ixals           = $index + 1; // Sheet index
1162
+        $itab            = $ixals; // Equal to ixals
1163
+        $cchCustMenu     = 0x00; // Length of cust menu text
1164
+        $cchDescription  = 0x00; // Length of description text
1165
+        $cchHelptopic    = 0x00; // Length of help topic text
1166
+        $cchStatustext   = 0x00; // Length of status bar text
1167
+        $rgch            = $type; // Built-in name type
1168 1168
 
1169 1169
         $unknown01       = 0x29;
1170 1170
         $unknown02       = 0x002b;
1171 1171
         $unknown03       = 0x3b;
1172
-        $unknown04       = 0xffff-$index;
1172
+        $unknown04       = 0xffff - $index;
1173 1173
         $unknown05       = 0x0000;
1174 1174
         $unknown06       = 0x0000;
1175 1175
         $unknown07       = 0x1087;
@@ -1227,8 +1227,8 @@  discard block
 block discarded – undo
1227 1227
      */
1228 1228
     private function writeCountry()
1229 1229
     {
1230
-        $record = 0x008C;    // Record identifier
1231
-        $length = 4;         // Number of bytes to follow
1230
+        $record = 0x008C; // Record identifier
1231
+        $length = 4; // Number of bytes to follow
1232 1232
 
1233 1233
         $header = pack('vv', $record, $length);
1234 1234
         /* using the same country code always for simplicity */
@@ -1244,8 +1244,8 @@  discard block
 block discarded – undo
1244 1244
      */
1245 1245
     private function writeRecalcId()
1246 1246
     {
1247
-        $record = 0x01C1;    // Record identifier
1248
-        $length = 8;         // Number of bytes to follow
1247
+        $record = 0x01C1; // Record identifier
1248
+        $length = 8; // Number of bytes to follow
1249 1249
 
1250 1250
         $header = pack('vv', $record, $length);
1251 1251
 
@@ -1262,10 +1262,10 @@  discard block
 block discarded – undo
1262 1262
     {
1263 1263
         $aref = $this->palette;
1264 1264
 
1265
-        $record = 0x0092;                // Record identifier
1266
-        $length = 2 + 4 * count($aref);  // Number of bytes to follow
1267
-        $ccv    = count($aref);          // Number of RGB values to follow
1268
-        $data = '';                      // The RGB data
1265
+        $record = 0x0092; // Record identifier
1266
+        $length = 2 + 4 * count($aref); // Number of bytes to follow
1267
+        $ccv    = count($aref); // Number of RGB values to follow
1268
+        $data = ''; // The RGB data
1269 1269
 
1270 1270
         // Pack the RGB data
1271 1271
         foreach ($aref as $color) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Excel5/Worksheet.php 3 patches
Doc Comments   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -200,10 +200,12 @@  discard block
 block discarded – undo
200 200
      * @param int        &$str_unique    Total number of unique strings
201 201
      * @param array        &$str_table        String Table
202 202
      * @param array        &$colors        Colour Table
203
-     * @param mixed        $parser            The formula parser created for the Workbook
203
+     * @param Parser        $parser            The formula parser created for the Workbook
204 204
      * @param boolean    $preCalculateFormulas    Flag indicating whether formulas should be calculated or just written
205 205
      * @param string    $phpSheet        The worksheet to write
206 206
      * @param \PHPExcel\Worksheet $phpSheet
207
+     * @param integer $str_total
208
+     * @param integer $str_unique
207 209
      */
208 210
     public function __construct(&$str_total, &$str_unique, &$str_table, &$colors, $parser, $preCalculateFormulas, $phpSheet)
209 211
     {
@@ -614,7 +616,7 @@  discard block
 block discarded – undo
614 616
      * @param integer $row    Zero indexed row
615 617
      * @param integer $col    Zero indexed column
616 618
      * @param float   $num    The number to write
617
-     * @param mixed   $xfIndex The optional XF format
619
+     * @param integer   $xfIndex The optional XF format
618 620
      * @return integer
619 621
      */
620 622
     private function writeNumber($row, $col, $num, $xfIndex)
@@ -652,7 +654,7 @@  discard block
 block discarded – undo
652 654
      * @param int $row Row index (0-based)
653 655
      * @param int $col Column index (0-based)
654 656
      * @param string $str The string
655
-     * @param mixed   $xfIndex The XF format index for the cell
657
+     * @param integer   $xfIndex The XF format index for the cell
656 658
      * @param array $arrcRun Index to Font record and characters beginning
657 659
      */
658 660
     private function writeRichTextString($row, $col, $str, $xfIndex, $arrcRun)
@@ -720,7 +722,7 @@  discard block
 block discarded – undo
720 722
      * @param integer $row    Zero indexed row
721 723
      * @param integer $col    Zero indexed column
722 724
      * @param string  $str    The string to write
723
-     * @param mixed   $xfIndex The XF format index for the cell
725
+     * @param integer   $xfIndex The XF format index for the cell
724 726
      * @return integer
725 727
      */
726 728
     private function writeLabelSst($row, $col, $str, $xfIndex)
@@ -785,7 +787,7 @@  discard block
 block discarded – undo
785 787
      *
786 788
      * @param integer $row    Zero indexed row
787 789
      * @param integer $col    Zero indexed column
788
-     * @param mixed   $xfIndex The XF format index
790
+     * @param integer   $xfIndex The XF format index
789 791
      */
790 792
     public function writeBlank($row, $col, $xfIndex)
791 793
     {
@@ -830,7 +832,7 @@  discard block
 block discarded – undo
830 832
      * @param integer $row     Zero indexed row
831 833
      * @param integer $col     Zero indexed column
832 834
      * @param string  $formula The formula text string
833
-     * @param mixed   $xfIndex  The XF format index
835
+     * @param integer   $xfIndex  The XF format index
834 836
      * @param mixed   $calculatedValue  Calculated value
835 837
      * @return integer
836 838
      */
@@ -2307,8 +2309,8 @@  discard block
 block discarded – undo
2307 2309
      * @param mixed   $bitmap  The bitmap filename or GD-image resource
2308 2310
      * @param integer $x       The horizontal position (offset) of the image inside the cell.
2309 2311
      * @param integer $y       The vertical position (offset) of the image inside the cell.
2310
-     * @param float   $scale_x The horizontal scale
2311
-     * @param float   $scale_y The vertical scale
2312
+     * @param integer   $scale_x The horizontal scale
2313
+     * @param integer   $scale_y The vertical scale
2312 2314
      */
2313 2315
     public function insertBitmap($row, $col, $bitmap, $x = 0, $y = 0, $scale_x = 1, $scale_y = 1)
2314 2316
     {
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1019,8 +1019,8 @@  discard block
 block discarded – undo
1019 1019
 
1020 1020
         // Write the packed data
1021 1021
         $this->append($header . $data .
1022
-                       $unknown1 . $options .
1023
-                       $unknown2 . $url_len . $url);
1022
+                        $unknown1 . $options .
1023
+                        $unknown2 . $url_len . $url);
1024 1024
         return 0;
1025 1025
     }
1026 1026
 
@@ -1068,8 +1068,8 @@  discard block
 block discarded – undo
1068 1068
 
1069 1069
         // Write the packed data
1070 1070
         $this->append($header . $data .
1071
-                       $unknown1 . $options .
1072
-                       $url_len . $url);
1071
+                        $unknown1 . $options .
1072
+                        $url_len . $url);
1073 1073
         return 0;
1074 1074
     }
1075 1075
 
@@ -1151,14 +1151,14 @@  discard block
 block discarded – undo
1151 1151
 
1152 1152
         // Pack the main data stream
1153 1153
         $data        = pack("vvvv", $row1, $row2, $col1, $col2) .
1154
-                          $unknown1     .
1155
-                          $link_type    .
1156
-                          $unknown2     .
1157
-                          $up_count     .
1158
-                          $dir_short_len.
1159
-                          $dir_short    .
1160
-                          $unknown3     .
1161
-                          $stream_len   ;/*.
1154
+                            $unknown1     .
1155
+                            $link_type    .
1156
+                            $unknown2     .
1157
+                            $up_count     .
1158
+                            $dir_short_len.
1159
+                            $dir_short    .
1160
+                            $unknown3     .
1161
+                            $stream_len   ;/*.
1162 1162
                           $dir_long_len .
1163 1163
                           $unknown4     .
1164 1164
                           $dir_long     .
Please login to merge, or discard this patch.
Spacing   +327 added lines, -327 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
         $this->_preCalculateFormulas = $preCalculateFormulas;
218 218
         $this->stringTotal        = &$str_total;
219
-        $this->stringUnique        = &$str_unique;
219
+        $this->stringUnique = &$str_unique;
220 220
         $this->stringTable        = &$str_table;
221 221
         $this->colors            = &$colors;
222 222
         $this->parser            = $parser;
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         //$this->offset            = 0;
228 228
         $this->xlsStringMaxLength = 255;
229 229
         $this->columnInfo  = array();
230
-        $this->selection   = array(0,0,0,0);
230
+        $this->selection   = array(0, 0, 0, 0);
231 231
         $this->activePane  = 3;
232 232
 
233 233
         $this->_print_headers = 0;
@@ -243,12 +243,12 @@  discard block
 block discarded – undo
243 243
         $minR = 1;
244 244
         $minC = 'A';
245 245
 
246
-        $maxR  = $this->phpSheet->getHighestRow();
246
+        $maxR = $this->phpSheet->getHighestRow();
247 247
         $maxC = $this->phpSheet->getHighestColumn();
248 248
 
249 249
         // Determine lowest and highest column and row
250 250
 //        $this->firstRowIndex = ($minR > 65535) ? 65535 : $minR;
251
-        $this->lastRowIndex = ($maxR > 65535) ? 65535 : $maxR ;
251
+        $this->lastRowIndex = ($maxR > 65535) ? 65535 : $maxR;
252 252
 
253 253
         $this->firstColumnIndex = \PHPExcel\Cell::columnIndexFromString($minC);
254 254
         $this->lastColumnIndex  = \PHPExcel\Cell::columnIndexFromString($maxC);
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
         }
296 296
 
297 297
         $columnDimensions = $phpSheet->getColumnDimensions();
298
-        $maxCol = $this->lastColumnIndex -1;
298
+        $maxCol = $this->lastColumnIndex - 1;
299 299
         for ($i = 0; $i <= $maxCol; ++$i) {
300 300
             $hidden = 0;
301 301
             $level = 0;
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
         }
546 546
 
547 547
         $firstCellCoordinates = \PHPExcel\Cell::coordinateFromString($firstCell); // e.g. array(0, 1)
548
-        $lastCellCoordinates  = \PHPExcel\Cell::coordinateFromString($lastCell);  // e.g. array(1, 6)
548
+        $lastCellCoordinates  = \PHPExcel\Cell::coordinateFromString($lastCell); // e.g. array(1, 6)
549 549
 
550 550
         return pack('vvvv', $firstCellCoordinates[1] - 1, $lastCellCoordinates[1] - 1, \PHPExcel\Cell::columnIndexFromString($firstCellCoordinates[0]) - 1, \PHPExcel\Cell::columnIndexFromString($lastCellCoordinates[0]) - 1);
551 551
     }
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
 
563 563
         // Return data stored in memory
564 564
         if (isset($this->_data)) {
565
-            $tmp   = $this->_data;
565
+            $tmp = $this->_data;
566 566
             unset($this->_data);
567 567
             return $tmp;
568 568
         }
@@ -619,17 +619,17 @@  discard block
 block discarded – undo
619 619
      */
620 620
     private function writeNumber($row, $col, $num, $xfIndex)
621 621
     {
622
-        $record    = 0x0203;                 // Record identifier
623
-        $length    = 0x000E;                 // Number of bytes to follow
622
+        $record    = 0x0203; // Record identifier
623
+        $length    = 0x000E; // Number of bytes to follow
624 624
 
625
-        $header        = pack("vv", $record, $length);
626
-        $data        = pack("vvv", $row, $col, $xfIndex);
627
-        $xl_double    = pack("d", $num);
625
+        $header = pack("vv", $record, $length);
626
+        $data = pack("vvv", $row, $col, $xfIndex);
627
+        $xl_double = pack("d", $num);
628 628
         if (self::getByteOrder()) { // if it's Big Endian
629 629
             $xl_double = strrev($xl_double);
630 630
         }
631 631
 
632
-        $this->append($header.$data.$xl_double);
632
+        $this->append($header . $data . $xl_double);
633 633
         return(0);
634 634
     }
635 635
 
@@ -657,8 +657,8 @@  discard block
 block discarded – undo
657 657
      */
658 658
     private function writeRichTextString($row, $col, $str, $xfIndex, $arrcRun)
659 659
     {
660
-        $record    = 0x00FD;                   // Record identifier
661
-        $length    = 0x000A;                   // Bytes to follow
660
+        $record    = 0x00FD; // Record identifier
661
+        $length    = 0x000A; // Bytes to follow
662 662
         $str = \PHPExcel\Shared\StringHelper::UTF8toBIFF8UnicodeShort($str, $arrcRun);
663 663
 
664 664
         /* check if string is already present */
@@ -667,9 +667,9 @@  discard block
 block discarded – undo
667 667
         }
668 668
         $this->stringTotal++;
669 669
 
670
-        $header    = pack('vv', $record, $length);
671
-        $data    = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]);
672
-        $this->append($header.$data);
670
+        $header = pack('vv', $record, $length);
671
+        $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]);
672
+        $this->append($header . $data);
673 673
     }
674 674
 
675 675
     /**
@@ -690,20 +690,20 @@  discard block
 block discarded – undo
690 690
     private function writeLabel($row, $col, $str, $xfIndex)
691 691
     {
692 692
         $strlen    = strlen($str);
693
-        $record    = 0x0204;                   // Record identifier
694
-        $length    = 0x0008 + $strlen;         // Bytes to follow
693
+        $record    = 0x0204; // Record identifier
694
+        $length    = 0x0008 + $strlen; // Bytes to follow
695 695
 
696 696
         $str_error = 0;
697 697
 
698 698
         if ($strlen > $this->xlsStringMaxLength) { // LABEL must be < 255 chars
699
-            $str    = substr($str, 0, $this->xlsStringMaxLength);
699
+            $str = substr($str, 0, $this->xlsStringMaxLength);
700 700
             $length    = 0x0008 + $this->xlsStringMaxLength;
701 701
             $strlen    = $this->xlsStringMaxLength;
702 702
             $str_error = -3;
703 703
         }
704 704
 
705
-        $header    = pack("vv", $record, $length);
706
-        $data    = pack("vvvv", $row, $col, $xfIndex, $strlen);
705
+        $header = pack("vv", $record, $length);
706
+        $data = pack("vvvv", $row, $col, $xfIndex, $strlen);
707 707
         $this->append($header . $data . $str);
708 708
         return($str_error);
709 709
     }
@@ -725,8 +725,8 @@  discard block
 block discarded – undo
725 725
      */
726 726
     private function writeLabelSst($row, $col, $str, $xfIndex)
727 727
     {
728
-        $record    = 0x00FD;                   // Record identifier
729
-        $length    = 0x000A;                   // Bytes to follow
728
+        $record    = 0x00FD; // Record identifier
729
+        $length    = 0x000A; // Bytes to follow
730 730
 
731 731
         $str = \PHPExcel\Shared\StringHelper::UTF8toBIFF8UnicodeLong($str);
732 732
 
@@ -736,9 +736,9 @@  discard block
 block discarded – undo
736 736
         }
737 737
         $this->stringTotal++;
738 738
 
739
-        $header    = pack('vv', $record, $length);
740
-        $data    = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]);
741
-        $this->append($header.$data);
739
+        $header = pack('vv', $record, $length);
740
+        $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]);
741
+        $this->append($header . $data);
742 742
     }
743 743
 
744 744
     /**
@@ -751,14 +751,14 @@  discard block
 block discarded – undo
751 751
      */
752 752
     private function writeNote($row, $col, $note)
753 753
     {
754
-        $note_length    = strlen($note);
755
-        $record            = 0x001C;            // Record identifier
756
-        $max_length        = 2048;                // Maximun length for a NOTE record
754
+        $note_length = strlen($note);
755
+        $record            = 0x001C; // Record identifier
756
+        $max_length        = 2048; // Maximun length for a NOTE record
757 757
 
758 758
         // Length for this record is no more than 2048 + 6
759 759
         $length    = 0x0006 + min($note_length, 2048);
760 760
         $header    = pack("vv", $record, $length);
761
-        $data    = pack("vvv", $row, $col, $note_length);
761
+        $data = pack("vvv", $row, $col, $note_length);
762 762
         $this->append($header . $data . substr($note, 0, 2048));
763 763
 
764 764
         for ($i = $max_length; $i < $note_length; $i += $max_length) {
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
             $length = 0x0006 + strlen($chunk);
767 767
             $header = pack("vv", $record, $length);
768 768
             $data   = pack("vvv", -1, 0, strlen($chunk));
769
-            $this->append($header.$data.$chunk);
769
+            $this->append($header . $data . $chunk);
770 770
         }
771 771
         return(0);
772 772
     }
@@ -789,8 +789,8 @@  discard block
 block discarded – undo
789 789
      */
790 790
     public function writeBlank($row, $col, $xfIndex)
791 791
     {
792
-        $record    = 0x0201;                 // Record identifier
793
-        $length    = 0x0006;                 // Number of bytes to follow
792
+        $record    = 0x0201; // Record identifier
793
+        $length    = 0x0006; // Number of bytes to follow
794 794
 
795 795
         $header    = pack("vv", $record, $length);
796 796
         $data      = pack("vvv", $row, $col, $xfIndex);
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
      */
837 837
     private function writeFormula($row, $col, $formula, $xfIndex, $calculatedValue)
838 838
     {
839
-        $record    = 0x0006;     // Record identifier
839
+        $record = 0x0006; // Record identifier
840 840
 
841 841
         // Initialize possible additional value for STRING record that should be written after the FORMULA record?
842 842
         $stringValue = null;
@@ -847,7 +847,7 @@  discard block
 block discarded – undo
847 847
             // we use best effort to determine data type
848 848
             if (is_bool($calculatedValue)) {
849 849
                 // Boolean value
850
-                $num = pack('CCCvCv', 0x01, 0x00, (int)$calculatedValue, 0x00, 0x00, 0xFFFF);
850
+                $num = pack('CCCvCv', 0x01, 0x00, (int) $calculatedValue, 0x00, 0x00, 0xFFFF);
851 851
             } elseif (is_int($calculatedValue) || is_float($calculatedValue)) {
852 852
                 // Numeric value
853 853
                 $num = pack('d', $calculatedValue);
@@ -871,8 +871,8 @@  discard block
 block discarded – undo
871 871
             $num = pack('d', 0x00);
872 872
         }
873 873
 
874
-        $grbit        = 0x03;                // Option flags
875
-        $unknown    = 0x0000;            // Must be zero
874
+        $grbit = 0x03; // Option flags
875
+        $unknown = 0x0000; // Must be zero
876 876
 
877 877
         // Strip the '=' or '@' sign at the beginning of the formula string
878 878
         if ($formula{0} == '=') {
@@ -888,8 +888,8 @@  discard block
 block discarded – undo
888 888
             $error = $this->parser->parse($formula);
889 889
             $formula = $this->parser->toReversePolish();
890 890
 
891
-            $formlen    = strlen($formula);    // Length of the binary string
892
-            $length     = 0x16 + $formlen;     // Length of the record data
891
+            $formlen    = strlen($formula); // Length of the binary string
892
+            $length     = 0x16 + $formlen; // Length of the record data
893 893
 
894 894
             $header    = pack("vv", $record, $length);
895 895
 
@@ -915,7 +915,7 @@  discard block
 block discarded – undo
915 915
      */
916 916
     private function writeStringRecord($stringValue)
917 917
     {
918
-        $record = 0x0207;     // Record identifier
918
+        $record = 0x0207; // Record identifier
919 919
         $data = \PHPExcel\Shared\StringHelper::UTF8toBIFF8UnicodeLong($stringValue);
920 920
 
921 921
         $length = strlen($data);
@@ -993,8 +993,8 @@  discard block
 block discarded – undo
993 993
      */
994 994
     public function writeUrlWeb($row1, $col1, $row2, $col2, $url)
995 995
     {
996
-        $record      = 0x01B8;                       // Record identifier
997
-        $length      = 0x00000;                      // Bytes to follow
996
+        $record      = 0x01B8; // Record identifier
997
+        $length      = 0x00000; // Bytes to follow
998 998
 
999 999
         // Pack the undocumented parts of the hyperlink stream
1000 1000
         $unknown1    = pack("H*", "D0C9EA79F9BACE118C8200AA004BA90B02000000");
@@ -1038,8 +1038,8 @@  discard block
 block discarded – undo
1038 1038
      */
1039 1039
     public function writeUrlInternal($row1, $col1, $row2, $col2, $url)
1040 1040
     {
1041
-        $record      = 0x01B8;                       // Record identifier
1042
-        $length      = 0x00000;                      // Bytes to follow
1041
+        $record      = 0x01B8; // Record identifier
1042
+        $length      = 0x00000; // Bytes to follow
1043 1043
 
1044 1044
         // Strip URL type
1045 1045
         $url = preg_replace('/^internal:/', '', $url);
@@ -1097,8 +1097,8 @@  discard block
 block discarded – undo
1097 1097
             return; //($this->writeUrlExternal_net($row1, $col1, $row2, $col2, $url, $str, $format));
1098 1098
         }
1099 1099
 
1100
-        $record      = 0x01B8;                       // Record identifier
1101
-        $length      = 0x00000;                      // Bytes to follow
1100
+        $record      = 0x01B8; // Record identifier
1101
+        $length      = 0x00000; // Bytes to follow
1102 1102
 
1103 1103
         // Strip URL type and change Unix dir separator to Dos style (if needed)
1104 1104
         //
@@ -1114,7 +1114,7 @@  discard block
 block discarded – undo
1114 1114
         if (preg_match('/^[A-Z]:/', $url)) {
1115 1115
             $absolute = 0x02; // absolute path on Windows, e.g. C:\...
1116 1116
         }
1117
-        $link_type               = 0x01 | $absolute;
1117
+        $link_type = 0x01 | $absolute;
1118 1118
 
1119 1119
         // Determine if the link contains a sheet reference and change some of the
1120 1120
         // parameters accordingly.
@@ -1136,7 +1136,7 @@  discard block
 block discarded – undo
1136 1136
         $dir_short   = preg_replace("/\.\.\\\/", '', $dir_long) . "\0";
1137 1137
 
1138 1138
         // Store the long dir name as a wchar string (non-null terminated)
1139
-        $dir_long       = $dir_long . "\0";
1139
+        $dir_long = $dir_long . "\0";
1140 1140
 
1141 1141
         // Pack the lengths of the dir strings
1142 1142
         $dir_short_len = pack("V", strlen($dir_short));
@@ -1150,15 +1150,15 @@  discard block
 block discarded – undo
1150 1150
         $unknown4 = pack("v", 0x03);
1151 1151
 
1152 1152
         // Pack the main data stream
1153
-        $data        = pack("vvvv", $row1, $row2, $col1, $col2) .
1154
-                          $unknown1     .
1155
-                          $link_type    .
1156
-                          $unknown2     .
1157
-                          $up_count     .
1158
-                          $dir_short_len.
1159
-                          $dir_short    .
1160
-                          $unknown3     .
1161
-                          $stream_len   ;/*.
1153
+        $data = pack("vvvv", $row1, $row2, $col1, $col2) .
1154
+                          $unknown1 .
1155
+                          $link_type .
1156
+                          $unknown2 .
1157
+                          $up_count .
1158
+                          $dir_short_len .
1159
+                          $dir_short .
1160
+                          $unknown3 .
1161
+                          $stream_len; /*.
1162 1162
                           $dir_long_len .
1163 1163
                           $unknown4     .
1164 1164
                           $dir_long     .
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
         $header   = pack("vv", $record, $length);
1171 1171
 
1172 1172
         // Write the packed data
1173
-        $this->append($header. $data);
1173
+        $this->append($header . $data);
1174 1174
         return 0;
1175 1175
     }
1176 1176
 
@@ -1186,14 +1186,14 @@  discard block
 block discarded – undo
1186 1186
      */
1187 1187
     private function writeRow($row, $height, $xfIndex, $hidden = false, $level = 0)
1188 1188
     {
1189
-        $record      = 0x0208;               // Record identifier
1190
-        $length      = 0x0010;               // Number of bytes to follow
1191
-
1192
-        $colMic      = 0x0000;               // First defined column
1193
-        $colMac      = 0x0000;               // Last defined column
1194
-        $irwMac      = 0x0000;               // Used by Excel to optimise loading
1195
-        $reserved    = 0x0000;               // Reserved
1196
-        $grbit       = 0x0000;               // Option flags
1189
+        $record      = 0x0208; // Record identifier
1190
+        $length      = 0x0010; // Number of bytes to follow
1191
+
1192
+        $colMic      = 0x0000; // First defined column
1193
+        $colMac      = 0x0000; // Last defined column
1194
+        $irwMac      = 0x0000; // Used by Excel to optimise loading
1195
+        $reserved    = 0x0000; // Reserved
1196
+        $grbit       = 0x0000; // Option flags
1197 1197
         $ixfe        = $xfIndex;
1198 1198
 
1199 1199
         if ($height < 0) {
@@ -1202,9 +1202,9 @@  discard block
 block discarded – undo
1202 1202
 
1203 1203
         // Use writeRow($row, null, $XF) to set XF format without setting height
1204 1204
         if ($height != null) {
1205
-            $miyRw = $height * 20;  // row height
1205
+            $miyRw = $height * 20; // row height
1206 1206
         } else {
1207
-            $miyRw = 0xff;          // default row height is 256
1207
+            $miyRw = 0xff; // default row height is 256
1208 1208
         }
1209 1209
 
1210 1210
         // Set the options flags. fUnsynced is used to show that the font and row
@@ -1227,7 +1227,7 @@  discard block
 block discarded – undo
1227 1227
 
1228 1228
         $header   = pack("vv", $record, $length);
1229 1229
         $data     = pack("vvvvvvvv", $row, $colMic, $colMac, $miyRw, $irwMac, $reserved, $grbit, $ixfe);
1230
-        $this->append($header.$data);
1230
+        $this->append($header . $data);
1231 1231
     }
1232 1232
 
1233 1233
     /**
@@ -1241,7 +1241,7 @@  discard block
 block discarded – undo
1241 1241
         $data = pack('VVvvv', $this->firstRowIndex, $this->lastRowIndex + 1, $this->firstColumnIndex, $this->lastColumnIndex + 1, 0x0000); // reserved
1242 1242
 
1243 1243
         $header = pack("vv", $record, $length);
1244
-        $this->append($header.$data);
1244
+        $this->append($header . $data);
1245 1245
     }
1246 1246
 
1247 1247
     /**
@@ -1249,53 +1249,53 @@  discard block
 block discarded – undo
1249 1249
      */
1250 1250
     private function writeWindow2()
1251 1251
     {
1252
-        $record         = 0x023E;     // Record identifier
1252
+        $record         = 0x023E; // Record identifier
1253 1253
         $length         = 0x0012;
1254 1254
 
1255
-        $grbit          = 0x00B6;     // Option flags
1256
-        $rwTop          = 0x0000;     // Top row visible in window
1257
-        $colLeft        = 0x0000;     // Leftmost column visible in window
1255
+        $grbit          = 0x00B6; // Option flags
1256
+        $rwTop          = 0x0000; // Top row visible in window
1257
+        $colLeft        = 0x0000; // Leftmost column visible in window
1258 1258
 
1259 1259
 
1260 1260
         // The options flags that comprise $grbit
1261
-        $fDspFmla       = 0;                     // 0 - bit
1261
+        $fDspFmla       = 0; // 0 - bit
1262 1262
         $fDspGrid       = $this->phpSheet->getShowGridlines() ? 1 : 0; // 1
1263 1263
         $fDspRwCol      = $this->phpSheet->getShowRowColHeaders() ? 1 : 0; // 2
1264
-        $fFrozen        = $this->phpSheet->getFreezePane() ? 1 : 0;        // 3
1265
-        $fDspZeros      = 1;                     // 4
1266
-        $fDefaultHdr    = 1;                     // 5
1264
+        $fFrozen        = $this->phpSheet->getFreezePane() ? 1 : 0; // 3
1265
+        $fDspZeros      = 1; // 4
1266
+        $fDefaultHdr    = 1; // 5
1267 1267
         $fArabic        = $this->phpSheet->getRightToLeft() ? 1 : 0; // 6
1268
-        $fDspGuts       = $this->outlineOn;    // 7
1269
-        $fFrozenNoSplit = 0;                     // 0 - bit
1268
+        $fDspGuts       = $this->outlineOn; // 7
1269
+        $fFrozenNoSplit = 0; // 0 - bit
1270 1270
         // no support in PHPExcel for selected sheet, therefore sheet is only selected if it is the active sheet
1271 1271
         $fSelected      = ($this->phpSheet === $this->phpSheet->getParent()->getActiveSheet()) ? 1 : 0;
1272
-        $fPaged         = 1;                     // 2
1272
+        $fPaged         = 1; // 2
1273 1273
         $fPageBreakPreview = $this->phpSheet->getSheetView()->getView() === \PHPExcel\Worksheet\SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW;
1274 1274
 
1275 1275
         $grbit             = $fDspFmla;
1276
-        $grbit            |= $fDspGrid       << 1;
1277
-        $grbit            |= $fDspRwCol       << 2;
1278
-        $grbit            |= $fFrozen           << 3;
1279
-        $grbit            |= $fDspZeros       << 4;
1280
-        $grbit            |= $fDefaultHdr       << 5;
1281
-        $grbit            |= $fArabic           << 6;
1282
-        $grbit            |= $fDspGuts       << 7;
1276
+        $grbit            |= $fDspGrid << 1;
1277
+        $grbit            |= $fDspRwCol << 2;
1278
+        $grbit            |= $fFrozen << 3;
1279
+        $grbit            |= $fDspZeros << 4;
1280
+        $grbit            |= $fDefaultHdr << 5;
1281
+        $grbit            |= $fArabic << 6;
1282
+        $grbit            |= $fDspGuts << 7;
1283 1283
         $grbit            |= $fFrozenNoSplit << 8;
1284
-        $grbit            |= $fSelected       << 9;
1285
-        $grbit            |= $fPaged           << 10;
1284
+        $grbit            |= $fSelected << 9;
1285
+        $grbit            |= $fPaged << 10;
1286 1286
         $grbit            |= $fPageBreakPreview << 11;
1287 1287
 
1288 1288
         $header  = pack("vv", $record, $length);
1289 1289
         $data    = pack("vvv", $grbit, $rwTop, $colLeft);
1290 1290
 
1291 1291
         // FIXME !!!
1292
-        $rgbHdr       = 0x0040; // Row/column heading and gridline color index
1292
+        $rgbHdr = 0x0040; // Row/column heading and gridline color index
1293 1293
         $zoom_factor_page_break = ($fPageBreakPreview ? $this->phpSheet->getSheetView()->getZoomScale() : 0x0000);
1294
-        $zoom_factor_normal =  $this->phpSheet->getSheetView()->getZoomScaleNormal();
1294
+        $zoom_factor_normal = $this->phpSheet->getSheetView()->getZoomScaleNormal();
1295 1295
 
1296 1296
         $data .= pack("vvvvV", $rgbHdr, 0x0000, $zoom_factor_page_break, $zoom_factor_normal, 0x00000000);
1297 1297
 
1298
-        $this->append($header.$data);
1298
+        $this->append($header . $data);
1299 1299
     }
1300 1300
 
1301 1301
     /**
@@ -1312,8 +1312,8 @@  discard block
 block discarded – undo
1312 1312
         // convert to twips
1313 1313
         $defaultRowHeight = (int) 20 * $defaultRowHeight;
1314 1314
 
1315
-        $record   = 0x0225;      // Record identifier
1316
-        $length   = 0x0004;      // Number of bytes to follow
1315
+        $record   = 0x0225; // Record identifier
1316
+        $length   = 0x0004; // Number of bytes to follow
1317 1317
 
1318 1318
         $header   = pack("vv", $record, $length);
1319 1319
         $data     = pack("vv", 1, $defaultRowHeight);
@@ -1327,8 +1327,8 @@  discard block
 block discarded – undo
1327 1327
     {
1328 1328
         $defaultColWidth = 8;
1329 1329
 
1330
-        $record   = 0x0055;      // Record identifier
1331
-        $length   = 0x0002;      // Number of bytes to follow
1330
+        $record   = 0x0055; // Record identifier
1331
+        $length   = 0x0002; // Number of bytes to follow
1332 1332
 
1333 1333
         $header = pack("vv", $record, $length);
1334 1334
         $data = pack("v", $defaultColWidth);
@@ -1377,20 +1377,20 @@  discard block
 block discarded – undo
1377 1377
         } else {
1378 1378
             $level = 0;
1379 1379
         }
1380
-        $record   = 0x007D;          // Record identifier
1381
-        $length   = 0x000C;          // Number of bytes to follow
1380
+        $record   = 0x007D; // Record identifier
1381
+        $length   = 0x000C; // Number of bytes to follow
1382 1382
 
1383
-        $coldx   *= 256;             // Convert to units of 1/256 of a char
1383
+        $coldx   *= 256; // Convert to units of 1/256 of a char
1384 1384
 
1385 1385
         $ixfe     = $xfIndex;
1386
-        $reserved = 0x0000;            // Reserved
1386
+        $reserved = 0x0000; // Reserved
1387 1387
 
1388 1388
         $level = max(0, min($level, 7));
1389 1389
         $grbit |= $level << 8;
1390 1390
 
1391 1391
         $header   = pack("vv", $record, $length);
1392 1392
         $data     = pack("vvvvvv", $colFirst, $colLast, $coldx, $ixfe, $grbit, $reserved);
1393
-        $this->append($header.$data);
1393
+        $this->append($header . $data);
1394 1394
     }
1395 1395
 
1396 1396
     /**
@@ -1424,20 +1424,20 @@  discard block
 block discarded – undo
1424 1424
         $rwFirst = min($rwFirst, 65535);
1425 1425
         $rwLast  = min($rwLast, 65535);
1426 1426
 
1427
-        $record   = 0x001D;                  // Record identifier
1428
-        $length   = 0x000F;                  // Number of bytes to follow
1427
+        $record   = 0x001D; // Record identifier
1428
+        $length   = 0x000F; // Number of bytes to follow
1429 1429
 
1430
-        $pnn      = $this->activePane;     // Pane position
1431
-        $rwAct    = $rwFirst;                // Active row
1432
-        $colAct   = $colFirst;               // Active column
1433
-        $irefAct  = 0;                       // Active cell ref
1434
-        $cref     = 1;                       // Number of refs
1430
+        $pnn      = $this->activePane; // Pane position
1431
+        $rwAct    = $rwFirst; // Active row
1432
+        $colAct   = $colFirst; // Active column
1433
+        $irefAct  = 0; // Active cell ref
1434
+        $cref     = 1; // Number of refs
1435 1435
 
1436 1436
         if (!isset($rwLast)) {
1437
-            $rwLast   = $rwFirst;       // Last  row in reference
1437
+            $rwLast   = $rwFirst; // Last  row in reference
1438 1438
         }
1439 1439
         if (!isset($colLast)) {
1440
-            $colLast  = $colFirst;      // Last  col in reference
1440
+            $colLast  = $colFirst; // Last  col in reference
1441 1441
         }
1442 1442
 
1443 1443
         // Swap last row/col for first row/col as necessary
@@ -1544,21 +1544,21 @@  discard block
 block discarded – undo
1544 1544
         $record = 0x0867;
1545 1545
 
1546 1546
         // prepare options
1547
-        $options  =   (int) !$this->phpSheet->getProtection()->getObjects()
1548
-                    | (int) !$this->phpSheet->getProtection()->getScenarios()           << 1
1549
-                    | (int) !$this->phpSheet->getProtection()->getFormatCells()         << 2
1550
-                    | (int) !$this->phpSheet->getProtection()->getFormatColumns()       << 3
1551
-                    | (int) !$this->phpSheet->getProtection()->getFormatRows()          << 4
1552
-                    | (int) !$this->phpSheet->getProtection()->getInsertColumns()       << 5
1553
-                    | (int) !$this->phpSheet->getProtection()->getInsertRows()          << 6
1554
-                    | (int) !$this->phpSheet->getProtection()->getInsertHyperlinks()    << 7
1555
-                    | (int) !$this->phpSheet->getProtection()->getDeleteColumns()       << 8
1556
-                    | (int) !$this->phpSheet->getProtection()->getDeleteRows()          << 9
1557
-                    | (int) !$this->phpSheet->getProtection()->getSelectLockedCells()   << 10
1558
-                    | (int) !$this->phpSheet->getProtection()->getSort()                << 11
1559
-                    | (int) !$this->phpSheet->getProtection()->getAutoFilter()          << 12
1560
-                    | (int) !$this->phpSheet->getProtection()->getPivotTables()         << 13
1561
-                    | (int) !$this->phpSheet->getProtection()->getSelectUnlockedCells() << 14 ;
1547
+        $options = (int) !$this->phpSheet->getProtection()->getObjects()
1548
+                    | (int) !$this->phpSheet->getProtection()->getScenarios() << 1
1549
+                    | (int) !$this->phpSheet->getProtection()->getFormatCells() << 2
1550
+                    | (int) !$this->phpSheet->getProtection()->getFormatColumns() << 3
1551
+                    | (int) !$this->phpSheet->getProtection()->getFormatRows() << 4
1552
+                    | (int) !$this->phpSheet->getProtection()->getInsertColumns() << 5
1553
+                    | (int) !$this->phpSheet->getProtection()->getInsertRows() << 6
1554
+                    | (int) !$this->phpSheet->getProtection()->getInsertHyperlinks() << 7
1555
+                    | (int) !$this->phpSheet->getProtection()->getDeleteColumns() << 8
1556
+                    | (int) !$this->phpSheet->getProtection()->getDeleteRows() << 9
1557
+                    | (int) !$this->phpSheet->getProtection()->getSelectLockedCells() << 10
1558
+                    | (int) !$this->phpSheet->getProtection()->getSort() << 11
1559
+                    | (int) !$this->phpSheet->getProtection()->getAutoFilter() << 12
1560
+                    | (int) !$this->phpSheet->getProtection()->getPivotTables() << 13
1561
+                    | (int) !$this->phpSheet->getProtection()->getSelectUnlockedCells() << 14;
1562 1562
 
1563 1563
         // record data
1564 1564
         $recordData = pack(
@@ -1621,7 +1621,7 @@  discard block
 block discarded – undo
1621 1621
 
1622 1622
             $length = strlen($recordData);
1623 1623
 
1624
-            $record = 0x0868;        // Record identifier
1624
+            $record = 0x0868; // Record identifier
1625 1625
             $header = pack("vv", $record, $length);
1626 1626
             $this->append($header . $recordData);
1627 1627
         }
@@ -1641,8 +1641,8 @@  discard block
 block discarded – undo
1641 1641
      */
1642 1642
     private function writeExterncount($count)
1643 1643
     {
1644
-        $record = 0x0016;          // Record identifier
1645
-        $length = 0x0002;          // Number of bytes to follow
1644
+        $record = 0x0016; // Record identifier
1645
+        $length = 0x0002; // Number of bytes to follow
1646 1646
 
1647 1647
         $header = pack("vv", $record, $length);
1648 1648
         $data   = pack("v", $count);
@@ -1659,20 +1659,20 @@  discard block
 block discarded – undo
1659 1659
      */
1660 1660
     private function writeExternsheet($sheetname)
1661 1661
     {
1662
-        $record    = 0x0017;         // Record identifier
1662
+        $record = 0x0017; // Record identifier
1663 1663
 
1664 1664
         // References to the current sheet are encoded differently to references to
1665 1665
         // external sheets.
1666 1666
         //
1667 1667
         if ($this->phpSheet->getTitle() == $sheetname) {
1668 1668
             $sheetname = '';
1669
-            $length    = 0x02;  // The following 2 bytes
1670
-            $cch       = 1;     // The following byte
1671
-            $rgch      = 0x02;  // Self reference
1669
+            $length    = 0x02; // The following 2 bytes
1670
+            $cch       = 1; // The following byte
1671
+            $rgch      = 0x02; // Self reference
1672 1672
         } else {
1673 1673
             $length    = 0x02 + strlen($sheetname);
1674 1674
             $cch       = strlen($sheetname);
1675
-            $rgch      = 0x03;  // Reference to a sheet in the current workbook
1675
+            $rgch      = 0x03; // Reference to a sheet in the current workbook
1676 1676
         }
1677 1677
 
1678 1678
         $header = pack("vv", $record, $length);
@@ -1707,8 +1707,8 @@  discard block
 block discarded – undo
1707 1707
         } else {
1708 1708
             $pnnAct = null;
1709 1709
         }
1710
-        $record  = 0x0041;       // Record identifier
1711
-        $length  = 0x000A;       // Number of bytes to follow
1710
+        $record  = 0x0041; // Record identifier
1711
+        $length  = 0x000A; // Number of bytes to follow
1712 1712
 
1713 1713
         // Code specific to frozen or thawed panes.
1714 1714
         if ($this->phpSheet->getFreezePane()) {
@@ -1733,8 +1733,8 @@  discard block
 block discarded – undo
1733 1733
             // The default column width is 8.43
1734 1734
             // The following slope and intersection values were interpolated.
1735 1735
             //
1736
-            $y = 20*$y + 255;
1737
-            $x = 113.879*$x + 390;
1736
+            $y = 20 * $y + 255;
1737
+            $x = 113.879 * $x + 390;
1738 1738
         }
1739 1739
 
1740 1740
 
@@ -1768,47 +1768,47 @@  discard block
 block discarded – undo
1768 1768
      */
1769 1769
     private function writeSetup()
1770 1770
     {
1771
-        $record       = 0x00A1;                  // Record identifier
1772
-        $length       = 0x0022;                  // Number of bytes to follow
1771
+        $record       = 0x00A1; // Record identifier
1772
+        $length       = 0x0022; // Number of bytes to follow
1773 1773
 
1774
-        $iPaperSize   = $this->phpSheet->getPageSetup()->getPaperSize();    // Paper size
1774
+        $iPaperSize   = $this->phpSheet->getPageSetup()->getPaperSize(); // Paper size
1775 1775
 
1776 1776
         $iScale = $this->phpSheet->getPageSetup()->getScale() ?
1777
-            $this->phpSheet->getPageSetup()->getScale() : 100;   // Print scaling factor
1777
+            $this->phpSheet->getPageSetup()->getScale() : 100; // Print scaling factor
1778 1778
 
1779
-        $iPageStart   = 0x01;                 // Starting page number
1780
-        $iFitWidth    = (int) $this->phpSheet->getPageSetup()->getFitToWidth();    // Fit to number of pages wide
1781
-        $iFitHeight    = (int) $this->phpSheet->getPageSetup()->getFitToHeight();    // Fit to number of pages high
1782
-        $grbit        = 0x00;                 // Option flags
1783
-        $iRes         = 0x0258;               // Print resolution
1784
-        $iVRes        = 0x0258;               // Vertical print resolution
1779
+        $iPageStart   = 0x01; // Starting page number
1780
+        $iFitWidth    = (int) $this->phpSheet->getPageSetup()->getFitToWidth(); // Fit to number of pages wide
1781
+        $iFitHeight = (int) $this->phpSheet->getPageSetup()->getFitToHeight(); // Fit to number of pages high
1782
+        $grbit        = 0x00; // Option flags
1783
+        $iRes         = 0x0258; // Print resolution
1784
+        $iVRes        = 0x0258; // Vertical print resolution
1785 1785
 
1786
-        $numHdr       = $this->phpSheet->getPageMargins()->getHeader();  // Header Margin
1786
+        $numHdr       = $this->phpSheet->getPageMargins()->getHeader(); // Header Margin
1787 1787
 
1788
-        $numFtr       = $this->phpSheet->getPageMargins()->getFooter();   // Footer Margin
1789
-        $iCopies      = 0x01;                 // Number of copies
1788
+        $numFtr       = $this->phpSheet->getPageMargins()->getFooter(); // Footer Margin
1789
+        $iCopies      = 0x01; // Number of copies
1790 1790
 
1791
-        $fLeftToRight = 0x0;                     // Print over then down
1791
+        $fLeftToRight = 0x0; // Print over then down
1792 1792
 
1793 1793
         // Page orientation
1794 1794
         $fLandscape = ($this->phpSheet->getPageSetup()->getOrientation() == \PHPExcel\Worksheet\PageSetup::ORIENTATION_LANDSCAPE) ?
1795 1795
             0x0 : 0x1;
1796 1796
 
1797
-        $fNoPls       = 0x0;                     // Setup not read from printer
1798
-        $fNoColor     = 0x0;                     // Print black and white
1799
-        $fDraft       = 0x0;                     // Print draft quality
1800
-        $fNotes       = 0x0;                     // Print notes
1801
-        $fNoOrient    = 0x0;                     // Orientation not set
1802
-        $fUsePage     = 0x0;                     // Use custom starting page
1797
+        $fNoPls       = 0x0; // Setup not read from printer
1798
+        $fNoColor     = 0x0; // Print black and white
1799
+        $fDraft       = 0x0; // Print draft quality
1800
+        $fNotes       = 0x0; // Print notes
1801
+        $fNoOrient    = 0x0; // Orientation not set
1802
+        $fUsePage     = 0x0; // Use custom starting page
1803 1803
 
1804 1804
         $grbit           = $fLeftToRight;
1805
-        $grbit          |= $fLandscape    << 1;
1806
-        $grbit          |= $fNoPls        << 2;
1807
-        $grbit          |= $fNoColor      << 3;
1808
-        $grbit          |= $fDraft        << 4;
1809
-        $grbit          |= $fNotes        << 5;
1810
-        $grbit          |= $fNoOrient     << 6;
1811
-        $grbit          |= $fUsePage      << 7;
1805
+        $grbit          |= $fLandscape << 1;
1806
+        $grbit          |= $fNoPls << 2;
1807
+        $grbit          |= $fNoColor << 3;
1808
+        $grbit          |= $fDraft << 4;
1809
+        $grbit          |= $fNotes << 5;
1810
+        $grbit          |= $fNoOrient << 6;
1811
+        $grbit          |= $fUsePage << 7;
1812 1812
 
1813 1813
         $numHdr = pack("d", $numHdr);
1814 1814
         $numFtr = pack("d", $numFtr);
@@ -1819,7 +1819,7 @@  discard block
 block discarded – undo
1819 1819
 
1820 1820
         $header = pack("vv", $record, $length);
1821 1821
         $data1  = pack("vvvvvvvv", $iPaperSize, $iScale, $iPageStart, $iFitWidth, $iFitHeight, $grbit, $iRes, $iVRes);
1822
-        $data2  = $numHdr.$numFtr;
1822
+        $data2  = $numHdr . $numFtr;
1823 1823
         $data3  = pack("v", $iCopies);
1824 1824
         $this->append($header . $data1 . $data2 . $data3);
1825 1825
     }
@@ -1829,7 +1829,7 @@  discard block
 block discarded – undo
1829 1829
      */
1830 1830
     private function writeHeader()
1831 1831
     {
1832
-        $record  = 0x0014;               // Record identifier
1832
+        $record = 0x0014; // Record identifier
1833 1833
 
1834 1834
         /* removing for now
1835 1835
         // need to fix character count (multibyte!)
@@ -1843,7 +1843,7 @@  discard block
 block discarded – undo
1843 1843
         $recordData = \PHPExcel\Shared\StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader());
1844 1844
         $length = strlen($recordData);
1845 1845
 
1846
-        $header   = pack("vv", $record, $length);
1846
+        $header = pack("vv", $record, $length);
1847 1847
 
1848 1848
         $this->append($header . $recordData);
1849 1849
     }
@@ -1853,7 +1853,7 @@  discard block
 block discarded – undo
1853 1853
      */
1854 1854
     private function writeFooter()
1855 1855
     {
1856
-        $record  = 0x0015;               // Record identifier
1856
+        $record = 0x0015; // Record identifier
1857 1857
 
1858 1858
         /* removing for now
1859 1859
         // need to fix character count (multibyte!)
@@ -1867,7 +1867,7 @@  discard block
 block discarded – undo
1867 1867
         $recordData = \PHPExcel\Shared\StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddFooter());
1868 1868
         $length = strlen($recordData);
1869 1869
 
1870
-        $header    = pack("vv", $record, $length);
1870
+        $header = pack("vv", $record, $length);
1871 1871
 
1872 1872
         $this->append($header . $recordData);
1873 1873
     }
@@ -1879,15 +1879,15 @@  discard block
 block discarded – undo
1879 1879
      */
1880 1880
     private function writeHcenter()
1881 1881
     {
1882
-        $record   = 0x0083;              // Record identifier
1883
-        $length   = 0x0002;              // Bytes to follow
1882
+        $record   = 0x0083; // Record identifier
1883
+        $length   = 0x0002; // Bytes to follow
1884 1884
 
1885
-        $fHCenter = $this->phpSheet->getPageSetup()->getHorizontalCentered() ? 1 : 0;     // Horizontal centering
1885
+        $fHCenter = $this->phpSheet->getPageSetup()->getHorizontalCentered() ? 1 : 0; // Horizontal centering
1886 1886
 
1887 1887
         $header    = pack("vv", $record, $length);
1888 1888
         $data      = pack("v", $fHCenter);
1889 1889
 
1890
-        $this->append($header.$data);
1890
+        $this->append($header . $data);
1891 1891
     }
1892 1892
 
1893 1893
     /**
@@ -1895,10 +1895,10 @@  discard block
 block discarded – undo
1895 1895
      */
1896 1896
     private function writeVcenter()
1897 1897
     {
1898
-        $record   = 0x0084;              // Record identifier
1899
-        $length   = 0x0002;              // Bytes to follow
1898
+        $record   = 0x0084; // Record identifier
1899
+        $length   = 0x0002; // Bytes to follow
1900 1900
 
1901
-        $fVCenter = $this->phpSheet->getPageSetup()->getVerticalCentered() ? 1 : 0;     // Horizontal centering
1901
+        $fVCenter = $this->phpSheet->getPageSetup()->getVerticalCentered() ? 1 : 0; // Horizontal centering
1902 1902
 
1903 1903
         $header    = pack("vv", $record, $length);
1904 1904
         $data      = pack("v", $fVCenter);
@@ -1910,10 +1910,10 @@  discard block
 block discarded – undo
1910 1910
      */
1911 1911
     private function writeMarginLeft()
1912 1912
     {
1913
-        $record  = 0x0026;                   // Record identifier
1914
-        $length  = 0x0008;                   // Bytes to follow
1913
+        $record  = 0x0026; // Record identifier
1914
+        $length  = 0x0008; // Bytes to follow
1915 1915
 
1916
-        $margin  = $this->phpSheet->getPageMargins()->getLeft();     // Margin in inches
1916
+        $margin  = $this->phpSheet->getPageMargins()->getLeft(); // Margin in inches
1917 1917
 
1918 1918
         $header    = pack("vv", $record, $length);
1919 1919
         $data      = pack("d", $margin);
@@ -1929,10 +1929,10 @@  discard block
 block discarded – undo
1929 1929
      */
1930 1930
     private function writeMarginRight()
1931 1931
     {
1932
-        $record  = 0x0027;                   // Record identifier
1933
-        $length  = 0x0008;                   // Bytes to follow
1932
+        $record  = 0x0027; // Record identifier
1933
+        $length  = 0x0008; // Bytes to follow
1934 1934
 
1935
-        $margin  = $this->phpSheet->getPageMargins()->getRight();     // Margin in inches
1935
+        $margin  = $this->phpSheet->getPageMargins()->getRight(); // Margin in inches
1936 1936
 
1937 1937
         $header    = pack("vv", $record, $length);
1938 1938
         $data      = pack("d", $margin);
@@ -1948,10 +1948,10 @@  discard block
 block discarded – undo
1948 1948
      */
1949 1949
     private function writeMarginTop()
1950 1950
     {
1951
-        $record  = 0x0028;                   // Record identifier
1952
-        $length  = 0x0008;                   // Bytes to follow
1951
+        $record  = 0x0028; // Record identifier
1952
+        $length  = 0x0008; // Bytes to follow
1953 1953
 
1954
-        $margin  = $this->phpSheet->getPageMargins()->getTop();     // Margin in inches
1954
+        $margin  = $this->phpSheet->getPageMargins()->getTop(); // Margin in inches
1955 1955
 
1956 1956
         $header    = pack("vv", $record, $length);
1957 1957
         $data      = pack("d", $margin);
@@ -1967,10 +1967,10 @@  discard block
 block discarded – undo
1967 1967
      */
1968 1968
     private function writeMarginBottom()
1969 1969
     {
1970
-        $record  = 0x0029;                   // Record identifier
1971
-        $length  = 0x0008;                   // Bytes to follow
1970
+        $record  = 0x0029; // Record identifier
1971
+        $length  = 0x0008; // Bytes to follow
1972 1972
 
1973
-        $margin  = $this->phpSheet->getPageMargins()->getBottom();     // Margin in inches
1973
+        $margin  = $this->phpSheet->getPageMargins()->getBottom(); // Margin in inches
1974 1974
 
1975 1975
         $header    = pack("vv", $record, $length);
1976 1976
         $data      = pack("d", $margin);
@@ -1986,10 +1986,10 @@  discard block
 block discarded – undo
1986 1986
      */
1987 1987
     private function writePrintHeaders()
1988 1988
     {
1989
-        $record      = 0x002a;                   // Record identifier
1990
-        $length      = 0x0002;                   // Bytes to follow
1989
+        $record      = 0x002a; // Record identifier
1990
+        $length      = 0x0002; // Bytes to follow
1991 1991
 
1992
-        $fPrintRwCol = $this->_print_headers;     // Boolean flag
1992
+        $fPrintRwCol = $this->_print_headers; // Boolean flag
1993 1993
 
1994 1994
         $header      = pack("vv", $record, $length);
1995 1995
         $data        = pack("v", $fPrintRwCol);
@@ -2002,13 +2002,13 @@  discard block
 block discarded – undo
2002 2002
      */
2003 2003
     private function writePrintGridlines()
2004 2004
     {
2005
-        $record      = 0x002b;                    // Record identifier
2006
-        $length      = 0x0002;                    // Bytes to follow
2005
+        $record      = 0x002b; // Record identifier
2006
+        $length      = 0x0002; // Bytes to follow
2007 2007
 
2008
-        $fPrintGrid  = $this->phpSheet->getPrintGridlines() ? 1 : 0;    // Boolean flag
2008
+        $fPrintGrid  = $this->phpSheet->getPrintGridlines() ? 1 : 0; // Boolean flag
2009 2009
 
2010 2010
         $header      = pack("vv", $record, $length);
2011
-        $data      = pack("v", $fPrintGrid);
2011
+        $data = pack("v", $fPrintGrid);
2012 2012
         $this->append($header . $data);
2013 2013
     }
2014 2014
 
@@ -2018,10 +2018,10 @@  discard block
 block discarded – undo
2018 2018
      */
2019 2019
     private function writeGridset()
2020 2020
     {
2021
-        $record      = 0x0082;                        // Record identifier
2022
-        $length      = 0x0002;                        // Bytes to follow
2021
+        $record      = 0x0082; // Record identifier
2022
+        $length      = 0x0002; // Bytes to follow
2023 2023
 
2024
-        $fGridSet    = !$this->phpSheet->getPrintGridlines();     // Boolean flag
2024
+        $fGridSet    = !$this->phpSheet->getPrintGridlines(); // Boolean flag
2025 2025
 
2026 2026
         $header      = pack("vv", $record, $length);
2027 2027
         $data        = pack("v", $fGridSet);
@@ -2033,8 +2033,8 @@  discard block
 block discarded – undo
2033 2033
      */
2034 2034
     private function writeAutoFilterInfo()
2035 2035
     {
2036
-        $record      = 0x009D;                        // Record identifier
2037
-        $length      = 0x0002;                        // Bytes to follow
2036
+        $record      = 0x009D; // Record identifier
2037
+        $length      = 0x0002; // Bytes to follow
2038 2038
 
2039 2039
         $rangeBounds = \PHPExcel\Cell::rangeBoundaries($this->phpSheet->getAutoFilter()->getRange());
2040 2040
         $iNumFilters = 1 + $rangeBounds[1][0] - $rangeBounds[0][0];
@@ -2053,11 +2053,11 @@  discard block
 block discarded – undo
2053 2053
      */
2054 2054
     private function writeGuts()
2055 2055
     {
2056
-        $record      = 0x0080;   // Record identifier
2057
-        $length      = 0x0008;   // Bytes to follow
2056
+        $record      = 0x0080; // Record identifier
2057
+        $length      = 0x0008; // Bytes to follow
2058 2058
 
2059
-        $dxRwGut     = 0x0000;   // Size of row gutter
2060
-        $dxColGut    = 0x0000;   // Size of col gutter
2059
+        $dxRwGut     = 0x0000; // Size of row gutter
2060
+        $dxColGut    = 0x0000; // Size of col gutter
2061 2061
 
2062 2062
         // determine maximum row outline level
2063 2063
         $maxRowOutlineLevel = 0;
@@ -2065,7 +2065,7 @@  discard block
 block discarded – undo
2065 2065
             $maxRowOutlineLevel = max($maxRowOutlineLevel, $rowDimension->getOutlineLevel());
2066 2066
         }
2067 2067
 
2068
-        $col_level   = 0;
2068
+        $col_level = 0;
2069 2069
 
2070 2070
         // Calculate the maximum column outline level. The equivalent calculation
2071 2071
         // for the row outline level is carried out in writeRow().
@@ -2088,7 +2088,7 @@  discard block
 block discarded – undo
2088 2088
         $header      = pack("vv", $record, $length);
2089 2089
         $data        = pack("vvvv", $dxRwGut, $dxColGut, $maxRowOutlineLevel, $col_level);
2090 2090
 
2091
-        $this->append($header.$data);
2091
+        $this->append($header . $data);
2092 2092
     }
2093 2093
 
2094 2094
     /**
@@ -2097,15 +2097,15 @@  discard block
 block discarded – undo
2097 2097
      */
2098 2098
     private function writeWsbool()
2099 2099
     {
2100
-        $record      = 0x0081;   // Record identifier
2101
-        $length      = 0x0002;   // Bytes to follow
2100
+        $record      = 0x0081; // Record identifier
2101
+        $length      = 0x0002; // Bytes to follow
2102 2102
         $grbit       = 0x0000;
2103 2103
 
2104 2104
         // The only option that is of interest is the flag for fit to page. So we
2105 2105
         // set all the options in one go.
2106 2106
         //
2107 2107
         // Set the option flags
2108
-        $grbit |= 0x0001;                           // Auto page breaks visible
2108
+        $grbit |= 0x0001; // Auto page breaks visible
2109 2109
         if ($this->outlineStyle) {
2110 2110
             $grbit |= 0x0020; // Auto outline styles
2111 2111
         }
@@ -2165,9 +2165,9 @@  discard block
 block discarded – undo
2165 2165
                 array_shift($hbreaks);
2166 2166
             }
2167 2167
 
2168
-            $record  = 0x001b;               // Record identifier
2169
-            $cbrk    = count($hbreaks);       // Number of page breaks
2170
-            $length  = 2 + 6 * $cbrk;      // Bytes to follow
2168
+            $record  = 0x001b; // Record identifier
2169
+            $cbrk    = count($hbreaks); // Number of page breaks
2170
+            $length  = 2 + 6 * $cbrk; // Bytes to follow
2171 2171
 
2172 2172
             $header  = pack("vv", $record, $length);
2173 2173
             $data    = pack("v", $cbrk);
@@ -2192,9 +2192,9 @@  discard block
 block discarded – undo
2192 2192
                 array_shift($vbreaks);
2193 2193
             }
2194 2194
 
2195
-            $record  = 0x001a;               // Record identifier
2196
-            $cbrk    = count($vbreaks);       // Number of page breaks
2197
-            $length  = 2 + 6 * $cbrk;      // Bytes to follow
2195
+            $record  = 0x001a; // Record identifier
2196
+            $cbrk    = count($vbreaks); // Number of page breaks
2197
+            $length  = 2 + 6 * $cbrk; // Bytes to follow
2198 2198
 
2199 2199
             $header  = pack("vv", $record, $length);
2200 2200
             $data    = pack("v", $cbrk);
@@ -2218,15 +2218,15 @@  discard block
 block discarded – undo
2218 2218
             return;
2219 2219
         }
2220 2220
 
2221
-        $record      = 0x0012;             // Record identifier
2222
-        $length      = 0x0002;             // Bytes to follow
2221
+        $record      = 0x0012; // Record identifier
2222
+        $length      = 0x0002; // Bytes to follow
2223 2223
 
2224
-        $fLock      = 1;    // Worksheet is protected
2224
+        $fLock = 1; // Worksheet is protected
2225 2225
 
2226
-        $header      = pack("vv", $record, $length);
2227
-        $data      = pack("v", $fLock);
2226
+        $header = pack("vv", $record, $length);
2227
+        $data = pack("v", $fLock);
2228 2228
 
2229
-        $this->append($header.$data);
2229
+        $this->append($header . $data);
2230 2230
     }
2231 2231
 
2232 2232
     /**
@@ -2287,10 +2287,10 @@  discard block
 block discarded – undo
2287 2287
             return;
2288 2288
         }
2289 2289
 
2290
-        $record      = 0x0013;               // Record identifier
2291
-        $length      = 0x0002;               // Bytes to follow
2290
+        $record      = 0x0013; // Record identifier
2291
+        $length      = 0x0002; // Bytes to follow
2292 2292
 
2293
-        $wPassword   = hexdec($this->phpSheet->getProtection()->getPassword());     // Encoded password
2293
+        $wPassword   = hexdec($this->phpSheet->getProtection()->getPassword()); // Encoded password
2294 2294
 
2295 2295
         $header      = pack("vv", $record, $length);
2296 2296
         $data        = pack("v", $wPassword);
@@ -2330,7 +2330,7 @@  discard block
 block discarded – undo
2330 2330
         $lcb         = $size;
2331 2331
 
2332 2332
         $header      = pack("vvvvV", $record, $length, $cf, $env, $lcb);
2333
-        $this->append($header.$data);
2333
+        $this->append($header . $data);
2334 2334
     }
2335 2335
 
2336 2336
     /**
@@ -2387,8 +2387,8 @@  discard block
 block discarded – undo
2387 2387
     public function positionImage($col_start, $row_start, $x1, $y1, $width, $height)
2388 2388
     {
2389 2389
         // Initialise end cell to the same as the start cell
2390
-        $col_end    = $col_start;  // Col containing lower right corner of object
2391
-        $row_end    = $row_start;  // Row containing bottom right corner of object
2390
+        $col_end    = $col_start; // Col containing lower right corner of object
2391
+        $row_end    = $row_start; // Row containing bottom right corner of object
2392 2392
 
2393 2393
         // Zero the specified offset if greater than the cell dimensions
2394 2394
         if ($x1 >= \PHPExcel\Shared\Excel5::sizeCol($this->phpSheet, \PHPExcel\Cell::stringFromColumnIndex($col_start))) {
@@ -2398,8 +2398,8 @@  discard block
 block discarded – undo
2398 2398
             $y1 = 0;
2399 2399
         }
2400 2400
 
2401
-        $width      = $width  + $x1 -1;
2402
-        $height     = $height + $y1 -1;
2401
+        $width      = $width + $x1 - 1;
2402
+        $height     = $height + $y1 - 1;
2403 2403
 
2404 2404
         // Subtract the underlying cell widths to find the end cell of the image
2405 2405
         while ($width >= \PHPExcel\Shared\Excel5::sizeCol($this->phpSheet, \PHPExcel\Cell::stringFromColumnIndex($col_end))) {
@@ -2419,21 +2419,21 @@  discard block
 block discarded – undo
2419 2419
         if (\PHPExcel\Shared\Excel5::sizeCol($this->phpSheet, \PHPExcel\Cell::stringFromColumnIndex($col_start)) == 0) {
2420 2420
             return;
2421 2421
         }
2422
-        if (\PHPExcel\Shared\Excel5::sizeCol($this->phpSheet, \PHPExcel\Cell::stringFromColumnIndex($col_end))   == 0) {
2422
+        if (\PHPExcel\Shared\Excel5::sizeCol($this->phpSheet, \PHPExcel\Cell::stringFromColumnIndex($col_end)) == 0) {
2423 2423
             return;
2424 2424
         }
2425 2425
         if (\PHPExcel\Shared\Excel5::sizeRow($this->phpSheet, $row_start + 1) == 0) {
2426 2426
             return;
2427 2427
         }
2428
-        if (\PHPExcel\Shared\Excel5::sizeRow($this->phpSheet, $row_end + 1)   == 0) {
2428
+        if (\PHPExcel\Shared\Excel5::sizeRow($this->phpSheet, $row_end + 1) == 0) {
2429 2429
             return;
2430 2430
         }
2431 2431
 
2432 2432
         // Convert the pixel values to the percentage value expected by Excel
2433
-        $x1 = $x1     / \PHPExcel\Shared\Excel5::sizeCol($this->phpSheet, \PHPExcel\Cell::stringFromColumnIndex($col_start))   * 1024;
2434
-        $y1 = $y1     / \PHPExcel\Shared\Excel5::sizeRow($this->phpSheet, $row_start + 1)   *  256;
2435
-        $x2 = $width  / \PHPExcel\Shared\Excel5::sizeCol($this->phpSheet, \PHPExcel\Cell::stringFromColumnIndex($col_end))     * 1024; // Distance to right side of object
2436
-        $y2 = $height / \PHPExcel\Shared\Excel5::sizeRow($this->phpSheet, $row_end + 1)     *  256; // Distance to bottom of object
2433
+        $x1 = $x1 / \PHPExcel\Shared\Excel5::sizeCol($this->phpSheet, \PHPExcel\Cell::stringFromColumnIndex($col_start)) * 1024;
2434
+        $y1 = $y1 / \PHPExcel\Shared\Excel5::sizeRow($this->phpSheet, $row_start + 1) * 256;
2435
+        $x2 = $width / \PHPExcel\Shared\Excel5::sizeCol($this->phpSheet, \PHPExcel\Cell::stringFromColumnIndex($col_end)) * 1024; // Distance to right side of object
2436
+        $y2 = $height / \PHPExcel\Shared\Excel5::sizeRow($this->phpSheet, $row_end + 1) * 256; // Distance to bottom of object
2437 2437
 
2438 2438
         $this->writeObjPicture($col_start, $x1, $row_start, $y1, $col_end, $x2, $row_end, $y2);
2439 2439
     }
@@ -2453,33 +2453,33 @@  discard block
 block discarded – undo
2453 2453
      */
2454 2454
     private function writeObjPicture($colL, $dxL, $rwT, $dyT, $colR, $dxR, $rwB, $dyB)
2455 2455
     {
2456
-        $record      = 0x005d;   // Record identifier
2457
-        $length      = 0x003c;   // Bytes to follow
2458
-
2459
-        $cObj        = 0x0001;   // Count of objects in file (set to 1)
2460
-        $OT          = 0x0008;   // Object type. 8 = Picture
2461
-        $id          = 0x0001;   // Object ID
2462
-        $grbit       = 0x0614;   // Option flags
2463
-
2464
-        $cbMacro     = 0x0000;   // Length of FMLA structure
2465
-        $Reserved1   = 0x0000;   // Reserved
2466
-        $Reserved2   = 0x0000;   // Reserved
2467
-
2468
-        $icvBack     = 0x09;     // Background colour
2469
-        $icvFore     = 0x09;     // Foreground colour
2470
-        $fls         = 0x00;     // Fill pattern
2471
-        $fAuto       = 0x00;     // Automatic fill
2472
-        $icv         = 0x08;     // Line colour
2473
-        $lns         = 0xff;     // Line style
2474
-        $lnw         = 0x01;     // Line weight
2475
-        $fAutoB      = 0x00;     // Automatic border
2476
-        $frs         = 0x0000;   // Frame style
2477
-        $cf          = 0x0009;   // Image format, 9 = bitmap
2478
-        $Reserved3   = 0x0000;   // Reserved
2479
-        $cbPictFmla  = 0x0000;   // Length of FMLA structure
2480
-        $Reserved4   = 0x0000;   // Reserved
2481
-        $grbit2      = 0x0001;   // Option flags
2482
-        $Reserved5   = 0x0000;   // Reserved
2456
+        $record      = 0x005d; // Record identifier
2457
+        $length      = 0x003c; // Bytes to follow
2458
+
2459
+        $cObj        = 0x0001; // Count of objects in file (set to 1)
2460
+        $OT          = 0x0008; // Object type. 8 = Picture
2461
+        $id          = 0x0001; // Object ID
2462
+        $grbit       = 0x0614; // Option flags
2463
+
2464
+        $cbMacro     = 0x0000; // Length of FMLA structure
2465
+        $Reserved1   = 0x0000; // Reserved
2466
+        $Reserved2   = 0x0000; // Reserved
2467
+
2468
+        $icvBack     = 0x09; // Background colour
2469
+        $icvFore     = 0x09; // Foreground colour
2470
+        $fls         = 0x00; // Fill pattern
2471
+        $fAuto       = 0x00; // Automatic fill
2472
+        $icv         = 0x08; // Line colour
2473
+        $lns         = 0xff; // Line style
2474
+        $lnw         = 0x01; // Line weight
2475
+        $fAutoB      = 0x00; // Automatic border
2476
+        $frs         = 0x0000; // Frame style
2477
+        $cf          = 0x0009; // Image format, 9 = bitmap
2478
+        $Reserved3   = 0x0000; // Reserved
2479
+        $cbPictFmla  = 0x0000; // Length of FMLA structure
2480
+        $Reserved4   = 0x0000; // Reserved
2481
+        $grbit2      = 0x0001; // Option flags
2482
+        $Reserved5   = 0x0000; // Reserved
2483 2483
 
2484 2484
 
2485 2485
         $header      = pack("vv", $record, $length);
@@ -2530,16 +2530,16 @@  discard block
 block discarded – undo
2530 2530
         $height = imagesy($image);
2531 2531
 
2532 2532
         $data = pack("Vvvvv", 0x000c, $width, $height, 0x01, 0x18);
2533
-        for ($j=$height; $j--;) {
2534
-            for ($i=0; $i < $width; ++$i) {
2533
+        for ($j = $height; $j--;) {
2534
+            for ($i = 0; $i < $width; ++$i) {
2535 2535
                 $color = imagecolorsforindex($image, imagecolorat($image, $i, $j));
2536 2536
                 foreach (array("red", "green", "blue") as $key) {
2537 2537
                     $color[$key] = $color[$key] + round((255 - $color[$key]) * $color["alpha"] / 127);
2538 2538
                 }
2539 2539
                 $data .= chr($color["blue"]) . chr($color["green"]) . chr($color["red"]);
2540 2540
             }
2541
-            if (3*$width % 4) {
2542
-                $data .= str_repeat("\x00", 4 - 3*$width % 4);
2541
+            if (3 * $width % 4) {
2542
+                $data .= str_repeat("\x00", 4 - 3 * $width % 4);
2543 2543
             }
2544 2544
         }
2545 2545
 
@@ -2583,7 +2583,7 @@  discard block
 block discarded – undo
2583 2583
         // Read and remove the bitmap size. This is more reliable than reading
2584 2584
         // the data size at offset 0x22.
2585 2585
         //
2586
-        $size_array   = unpack("Vsa", substr($data, 0, 4));
2586
+        $size_array = unpack("Vsa", substr($data, 0, 4));
2587 2587
         $size   = $size_array['sa'];
2588 2588
         $data   = substr($data, 4);
2589 2589
         $size  -= 0x36; // Subtract size of bitmap header.
@@ -2644,8 +2644,8 @@  discard block
 block discarded – undo
2644 2644
             return;
2645 2645
         }
2646 2646
 
2647
-        $record      = 0x00A0;               // Record identifier
2648
-        $length      = 0x0004;               // Bytes to follow
2647
+        $record      = 0x00A0; // Record identifier
2648
+        $length      = 0x0004; // Bytes to follow
2649 2649
 
2650 2650
         $header      = pack("vv", $record, $length);
2651 2651
         $data        = pack("vv", $this->phpSheet->getSheetView()->getZoomScale(), 100);
@@ -2690,10 +2690,10 @@  discard block
 block discarded – undo
2690 2690
             $nm = count($spOffsets) - 1; // number of shapes excluding first shape
2691 2691
             for ($i = 1; $i <= $nm; ++$i) {
2692 2692
                 // MSODRAWING record
2693
-                $record = 0x00EC;            // Record identifier
2693
+                $record = 0x00EC; // Record identifier
2694 2694
 
2695 2695
                 // chunk of Escher stream for one shape
2696
-                $dataChunk = substr($data, $spOffsets[$i -1], $spOffsets[$i] - $spOffsets[$i - 1]);
2696
+                $dataChunk = substr($data, $spOffsets[$i - 1], $spOffsets[$i] - $spOffsets[$i - 1]);
2697 2697
 
2698 2698
                 $length = strlen($dataChunk);
2699 2699
                 $header = pack("vv", $record, $length);
@@ -2768,20 +2768,20 @@  discard block
 block discarded – undo
2768 2768
         // Write data validations?
2769 2769
         if (!empty($dataValidationCollection)) {
2770 2770
             // DATAVALIDATIONS record
2771
-            $record = 0x01B2;      // Record identifier
2772
-            $length = 0x0012;      // Bytes to follow
2771
+            $record = 0x01B2; // Record identifier
2772
+            $length = 0x0012; // Bytes to follow
2773 2773
 
2774
-            $grbit  = 0x0000;       // Prompt box at cell, no cached validity data at DV records
2775
-            $horPos = 0x00000000;  // Horizontal position of prompt box, if fixed position
2776
-            $verPos = 0x00000000;  // Vertical position of prompt box, if fixed position
2777
-            $objId  = 0xFFFFFFFF;  // Object identifier of drop down arrow object, or -1 if not visible
2774
+            $grbit  = 0x0000; // Prompt box at cell, no cached validity data at DV records
2775
+            $horPos = 0x00000000; // Horizontal position of prompt box, if fixed position
2776
+            $verPos = 0x00000000; // Vertical position of prompt box, if fixed position
2777
+            $objId  = 0xFFFFFFFF; // Object identifier of drop down arrow object, or -1 if not visible
2778 2778
 
2779 2779
             $header = pack('vv', $record, $length);
2780 2780
             $data   = pack('vVVVV', $grbit, $horPos, $verPos, $objId, count($dataValidationCollection));
2781
-            $this->append($header.$data);
2781
+            $this->append($header . $data);
2782 2782
 
2783 2783
             // DATAVALIDATION records
2784
-            $record = 0x01BE;              // Record identifier
2784
+            $record = 0x01BE; // Record identifier
2785 2785
 
2786 2786
             foreach ($dataValidationCollection as $cellCoordinate => $dataValidation) {
2787 2787
                 // initialize record data
@@ -2981,8 +2981,8 @@  discard block
 block discarded – undo
2981 2981
      */
2982 2982
     private function writePageLayoutView()
2983 2983
     {
2984
-        $record      = 0x088B;               // Record identifier
2985
-        $length      = 0x0010;               // Bytes to follow
2984
+        $record      = 0x088B; // Record identifier
2985
+        $length      = 0x0010; // Bytes to follow
2986 2986
 
2987 2987
         $rt         = 0x088B; // 2
2988 2988
         $grbitFrt   = 0x0000; // 2
@@ -2998,12 +2998,12 @@  discard block
 block discarded – undo
2998 2998
         $fRulerVisible     = 0;
2999 2999
         $fWhitespaceHidden = 0;
3000 3000
 
3001
-        $grbit      = $fPageLayoutView; // 2
3002
-        $grbit        |= $fRulerVisible       << 1;
3003
-        $grbit        |= $fWhitespaceHidden  << 3;
3001
+        $grbit = $fPageLayoutView; // 2
3002
+        $grbit        |= $fRulerVisible << 1;
3003
+        $grbit        |= $fWhitespaceHidden << 3;
3004 3004
 
3005
-        $header      = pack("vv", $record, $length);
3006
-        $data      = pack("vvVVvv", $rt, $grbitFrt, 0x00000000, 0x00000000, $wScalvePLV, $grbit);
3005
+        $header = pack("vv", $record, $length);
3006
+        $data = pack("vvVVvv", $rt, $grbitFrt, 0x00000000, 0x00000000, $wScalvePLV, $grbit);
3007 3007
         $this->append($header . $data);
3008 3008
     }
3009 3009
 
@@ -3013,7 +3013,7 @@  discard block
 block discarded – undo
3013 3013
      */
3014 3014
     private function writeCFRule(\PHPExcel\Style\Conditional $conditional)
3015 3015
     {
3016
-        $record      = 0x01B1;               // Record identifier
3016
+        $record = 0x01B1; // Record identifier
3017 3017
 
3018 3018
         // $type : Type of the CF
3019 3019
         // $operatorType : Comparison operator
@@ -3133,49 +3133,49 @@  discard block
 block discarded – undo
3133 3133
         }
3134 3134
         // Alignment
3135 3135
         $flags = 0;
3136
-        $flags |= (1 == $bAlignHz      ? 0x00000001 : 0);
3137
-        $flags |= (1 == $bAlignVt      ? 0x00000002 : 0);
3138
-        $flags |= (1 == $bAlignWrapTx  ? 0x00000004 : 0);
3139
-        $flags |= (1 == $bTxRotation   ? 0x00000008 : 0);
3136
+        $flags |= (1 == $bAlignHz ? 0x00000001 : 0);
3137
+        $flags |= (1 == $bAlignVt ? 0x00000002 : 0);
3138
+        $flags |= (1 == $bAlignWrapTx ? 0x00000004 : 0);
3139
+        $flags |= (1 == $bTxRotation ? 0x00000008 : 0);
3140 3140
         // Justify last line flag
3141
-        $flags |= (1 == 1              ? 0x00000010 : 0);
3142
-        $flags |= (1 == $bIndent       ? 0x00000020 : 0);
3143
-        $flags |= (1 == $bShrinkToFit  ? 0x00000040 : 0);
3141
+        $flags |= (1 == 1 ? 0x00000010 : 0);
3142
+        $flags |= (1 == $bIndent ? 0x00000020 : 0);
3143
+        $flags |= (1 == $bShrinkToFit ? 0x00000040 : 0);
3144 3144
         // Default
3145
-        $flags |= (1 == 1              ? 0x00000080 : 0);
3145
+        $flags |= (1 == 1 ? 0x00000080 : 0);
3146 3146
         // Protection
3147
-        $flags |= (1 == $bProtLocked   ? 0x00000100 : 0);
3148
-        $flags |= (1 == $bProtHidden   ? 0x00000200 : 0);
3147
+        $flags |= (1 == $bProtLocked ? 0x00000100 : 0);
3148
+        $flags |= (1 == $bProtHidden ? 0x00000200 : 0);
3149 3149
         // Border
3150
-        $flags |= (1 == $bBorderLeft   ? 0x00000400 : 0);
3151
-        $flags |= (1 == $bBorderRight  ? 0x00000800 : 0);
3152
-        $flags |= (1 == $bBorderTop    ? 0x00001000 : 0);
3150
+        $flags |= (1 == $bBorderLeft ? 0x00000400 : 0);
3151
+        $flags |= (1 == $bBorderRight ? 0x00000800 : 0);
3152
+        $flags |= (1 == $bBorderTop ? 0x00001000 : 0);
3153 3153
         $flags |= (1 == $bBorderBottom ? 0x00002000 : 0);
3154
-        $flags |= (1 == 1              ? 0x00004000 : 0); // Top left to Bottom right border
3155
-        $flags |= (1 == 1              ? 0x00008000 : 0); // Bottom left to Top right border
3154
+        $flags |= (1 == 1 ? 0x00004000 : 0); // Top left to Bottom right border
3155
+        $flags |= (1 == 1 ? 0x00008000 : 0); // Bottom left to Top right border
3156 3156
         // Pattern
3157
-        $flags |= (1 == $bFillStyle    ? 0x00010000 : 0);
3158
-        $flags |= (1 == $bFillColor    ? 0x00020000 : 0);
3159
-        $flags |= (1 == $bFillColorBg  ? 0x00040000 : 0);
3160
-        $flags |= (1 == 1              ? 0x00380000 : 0);
3157
+        $flags |= (1 == $bFillStyle ? 0x00010000 : 0);
3158
+        $flags |= (1 == $bFillColor ? 0x00020000 : 0);
3159
+        $flags |= (1 == $bFillColorBg ? 0x00040000 : 0);
3160
+        $flags |= (1 == 1 ? 0x00380000 : 0);
3161 3161
         // Font
3162
-        $flags |= (1 == $bFormatFont   ? 0x04000000 : 0);
3162
+        $flags |= (1 == $bFormatFont ? 0x04000000 : 0);
3163 3163
         // Alignment:
3164
-        $flags |= (1 == $bFormatAlign  ? 0x08000000 : 0);
3164
+        $flags |= (1 == $bFormatAlign ? 0x08000000 : 0);
3165 3165
         // Border
3166 3166
         $flags |= (1 == $bFormatBorder ? 0x10000000 : 0);
3167 3167
         // Pattern
3168
-        $flags |= (1 == $bFormatFill   ? 0x20000000 : 0);
3168
+        $flags |= (1 == $bFormatFill ? 0x20000000 : 0);
3169 3169
         // Protection
3170
-        $flags |= (1 == $bFormatProt   ? 0x40000000 : 0);
3170
+        $flags |= (1 == $bFormatProt ? 0x40000000 : 0);
3171 3171
         // Text direction
3172
-        $flags |= (1 == 0              ? 0x80000000 : 0);
3172
+        $flags |= (1 == 0 ? 0x80000000 : 0);
3173 3173
 
3174 3174
         // Data Blocks
3175 3175
         if ($bFormatFont == 1) {
3176 3176
             // Font Name
3177 3177
             if ($conditional->getStyle()->getFont()->getName() == null) {
3178
-                $dataBlockFont =  pack('VVVVVVVV', 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
3178
+                $dataBlockFont = pack('VVVVVVVV', 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
3179 3179
                 $dataBlockFont .= pack('VVVVVVVV', 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
3180 3180
             } else {
3181 3181
                 $dataBlockFont = \PHPExcel\Shared\StringHelper::UTF8toBIFF8UnicodeLong($conditional->getStyle()->getFont()->getName());
@@ -3414,11 +3414,11 @@  discard block
 block discarded – undo
3414 3414
             // Options flags for modified font attributes
3415 3415
             $optionsFlags = 0;
3416 3416
             $optionsFlagsBold = ($conditional->getStyle()->getFont()->getBold() == null ? 1 : 0);
3417
-            $optionsFlags |= (1 == $optionsFlagsBold  ? 0x00000002 : 0);
3418
-            $optionsFlags |= (1 == 1                  ? 0x00000008 : 0);
3419
-            $optionsFlags |= (1 == 1                  ? 0x00000010 : 0);
3420
-            $optionsFlags |= (1 == 0                  ? 0x00000020 : 0);
3421
-            $optionsFlags |= (1 == 1                  ? 0x00000080 : 0);
3417
+            $optionsFlags |= (1 == $optionsFlagsBold ? 0x00000002 : 0);
3418
+            $optionsFlags |= (1 == 1 ? 0x00000008 : 0);
3419
+            $optionsFlags |= (1 == 1 ? 0x00000010 : 0);
3420
+            $optionsFlags |= (1 == 0 ? 0x00000020 : 0);
3421
+            $optionsFlags |= (1 == 1 ? 0x00000080 : 0);
3422 3422
             $dataBlockFont .= pack('V', $optionsFlags);
3423 3423
             // Escapement type
3424 3424
             $dataBlockFont .= pack('V', $fontEscapement);
@@ -3789,10 +3789,10 @@  discard block
 block discarded – undo
3789 3789
                     break;
3790 3790
                 case \PHPExcel\Style\Fill::FILL_GRADIENT_LINEAR:
3791 3791
                     $blockFillPatternStyle = 0x00;
3792
-                    break;    // does not exist in BIFF8
3792
+                    break; // does not exist in BIFF8
3793 3793
                 case \PHPExcel\Style\Fill::FILL_GRADIENT_PATH:
3794 3794
                     $blockFillPatternStyle = 0x00;
3795
-                    break;    // does not exist in BIFF8
3795
+                    break; // does not exist in BIFF8
3796 3796
                 default:
3797 3797
                     $blockFillPatternStyle = 0x00;
3798 3798
                     break;
@@ -4180,7 +4180,7 @@  discard block
 block discarded – undo
4180 4180
         if (!is_null($operand2)) {
4181 4181
             $data .= $operand2;
4182 4182
         }
4183
-        $header      = pack('vv', $record, strlen($data));
4183
+        $header = pack('vv', $record, strlen($data));
4184 4184
         $this->append($header . $data);
4185 4185
     }
4186 4186
 
@@ -4189,8 +4189,8 @@  discard block
 block discarded – undo
4189 4189
      */
4190 4190
     private function writeCFHeader()
4191 4191
     {
4192
-        $record      = 0x01B0;               // Record identifier
4193
-        $length      = 0x0016;               // Bytes to follow
4192
+        $record      = 0x01B0; // Record identifier
4193
+        $length      = 0x0016; // Bytes to follow
4194 4194
 
4195 4195
         $numColumnMin = null;
4196 4196
         $numColumnMax = null;
@@ -4225,9 +4225,9 @@  discard block
 block discarded – undo
4225 4225
             }
4226 4226
         }
4227 4227
         $needRedraw = 1;
4228
-        $cellRange = pack('vvvv', $numRowMin-1, $numRowMax-1, $numColumnMin-1, $numColumnMax-1);
4228
+        $cellRange = pack('vvvv', $numRowMin - 1, $numRowMax - 1, $numColumnMin - 1, $numColumnMax - 1);
4229 4229
 
4230
-        $header      = pack('vv', $record, $length);
4230
+        $header = pack('vv', $record, $length);
4231 4231
         $data      = pack('vv', count($arrConditional), $needRedraw);
4232 4232
         $data     .= $cellRange;
4233 4233
         $data     .= pack('v', 0x0001);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/HTML.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     /**
136 136
      * Create a new PHPExcel_Writer_HTML
137 137
      *
138
-     * @param    PHPExcel    $phpExcel    PHPExcel object
138
+     * @param    Spreadsheet    $phpExcel    PHPExcel object
139 139
      */
140 140
     public function __construct(Spreadsheet $phpExcel)
141 141
     {
@@ -1419,7 +1419,7 @@  discard block
 block discarded – undo
1419 1419
      * Set images root
1420 1420
      *
1421 1421
      * @param string $pValue
1422
-     * @return PHPExcel_Writer_HTML
1422
+     * @return HTML
1423 1423
      */
1424 1424
     public function setImagesRoot($pValue = '.')
1425 1425
     {
@@ -1440,8 +1440,8 @@  discard block
 block discarded – undo
1440 1440
     /**
1441 1441
      * Set embed images
1442 1442
      *
1443
-     * @param boolean $pValue
1444
-     * @return PHPExcel_Writer_HTML
1443
+     * @param string|boolean $pValue
1444
+     * @return HTML
1445 1445
      */
1446 1446
     public function setEmbedImages($pValue = '.')
1447 1447
     {
@@ -1463,7 +1463,7 @@  discard block
 block discarded – undo
1463 1463
      * Set use inline CSS?
1464 1464
      *
1465 1465
      * @param boolean $pValue
1466
-     * @return PHPExcel_Writer_HTML
1466
+     * @return HTML
1467 1467
      */
1468 1468
     public function setUseInlineCss($pValue = false)
1469 1469
     {
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
 
440 440
             // calculate start of <tbody>, <thead>
441 441
             $tbodyStart = $rowMin;
442
-            $theadStart = $theadEnd   = 0; // default: no <thead>    no </thead>
442
+            $theadStart = $theadEnd = 0; // default: no <thead>    no </thead>
443 443
             if ($sheet->getPageSetup()->isRowsToRepeatAtTopSet()) {
444 444
                 $rowsToRepeatAtTop = $sheet->getPageSetup()->getRowsToRepeatAtTop();
445 445
 
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
             }
453 453
 
454 454
             // Loop through cells
455
-            $row = $rowMin-1;
455
+            $row = $rowMin - 1;
456 456
             while ($row++ < $rowMax) {
457 457
                 // <thead> ?
458 458
                 if ($row == $theadStart) {
@@ -590,9 +590,9 @@  discard block
 block discarded – undo
590 590
             $html .= '<tr>';
591 591
             for ($col = 'A'; $col != $colMax; ++$col) {
592 592
                 $html .= '<td>';
593
-                $html .= $this->writeImageInCell($pSheet, $col.$row);
593
+                $html .= $this->writeImageInCell($pSheet, $col . $row);
594 594
                 if ($this->includeCharts) {
595
-                    $html .= $this->writeChartInCell($pSheet, $col.$row);
595
+                    $html .= $this->writeChartInCell($pSheet, $col . $row);
596 596
                 }
597 597
                 $html .= '</td>';
598 598
             }
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
                             // base64 encode the binary data, then break it
650 650
                             // into chunks according to RFC 2045 semantics
651 651
                             $base64 = chunk_split(base64_encode($picture));
652
-                            $imageData = 'data:'.$imageDetails['mime'].';base64,' . $base64;
652
+                            $imageData = 'data:' . $imageDetails['mime'] . ';base64,' . $base64;
653 653
                         } else {
654 654
                             $imageData = $filename;
655 655
                         }
@@ -666,10 +666,10 @@  discard block
 block discarded – undo
666 666
                 if ($drawing->getCoordinates() != $coordinates) {
667 667
                     continue;
668 668
                 }
669
-                ob_start();                                //  Let's start output buffering.
670
-                imagepng($drawing->getImageResource());    //  This will normally output the image, but because of ob_start(), it won't.
671
-                $contents = ob_get_contents();             //  Instead, output above is saved to $contents
672
-                ob_end_clean();                            //  End the output buffer.
669
+                ob_start(); //  Let's start output buffering.
670
+                imagepng($drawing->getImageResource()); //  This will normally output the image, but because of ob_start(), it won't.
671
+                $contents = ob_get_contents(); //  Instead, output above is saved to $contents
672
+                ob_end_clean(); //  End the output buffer.
673 673
 
674 674
                 $dataUri = "data:image/jpeg;base64," . base64_encode($contents);
675 675
 
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
                 //  max-width: 100% ensures that image doesnt overflow containing cell
678 678
                 //  width: X sets width of supplied image.
679 679
                 //  As a result, images bigger than cell will be contained and images smaller will not get stretched
680
-                $html .= '<img src="'.$dataUri.'" style="max-width:100%;width:'.$drawing->getWidth().'px;" />';
680
+                $html .= '<img src="' . $dataUri . '" style="max-width:100%;width:' . $drawing->getWidth() . 'px;" />';
681 681
             }
682 682
         }
683 683
 
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
             if ($chart instanceof PHPExcel_Chart) {
703 703
                 $chartCoordinates = $chart->getTopLeftPosition();
704 704
                 if ($chartCoordinates['cell'] == $coordinates) {
705
-                    $chartFileName = \PHPExcel\Shared\File::sysGetTempDir().'/'.uniqid().'.png';
705
+                    $chartFileName = \PHPExcel\Shared\File::sysGetTempDir() . '/' . uniqid() . '.png';
706 706
                     if (!$chart->render($chartFileName)) {
707 707
                         return;
708 708
                     }
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
                         // base64 encode the binary data, then break it
716 716
                         // into chunks according to RFC 2045 semantics
717 717
                         $base64 = chunk_split(base64_encode($picture));
718
-                        $imageData = 'data:'.$imageDetails['mime'].';base64,' . $base64;
718
+                        $imageData = 'data:' . $imageDetails['mime'] . ';base64,' . $base64;
719 719
 
720 720
                         $html .= '<div style="position: relative;">';
721 721
                         $html .= '<img style="position: absolute; z-index: 1; left: ' . $chartCoordinates['xOffset'] . 'px; top: ' . $chartCoordinates['yOffset'] . 'px; width: ' . $imageDetails[0] . 'px; height: ' . $imageDetails[1] . 'px;" src="' . $imageData . '" border="0" />' . PHP_EOL;
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
 
811 811
 
812 812
         // table { }
813
-        $css['table']['border-collapse']  = 'collapse';
813
+        $css['table']['border-collapse'] = 'collapse';
814 814
         if (!$this->isPdf) {
815 815
             $css['table']['page-break-after'] = 'always';
816 816
         }
@@ -968,7 +968,7 @@  discard block
 block discarded – undo
968 968
         if ($textAlign = $this->mapHAlign($pStyle->getHorizontal())) {
969 969
             $css['text-align'] = $textAlign;
970 970
             if (in_array($textAlign, array('left', 'right'))) {
971
-                $css['padding-'.$textAlign] = (string)((int)$pStyle->getIndent() * 9).'px';
971
+                $css['padding-' . $textAlign] = (string) ((int) $pStyle->getIndent() * 9) . 'px';
972 972
             }
973 973
         }
974 974
 
@@ -1259,9 +1259,9 @@  discard block
 block discarded – undo
1259 1259
                         }
1260 1260
                         $cellData = htmlspecialchars($cellData);
1261 1261
                         if ($pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont()->getSuperScript()) {
1262
-                            $cellData = '<sup>'.$cellData.'</sup>';
1262
+                            $cellData = '<sup>' . $cellData . '</sup>';
1263 1263
                         } elseif ($pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont()->getSubScript()) {
1264
-                            $cellData = '<sub>'.$cellData.'</sub>';
1264
+                            $cellData = '<sub>' . $cellData . '</sub>';
1265 1265
                         }
1266 1266
                     }
1267 1267
 
@@ -1371,7 +1371,7 @@  discard block
 block discarded – undo
1371 1371
                     $html .= $cellData;
1372 1372
 
1373 1373
                     // Column end
1374
-                    $html .= '</'.$cellType.'>' . PHP_EOL;
1374
+                    $html .= '</' . $cellType . '>' . PHP_EOL;
1375 1375
                 }
1376 1376
 
1377 1377
                 // Next column
@@ -1516,7 +1516,7 @@  discard block
 block discarded – undo
1516 1516
         foreach ($sheetIndexes as $sheetIndex) {
1517 1517
             $sheet = $this->phpExcel->getSheet($sheetIndex);
1518 1518
 
1519
-            $candidateSpannedRow  = array();
1519
+            $candidateSpannedRow = array();
1520 1520
 
1521 1521
             // loop through all Excel merged cells
1522 1522
             foreach ($sheet->getMergeCells() as $cells) {
@@ -1578,7 +1578,7 @@  discard block
 block discarded – undo
1578 1578
 
1579 1579
                         if (!in_array($baseCell, $adjustedBaseCells)) {
1580 1580
                             // subtract rowspan by 1
1581
-                            --$this->isBaseCell[$sheetIndex][ $baseCell[0] ][ $baseCell[1] ]['rowspan'];
1581
+                            --$this->isBaseCell[$sheetIndex][$baseCell[0]][$baseCell[1]]['rowspan'];
1582 1582
                             $adjustedBaseCells[] = $baseCell;
1583 1583
                         }
1584 1584
                     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/OpenDocument.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      * Get writer part
72 72
      *
73 73
      * @param  string  $pPartName  Writer part name
74
-     * @return \PHPExcel\Writer\Excel2007\WriterPart
74
+     * @return PHPExcel_Writer_OpenDocument_WriterPart|null
75 75
      */
76 76
     public function getWriterPart($pPartName = '')
77 77
     {
@@ -180,9 +180,9 @@  discard block
 block discarded – undo
180 180
     /**
181 181
      * Set PHPExcel object
182 182
      *
183
-     * @param  PHPExcel  $pPHPExcel  PHPExcel object
183
+     * @param  \PHPExcel\Spreadsheet  $pPHPExcel  PHPExcel object
184 184
      * @throws \PHPExcel\Writer\Exception
185
-     * @return PHPExcel_Writer_Excel2007
185
+     * @return OpenDocument
186 186
      */
187 187
     public function setPHPExcel(\PHPExcel\SpreadSheet $pPHPExcel = null)
188 188
     {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/OpenDocument/Thumbnails.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     /**
33 33
      * Write Thumbnails/thumbnail.png to PNG format
34 34
      *
35
-     * @param   PHPExcel                   $pPHPExcel
35
+     * @param   \PHPExcel\Spreadsheet                   $pPHPExcel
36 36
      * @return  string                     XML Output
37 37
      * @throws  \PHPExcel\Writer\Exception
38 38
      */
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/PDF/Core.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
      *  Set Paper Size
257 257
      *
258 258
      *  @param  string  $pValue Paper size
259
-     *  @return PHPExcel_Writer_PDF
259
+     *  @return Core
260 260
      */
261 261
     public function setPaperSize($pValue = \PHPExcel\Worksheet\PageSetup::PAPERSIZE_LETTER)
262 262
     {
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
      *  Set Orientation
279 279
      *
280 280
      *  @param string $pValue  Page orientation
281
-     *  @return PHPExcel_Writer_PDF
281
+     *  @return Core
282 282
      */
283 283
     public function setOrientation($pValue = \PHPExcel\Worksheet\PageSetup::ORIENTATION_DEFAULT)
284 284
     {
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
      *
302 302
      *  @param     string        $pValue        Temporary storage directory
303 303
      *  @throws    \PHPExcel\Writer\Exception    when directory does not exist
304
-     *  @return    PHPExcel_Writer_PDF
304
+     *  @return    Core
305 305
      */
306 306
     public function setTempDir($pValue = '')
307 307
     {
Please login to merge, or discard this patch.
Spacing   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -72,135 +72,135 @@
 block discarded – undo
72 72
      */
73 73
     protected static $paperSizes = array(
74 74
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_LETTER
75
-            => 'LETTER',                 //    (8.5 in. by 11 in.)
75
+            => 'LETTER', //    (8.5 in. by 11 in.)
76 76
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_LETTER_SMALL
77
-            => 'LETTER',                 //    (8.5 in. by 11 in.)
77
+            => 'LETTER', //    (8.5 in. by 11 in.)
78 78
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_TABLOID
79
-            => array(792.00, 1224.00),   //    (11 in. by 17 in.)
79
+            => array(792.00, 1224.00), //    (11 in. by 17 in.)
80 80
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_LEDGER
81
-            => array(1224.00, 792.00),   //    (17 in. by 11 in.)
81
+            => array(1224.00, 792.00), //    (17 in. by 11 in.)
82 82
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_LEGAL
83
-            => 'LEGAL',                  //    (8.5 in. by 14 in.)
83
+            => 'LEGAL', //    (8.5 in. by 14 in.)
84 84
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_STATEMENT
85
-            => array(396.00, 612.00),    //    (5.5 in. by 8.5 in.)
85
+            => array(396.00, 612.00), //    (5.5 in. by 8.5 in.)
86 86
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_EXECUTIVE
87
-            => 'EXECUTIVE',              //    (7.25 in. by 10.5 in.)
87
+            => 'EXECUTIVE', //    (7.25 in. by 10.5 in.)
88 88
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_A3
89
-            => 'A3',                     //    (297 mm by 420 mm)
89
+            => 'A3', //    (297 mm by 420 mm)
90 90
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_A4
91
-            => 'A4',                     //    (210 mm by 297 mm)
91
+            => 'A4', //    (210 mm by 297 mm)
92 92
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_A4_SMALL
93
-            => 'A4',                     //    (210 mm by 297 mm)
93
+            => 'A4', //    (210 mm by 297 mm)
94 94
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_A5
95
-            => 'A5',                     //    (148 mm by 210 mm)
95
+            => 'A5', //    (148 mm by 210 mm)
96 96
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_B4
97
-            => 'B4',                     //    (250 mm by 353 mm)
97
+            => 'B4', //    (250 mm by 353 mm)
98 98
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_B5
99
-            => 'B5',                     //    (176 mm by 250 mm)
99
+            => 'B5', //    (176 mm by 250 mm)
100 100
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_FOLIO
101
-            => 'FOLIO',                  //    (8.5 in. by 13 in.)
101
+            => 'FOLIO', //    (8.5 in. by 13 in.)
102 102
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_QUARTO
103
-            => array(609.45, 779.53),    //    (215 mm by 275 mm)
103
+            => array(609.45, 779.53), //    (215 mm by 275 mm)
104 104
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_STANDARD_1
105
-            => array(720.00, 1008.00),   //    (10 in. by 14 in.)
105
+            => array(720.00, 1008.00), //    (10 in. by 14 in.)
106 106
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_STANDARD_2
107
-            => array(792.00, 1224.00),   //    (11 in. by 17 in.)
107
+            => array(792.00, 1224.00), //    (11 in. by 17 in.)
108 108
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_NOTE
109
-            => 'LETTER',                 //    (8.5 in. by 11 in.)
109
+            => 'LETTER', //    (8.5 in. by 11 in.)
110 110
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_NO9_ENVELOPE
111
-            => array(279.00, 639.00),    //    (3.875 in. by 8.875 in.)
111
+            => array(279.00, 639.00), //    (3.875 in. by 8.875 in.)
112 112
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_NO10_ENVELOPE
113
-            => array(297.00, 684.00),    //    (4.125 in. by 9.5 in.)
113
+            => array(297.00, 684.00), //    (4.125 in. by 9.5 in.)
114 114
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_NO11_ENVELOPE
115
-            => array(324.00, 747.00),    //    (4.5 in. by 10.375 in.)
115
+            => array(324.00, 747.00), //    (4.5 in. by 10.375 in.)
116 116
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_NO12_ENVELOPE
117
-            => array(342.00, 792.00),    //    (4.75 in. by 11 in.)
117
+            => array(342.00, 792.00), //    (4.75 in. by 11 in.)
118 118
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_NO14_ENVELOPE
119
-            => array(360.00, 828.00),    //    (5 in. by 11.5 in.)
119
+            => array(360.00, 828.00), //    (5 in. by 11.5 in.)
120 120
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_C
121
-            => array(1224.00, 1584.00),  //    (17 in. by 22 in.)
121
+            => array(1224.00, 1584.00), //    (17 in. by 22 in.)
122 122
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_D
123
-            => array(1584.00, 2448.00),  //    (22 in. by 34 in.)
123
+            => array(1584.00, 2448.00), //    (22 in. by 34 in.)
124 124
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_E
125
-            => array(2448.00, 3168.00),  //    (34 in. by 44 in.)
125
+            => array(2448.00, 3168.00), //    (34 in. by 44 in.)
126 126
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_DL_ENVELOPE
127
-            => array(311.81, 623.62),    //    (110 mm by 220 mm)
127
+            => array(311.81, 623.62), //    (110 mm by 220 mm)
128 128
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_C5_ENVELOPE
129
-            => 'C5',                     //    (162 mm by 229 mm)
129
+            => 'C5', //    (162 mm by 229 mm)
130 130
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_C3_ENVELOPE
131
-            => 'C3',                     //    (324 mm by 458 mm)
131
+            => 'C3', //    (324 mm by 458 mm)
132 132
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_C4_ENVELOPE
133
-            => 'C4',                     //    (229 mm by 324 mm)
133
+            => 'C4', //    (229 mm by 324 mm)
134 134
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_C6_ENVELOPE
135
-            => 'C6',                     //    (114 mm by 162 mm)
135
+            => 'C6', //    (114 mm by 162 mm)
136 136
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_C65_ENVELOPE
137
-            => array(323.15, 649.13),    //    (114 mm by 229 mm)
137
+            => array(323.15, 649.13), //    (114 mm by 229 mm)
138 138
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_B4_ENVELOPE
139
-            => 'B4',                     //    (250 mm by 353 mm)
139
+            => 'B4', //    (250 mm by 353 mm)
140 140
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_B5_ENVELOPE
141
-            => 'B5',                     //    (176 mm by 250 mm)
141
+            => 'B5', //    (176 mm by 250 mm)
142 142
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_B6_ENVELOPE
143
-            => array(498.90, 354.33),    //    (176 mm by 125 mm)
143
+            => array(498.90, 354.33), //    (176 mm by 125 mm)
144 144
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_ITALY_ENVELOPE
145
-            => array(311.81, 651.97),    //    (110 mm by 230 mm)
145
+            => array(311.81, 651.97), //    (110 mm by 230 mm)
146 146
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_MONARCH_ENVELOPE
147
-            => array(279.00, 540.00),    //    (3.875 in. by 7.5 in.)
147
+            => array(279.00, 540.00), //    (3.875 in. by 7.5 in.)
148 148
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_6_3_4_ENVELOPE
149
-            => array(261.00, 468.00),    //    (3.625 in. by 6.5 in.)
149
+            => array(261.00, 468.00), //    (3.625 in. by 6.5 in.)
150 150
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_US_STANDARD_FANFOLD
151
-            => array(1071.00, 792.00),   //    (14.875 in. by 11 in.)
151
+            => array(1071.00, 792.00), //    (14.875 in. by 11 in.)
152 152
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_GERMAN_STANDARD_FANFOLD
153
-            => array(612.00, 864.00),    //    (8.5 in. by 12 in.)
153
+            => array(612.00, 864.00), //    (8.5 in. by 12 in.)
154 154
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_GERMAN_LEGAL_FANFOLD
155
-            => 'FOLIO',                  //    (8.5 in. by 13 in.)
155
+            => 'FOLIO', //    (8.5 in. by 13 in.)
156 156
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_ISO_B4
157
-            => 'B4',                     //    (250 mm by 353 mm)
157
+            => 'B4', //    (250 mm by 353 mm)
158 158
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_JAPANESE_DOUBLE_POSTCARD
159
-            => array(566.93, 419.53),    //    (200 mm by 148 mm)
159
+            => array(566.93, 419.53), //    (200 mm by 148 mm)
160 160
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_STANDARD_PAPER_1
161
-            => array(648.00, 792.00),    //    (9 in. by 11 in.)
161
+            => array(648.00, 792.00), //    (9 in. by 11 in.)
162 162
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_STANDARD_PAPER_2
163
-            => array(720.00, 792.00),    //    (10 in. by 11 in.)
163
+            => array(720.00, 792.00), //    (10 in. by 11 in.)
164 164
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_STANDARD_PAPER_3
165
-            => array(1080.00, 792.00),   //    (15 in. by 11 in.)
165
+            => array(1080.00, 792.00), //    (15 in. by 11 in.)
166 166
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_INVITE_ENVELOPE
167
-            => array(623.62, 623.62),    //    (220 mm by 220 mm)
167
+            => array(623.62, 623.62), //    (220 mm by 220 mm)
168 168
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_LETTER_EXTRA_PAPER
169
-            => array(667.80, 864.00),    //    (9.275 in. by 12 in.)
169
+            => array(667.80, 864.00), //    (9.275 in. by 12 in.)
170 170
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_LEGAL_EXTRA_PAPER
171
-            => array(667.80, 1080.00),   //    (9.275 in. by 15 in.)
171
+            => array(667.80, 1080.00), //    (9.275 in. by 15 in.)
172 172
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_TABLOID_EXTRA_PAPER
173
-            => array(841.68, 1296.00),   //    (11.69 in. by 18 in.)
173
+            => array(841.68, 1296.00), //    (11.69 in. by 18 in.)
174 174
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_A4_EXTRA_PAPER
175
-            => array(668.98, 912.76),    //    (236 mm by 322 mm)
175
+            => array(668.98, 912.76), //    (236 mm by 322 mm)
176 176
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_LETTER_TRANSVERSE_PAPER
177
-            => array(595.80, 792.00),    //    (8.275 in. by 11 in.)
177
+            => array(595.80, 792.00), //    (8.275 in. by 11 in.)
178 178
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_A4_TRANSVERSE_PAPER
179
-            => 'A4',                     //    (210 mm by 297 mm)
179
+            => 'A4', //    (210 mm by 297 mm)
180 180
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER
181
-            => array(667.80, 864.00),    //    (9.275 in. by 12 in.)
181
+            => array(667.80, 864.00), //    (9.275 in. by 12 in.)
182 182
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_SUPERA_SUPERA_A4_PAPER
183
-            => array(643.46, 1009.13),   //    (227 mm by 356 mm)
183
+            => array(643.46, 1009.13), //    (227 mm by 356 mm)
184 184
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_SUPERB_SUPERB_A3_PAPER
185
-            => array(864.57, 1380.47),   //    (305 mm by 487 mm)
185
+            => array(864.57, 1380.47), //    (305 mm by 487 mm)
186 186
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_LETTER_PLUS_PAPER
187
-            => array(612.00, 913.68),    //    (8.5 in. by 12.69 in.)
187
+            => array(612.00, 913.68), //    (8.5 in. by 12.69 in.)
188 188
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_A4_PLUS_PAPER
189
-            => array(595.28, 935.43),    //    (210 mm by 330 mm)
189
+            => array(595.28, 935.43), //    (210 mm by 330 mm)
190 190
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_A5_TRANSVERSE_PAPER
191
-            => 'A5',                     //    (148 mm by 210 mm)
191
+            => 'A5', //    (148 mm by 210 mm)
192 192
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_JIS_B5_TRANSVERSE_PAPER
193
-            => array(515.91, 728.50),    //    (182 mm by 257 mm)
193
+            => array(515.91, 728.50), //    (182 mm by 257 mm)
194 194
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_A3_EXTRA_PAPER
195
-            => array(912.76, 1261.42),   //    (322 mm by 445 mm)
195
+            => array(912.76, 1261.42), //    (322 mm by 445 mm)
196 196
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_A5_EXTRA_PAPER
197
-            => array(493.23, 666.14),    //    (174 mm by 235 mm)
197
+            => array(493.23, 666.14), //    (174 mm by 235 mm)
198 198
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_ISO_B5_EXTRA_PAPER
199
-            => array(569.76, 782.36),    //    (201 mm by 276 mm)
199
+            => array(569.76, 782.36), //    (201 mm by 276 mm)
200 200
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_A2_PAPER
201
-            => 'A2',                     //    (420 mm by 594 mm)
201
+            => 'A2', //    (420 mm by 594 mm)
202 202
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_A3_TRANSVERSE_PAPER
203
-            => 'A3',                     //    (297 mm by 420 mm)
203
+            => 'A3', //    (297 mm by 420 mm)
204 204
         \PHPExcel\Worksheet\PageSetup::PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER
205 205
             => array(912.76, 1261.42)    //    (322 mm by 445 mm)
206 206
     );
Please login to merge, or discard this patch.
Examples/29advancedvaluebinder.php 2 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
 // Set document properties
52 52
 echo date('H:i:s') , " Set document properties" , EOL;
53 53
 $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
54
-							 ->setLastModifiedBy("Maarten Balliauw")
55
-							 ->setTitle("Office 2007 XLSX Test Document")
56
-							 ->setSubject("Office 2007 XLSX Test Document")
57
-							 ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
58
-							 ->setKeywords("office 2007 openxml php")
59
-							 ->setCategory("Test result file");
54
+                                ->setLastModifiedBy("Maarten Balliauw")
55
+                                ->setTitle("Office 2007 XLSX Test Document")
56
+                                ->setSubject("Office 2007 XLSX Test Document")
57
+                                ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
58
+                                ->setKeywords("office 2007 openxml php")
59
+                                ->setCategory("Test result file");
60 60
 
61 61
 // Set default font
62 62
 echo date('H:i:s') , " Set default font" , EOL;
@@ -71,88 +71,88 @@  discard block
 block discarded – undo
71 71
 // Add some data, resembling some different data types
72 72
 echo date('H:i:s') , " Add some data" , EOL;
73 73
 $objPHPExcel->getActiveSheet()->setCellValue('A1', 'String value:')
74
-                              ->setCellValue('B1', 'Mark Baker');
74
+                                ->setCellValue('B1', 'Mark Baker');
75 75
 
76 76
 $objPHPExcel->getActiveSheet()->setCellValue('A2', 'Numeric value #1:')
77
-                              ->setCellValue('B2', 12345);
77
+                                ->setCellValue('B2', 12345);
78 78
 
79 79
 $objPHPExcel->getActiveSheet()->setCellValue('A3', 'Numeric value #2:')
80
-                              ->setCellValue('B3', -12.345);
80
+                                ->setCellValue('B3', -12.345);
81 81
 
82 82
 $objPHPExcel->getActiveSheet()->setCellValue('A4', 'Numeric value #3:')
83
-                              ->setCellValue('B4', .12345);
83
+                                ->setCellValue('B4', .12345);
84 84
 
85 85
 $objPHPExcel->getActiveSheet()->setCellValue('A5', 'Numeric value #4:')
86
-                              ->setCellValue('B5', '12345');
86
+                                ->setCellValue('B5', '12345');
87 87
 
88 88
 $objPHPExcel->getActiveSheet()->setCellValue('A6', 'Numeric value #5:')
89
-                              ->setCellValue('B6', '1.2345');
89
+                                ->setCellValue('B6', '1.2345');
90 90
 
91 91
 $objPHPExcel->getActiveSheet()->setCellValue('A7', 'Numeric value #6:')
92
-                              ->setCellValue('B7', '.12345');
92
+                                ->setCellValue('B7', '.12345');
93 93
 
94 94
 $objPHPExcel->getActiveSheet()->setCellValue('A8', 'Numeric value #7:')
95
-                              ->setCellValue('B8', '1.234e-5');
95
+                                ->setCellValue('B8', '1.234e-5');
96 96
 
97 97
 $objPHPExcel->getActiveSheet()->setCellValue('A9', 'Numeric value #8:')
98
-                              ->setCellValue('B9', '-1.234e+5');
98
+                                ->setCellValue('B9', '-1.234e+5');
99 99
 
100 100
 $objPHPExcel->getActiveSheet()->setCellValue('A10', 'Boolean value:')
101
-                              ->setCellValue('B10', 'TRUE');
101
+                                ->setCellValue('B10', 'TRUE');
102 102
 
103 103
 $objPHPExcel->getActiveSheet()->setCellValue('A11', 'Percentage value #1:')
104
-                              ->setCellValue('B11', '10%');
104
+                                ->setCellValue('B11', '10%');
105 105
 
106 106
 $objPHPExcel->getActiveSheet()->setCellValue('A12', 'Percentage value #2:')
107
-                              ->setCellValue('B12', '12.5%');
107
+                                ->setCellValue('B12', '12.5%');
108 108
 
109 109
 $objPHPExcel->getActiveSheet()->setCellValue('A13', 'Fraction value #1:')
110
-                              ->setCellValue('B13', '-1/2');
110
+                                ->setCellValue('B13', '-1/2');
111 111
 
112 112
 $objPHPExcel->getActiveSheet()->setCellValue('A14', 'Fraction value #2:')
113
-                              ->setCellValue('B14', '3 1/2');
113
+                                ->setCellValue('B14', '3 1/2');
114 114
 
115 115
 $objPHPExcel->getActiveSheet()->setCellValue('A15', 'Fraction value #3:')
116
-                              ->setCellValue('B15', '-12 3/4');
116
+                                ->setCellValue('B15', '-12 3/4');
117 117
 
118 118
 $objPHPExcel->getActiveSheet()->setCellValue('A16', 'Fraction value #4:')
119
-                              ->setCellValue('B16', '13/4');
119
+                                ->setCellValue('B16', '13/4');
120 120
 
121 121
 $objPHPExcel->getActiveSheet()->setCellValue('A17', 'Currency value #1:')
122
-                              ->setCellValue('B17', '$12345');
122
+                                ->setCellValue('B17', '$12345');
123 123
 
124 124
 $objPHPExcel->getActiveSheet()->setCellValue('A18', 'Currency value #2:')
125
-                              ->setCellValue('B18', '$12345.67');
125
+                                ->setCellValue('B18', '$12345.67');
126 126
 
127 127
 $objPHPExcel->getActiveSheet()->setCellValue('A19', 'Currency value #3:')
128
-                              ->setCellValue('B19', '$12,345.67');
128
+                                ->setCellValue('B19', '$12,345.67');
129 129
 
130 130
 $objPHPExcel->getActiveSheet()->setCellValue('A20', 'Date value #1:')
131
-                              ->setCellValue('B20', '21 December 1983');
131
+                                ->setCellValue('B20', '21 December 1983');
132 132
 
133 133
 $objPHPExcel->getActiveSheet()->setCellValue('A21', 'Date value #2:')
134
-                              ->setCellValue('B21', '19-Dec-1960');
134
+                                ->setCellValue('B21', '19-Dec-1960');
135 135
 
136 136
 $objPHPExcel->getActiveSheet()->setCellValue('A22', 'Date value #3:')
137
-                              ->setCellValue('B22', '07/12/1982');
137
+                                ->setCellValue('B22', '07/12/1982');
138 138
 
139 139
 $objPHPExcel->getActiveSheet()->setCellValue('A23', 'Date value #4:')
140
-                              ->setCellValue('B23', '24-11-1950');
140
+                                ->setCellValue('B23', '24-11-1950');
141 141
 
142 142
 $objPHPExcel->getActiveSheet()->setCellValue('A24', 'Date value #5:')
143
-                              ->setCellValue('B24', '17-Mar');
143
+                                ->setCellValue('B24', '17-Mar');
144 144
 
145 145
 $objPHPExcel->getActiveSheet()->setCellValue('A25', 'Time value #1:')
146
-                              ->setCellValue('B25', '01:30');
146
+                                ->setCellValue('B25', '01:30');
147 147
 
148 148
 $objPHPExcel->getActiveSheet()->setCellValue('A26', 'Time value #2:')
149
-                              ->setCellValue('B26', '01:30:15');
149
+                                ->setCellValue('B26', '01:30:15');
150 150
 
151 151
 $objPHPExcel->getActiveSheet()->setCellValue('A27', 'Date/Time value:')
152
-                              ->setCellValue('B27', '19-Dec-1960 01:30');
152
+                                ->setCellValue('B27', '19-Dec-1960 01:30');
153 153
 
154 154
 $objPHPExcel->getActiveSheet()->setCellValue('A28', 'Formula:')
155
-                              ->setCellValue('B28', '=SUM(B2:B9)');
155
+                                ->setCellValue('B28', '=SUM(B2:B9)');
156 156
 
157 157
 // Rename worksheet
158 158
 echo date('H:i:s') , " Rename worksheet" , EOL;
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -30,26 +30,26 @@  discard block
 block discarded – undo
30 30
 ini_set('display_errors', TRUE);
31 31
 ini_set('display_startup_errors', TRUE);
32 32
 
33
-define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
33
+define('EOL', (PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
34 34
 
35 35
 /** PHPExcel */
36 36
 require_once dirname(__FILE__) . '/../src/Bootstrap.php';
37 37
 
38 38
 
39 39
 // Set timezone
40
-echo date('H:i:s') , " Set timezone" , EOL;
40
+echo date('H:i:s'), " Set timezone", EOL;
41 41
 date_default_timezone_set('UTC');
42 42
 
43 43
 // Set value binder
44
-echo date('H:i:s') , " Set value binder" , EOL;
45
-\PHPExcel\Cell::setValueBinder( new \PHPExcel\Cell\AdvancedValueBinder() );
44
+echo date('H:i:s'), " Set value binder", EOL;
45
+\PHPExcel\Cell::setValueBinder(new \PHPExcel\Cell\AdvancedValueBinder());
46 46
 
47 47
 // Create new PHPExcel object
48
-echo date('H:i:s') , " Create new PHPExcel object" , EOL;
48
+echo date('H:i:s'), " Create new PHPExcel object", EOL;
49 49
 $objPHPExcel = new \PHPExcel\Spreadsheet();
50 50
 
51 51
 // Set document properties
52
-echo date('H:i:s') , " Set document properties" , EOL;
52
+echo date('H:i:s'), " Set document properties", EOL;
53 53
 $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
54 54
 							 ->setLastModifiedBy("Maarten Balliauw")
55 55
 							 ->setTitle("Office 2007 XLSX Test Document")
@@ -59,17 +59,17 @@  discard block
 block discarded – undo
59 59
 							 ->setCategory("Test result file");
60 60
 
61 61
 // Set default font
62
-echo date('H:i:s') , " Set default font" , EOL;
62
+echo date('H:i:s'), " Set default font", EOL;
63 63
 $objPHPExcel->getActiveSheet()->getDefaultStyle()->getFont()->setName('Arial');
64 64
 $objPHPExcel->getActiveSheet()->getDefaultStyle()->getFont()->setSize(10);
65 65
 
66 66
 // Set column widths
67
-echo date('H:i:s') , " Set column widths" , EOL;
67
+echo date('H:i:s'), " Set column widths", EOL;
68 68
 $objPHPExcel->getActiveSheet()->getColumnDimension('A')->setAutoSize(true);
69 69
 $objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(14);
70 70
 
71 71
 // Add some data, resembling some different data types
72
-echo date('H:i:s') , " Add some data" , EOL;
72
+echo date('H:i:s'), " Add some data", EOL;
73 73
 $objPHPExcel->getActiveSheet()->setCellValue('A1', 'String value:')
74 74
                               ->setCellValue('B1', 'Mark Baker');
75 75
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
                               ->setCellValue('B28', '=SUM(B2:B9)');
156 156
 
157 157
 // Rename worksheet
158
-echo date('H:i:s') , " Rename worksheet" , EOL;
158
+echo date('H:i:s'), " Rename worksheet", EOL;
159 159
 $objPHPExcel->getActiveSheet()->setTitle('Advanced value binder');
160 160
 
161 161
 
@@ -164,20 +164,20 @@  discard block
 block discarded – undo
164 164
 
165 165
 
166 166
 // Save Excel 2007 file
167
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
167
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
168 168
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
169 169
 $objWriter->save(str_replace('.php', '.xlsx', __FILE__));
170
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
170
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
171 171
 // Save Excel5 file
172
-echo date('H:i:s') , " Write to Excel5 format" , EOL;
172
+echo date('H:i:s'), " Write to Excel5 format", EOL;
173 173
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
174 174
 $objWriter->save(str_replace('.php', '.xls', __FILE__));
175
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
175
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
176 176
 
177 177
 
178 178
 // Echo memory peak usage
179
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
179
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
180 180
 
181 181
 // Echo done
182
-echo date('H:i:s') , " Done writing file" , EOL;
183
-echo 'File has been created in ' , getcwd() , EOL;
182
+echo date('H:i:s'), " Done writing file", EOL;
183
+echo 'File has been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.
Examples/XMLReader.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
 require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
35 35
 
36 36
 
37
-echo date('H:i:s') , " Load from XML file" , PHP_EOL;
37
+echo date('H:i:s'), " Load from XML file", PHP_EOL;
38 38
 $inputFileName = "XMLTest.xml";
39 39
 
40 40
 /**  Identify the type of $inputFileName  **/
41 41
 $inputFileType = \PHPExcel\IOFactory::identify($inputFileName);
42
-echo 'Loading ' , $inputFileName , ' using ' , $inputFileType , " Reader" , PHP_EOL;
42
+echo 'Loading ', $inputFileName, ' using ', $inputFileType, " Reader", PHP_EOL;
43 43
 
44 44
 /**  Create a new Reader of the type that has been identified  **/
45 45
 $objReader = \PHPExcel\IOFactory::createReader($inputFileType);
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
 $objPHPExcel = $objReader->load($inputFileName);
48 48
 
49 49
 
50
-echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL;
50
+echo date('H:i:s'), " Write to Excel2007 format", PHP_EOL;
51 51
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
52 52
 $objWriter->save(str_replace('.php', '.xlsx', __FILE__));
53
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL;
53
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', __FILE__), PHP_EOL;
54 54
 
55 55
 
56 56
 // Echo memory peak usage
57
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , PHP_EOL;
57
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", PHP_EOL;
58 58
 
59 59
 // Echo done
60
-echo date('H:i:s') , " Done writing file" , PHP_EOL;
60
+echo date('H:i:s'), " Done writing file", PHP_EOL;
Please login to merge, or discard this patch.
Examples/21pdf.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,14 +62,14 @@
 block discarded – undo
62 62
 echo date('H:i:s') , " Write to PDF format using {$rendererName}" , EOL;
63 63
 
64 64
 if (!\PHPExcel\Settings::setPdfRenderer(
65
-		$rendererName,
66
-		$rendererLibraryPath
67
-	)) {
68
-	die(
69
-		'NOTICE: Please set the $rendererName and $rendererLibraryPath values' .
70
-		EOL .
71
-		'at the top of this script as appropriate for your directory structure'
72
-	);
65
+        $rendererName,
66
+        $rendererLibraryPath
67
+    )) {
68
+    die(
69
+        'NOTICE: Please set the $rendererName and $rendererLibraryPath values' .
70
+        EOL .
71
+        'at the top of this script as appropriate for your directory structure'
72
+    );
73 73
 }
74 74
 
75 75
 
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 ini_set('display_startup_errors', TRUE);
32 32
 date_default_timezone_set('Europe/London');
33 33
 
34
-define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
34
+define('EOL', (PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
35 35
 
36 36
 date_default_timezone_set('Europe/London');
37 37
 
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
 $rendererLibraryPath = '/php/libraries/PDF/' . $rendererLibrary;
53 53
 
54 54
 
55
-echo date('H:i:s') , " Hide grid lines" , EOL;
55
+echo date('H:i:s'), " Hide grid lines", EOL;
56 56
 $objPHPExcel->getActiveSheet()->setShowGridLines(false);
57 57
 
58
-echo date('H:i:s') , " Set orientation to landscape" , EOL;
58
+echo date('H:i:s'), " Set orientation to landscape", EOL;
59 59
 $objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(\PHPExcel\Worksheet\PageSetup::ORIENTATION_LANDSCAPE);
60 60
 
61 61
 
62
-echo date('H:i:s') , " Write to PDF format using {$rendererName}" , EOL;
62
+echo date('H:i:s'), " Write to PDF format using {$rendererName}", EOL;
63 63
 
64 64
 if (!\PHPExcel\Settings::setPdfRenderer(
65 65
 		$rendererName,
@@ -77,18 +77,18 @@  discard block
 block discarded – undo
77 77
 
78 78
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'PDF');
79 79
 $objWriter->setSheetIndex(0);
80
-$objWriter->save(str_replace('.php', '_'.$rendererName.'.pdf', __FILE__));
80
+$objWriter->save(str_replace('.php', '_' . $rendererName . '.pdf', __FILE__));
81 81
 $callEndTime = microtime(true);
82 82
 $callTime = $callEndTime - $callStartTime;
83
-echo date('H:i:s') , " File written to " , str_replace('.php', '_'.$rendererName.'.pdf', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
84
-echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL;
83
+echo date('H:i:s'), " File written to ", str_replace('.php', '_' . $rendererName . '.pdf', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
84
+echo 'Call time to write Workbook was ', sprintf('%.4f', $callTime), " seconds", EOL;
85 85
 // Echo memory usage
86
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL;
86
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", EOL;
87 87
 
88 88
 
89 89
 // Echo memory peak usage
90
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
90
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
91 91
 
92 92
 // Echo done
93
-echo date('H:i:s') , " Done writing files" , EOL;
94
-echo 'File has been created in ' , getcwd() , EOL;
93
+echo date('H:i:s'), " Done writing files", EOL;
94
+echo 'File has been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.