Completed
Push — develop ( 685e29...09d456 )
by Adrien
14:14
created
src/PhpSpreadsheet/Reader/OOCalc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -626,10 +626,10 @@
 block discarded – undo
626 626
                                     foreach ($temp as &$value) {
627 627
                                         //    Only replace in alternate array entries (i.e. non-quoted blocks)
628 628
                                         if ($tKey = !$tKey) {
629
-                                            $value = preg_replace('/\[([^\.]+)\.([^\.]+):\.([^\.]+)\]/Ui', '$1!$2:$3', $value);    //  Cell range reference in another sheet
630
-                                            $value = preg_replace('/\[([^\.]+)\.([^\.]+)\]/Ui', '$1!$2', $value);       //  Cell reference in another sheet
631
-                                            $value = preg_replace('/\[\.([^\.]+):\.([^\.]+)\]/Ui', '$1:$2', $value);    //  Cell range reference
632
-                                            $value = preg_replace('/\[\.([^\.]+)\]/Ui', '$1', $value);                  //  Simple cell reference
629
+                                            $value = preg_replace('/\[([^\.]+)\.([^\.]+):\.([^\.]+)\]/Ui', '$1!$2:$3', $value); //  Cell range reference in another sheet
630
+                                            $value = preg_replace('/\[([^\.]+)\.([^\.]+)\]/Ui', '$1!$2', $value); //  Cell reference in another sheet
631
+                                            $value = preg_replace('/\[\.([^\.]+):\.([^\.]+)\]/Ui', '$1:$2', $value); //  Cell range reference
632
+                                            $value = preg_replace('/\[\.([^\.]+)\]/Ui', '$1', $value); //  Simple cell reference
633 633
                                             $value = \PhpSpreadsheet\Calculation::translateSeparator(';', ',', $value, $inBraces);
634 634
                                         }
635 635
                                     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Gnumeric.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         $worksheetNames = [];
103 103
         while ($xml->read()) {
104 104
             if ($xml->name == 'gnm:SheetName' && $xml->nodeType == XMLReader::ELEMENT) {
105
-                $xml->read();    //    Move onto the value node
105
+                $xml->read(); //    Move onto the value node
106 106
                 $worksheetNames[] = (string) $xml->value;
107 107
             } elseif ($xml->name == 'gnm:Sheets') {
108 108
                 //    break out of the loop once we've got our sheet names rather than parse the entire file
@@ -143,14 +143,14 @@  discard block
 block discarded – undo
143 143
 
144 144
                 while ($xml->read()) {
145 145
                     if ($xml->name == 'gnm:Name' && $xml->nodeType == XMLReader::ELEMENT) {
146
-                        $xml->read();    //    Move onto the value node
146
+                        $xml->read(); //    Move onto the value node
147 147
                         $tmpInfo['worksheetName'] = (string) $xml->value;
148 148
                     } elseif ($xml->name == 'gnm:MaxCol' && $xml->nodeType == XMLReader::ELEMENT) {
149
-                        $xml->read();    //    Move onto the value node
149
+                        $xml->read(); //    Move onto the value node
150 150
                         $tmpInfo['lastColumnIndex'] = (int) $xml->value;
151 151
                         $tmpInfo['totalColumns'] = (int) $xml->value + 1;
152 152
                     } elseif ($xml->name == 'gnm:MaxRow' && $xml->nodeType == XMLReader::ELEMENT) {
153
-                        $xml->read();    //    Move onto the value node
153
+                        $xml->read(); //    Move onto the value node
154 154
                         $tmpInfo['totalRows'] = (int) $xml->value + 1;
155 155
                         break;
156 156
                     }
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
                 if (isset($sheet->PrintInformation->Margins)) {
350 350
                     foreach ($sheet->PrintInformation->Margins->children('gnm', true) as $key => $margin) {
351 351
                         $marginAttributes = $margin->attributes();
352
-                        $marginSize = 72 / 100;    //    Default
352
+                        $marginSize = 72 / 100; //    Default
353 353
                         switch ($marginAttributes['PrefUnit']) {
354 354
                             case 'mm':
355 355
                                 $marginSize = intval($marginAttributes['Points']) / 100;
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
                             break;
436 436
                         case '20':        //    Boolean
437 437
                             $type = \PhpSpreadsheet\Cell\DataType::TYPE_BOOL;
438
-                            $cell = ($cell == 'TRUE') ? true: false;
438
+                            $cell = ($cell == 'TRUE') ? true : false;
439 439
                             break;
440 440
                         case '30':        //    Integer
441 441
                             $cell = intval($cell);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Font.php 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -143,40 +143,40 @@
 block discarded – undo
143 143
      */
144 144
     public static $defaultColumnWidths = [
145 145
         'Arial' => [
146
-             1 => ['px' => 24, 'width' => 12.00000000],
147
-             2 => ['px' => 24, 'width' => 12.00000000],
148
-             3 => ['px' => 32, 'width' => 10.66406250],
149
-             4 => ['px' => 32, 'width' => 10.66406250],
150
-             5 => ['px' => 40, 'width' => 10.00000000],
151
-             6 => ['px' => 48, 'width' => 9.59765625],
152
-             7 => ['px' => 48, 'width' => 9.59765625],
153
-             8 => ['px' => 56, 'width' => 9.33203125],
154
-             9 => ['px' => 64, 'width' => 9.14062500],
146
+                1 => ['px' => 24, 'width' => 12.00000000],
147
+                2 => ['px' => 24, 'width' => 12.00000000],
148
+                3 => ['px' => 32, 'width' => 10.66406250],
149
+                4 => ['px' => 32, 'width' => 10.66406250],
150
+                5 => ['px' => 40, 'width' => 10.00000000],
151
+                6 => ['px' => 48, 'width' => 9.59765625],
152
+                7 => ['px' => 48, 'width' => 9.59765625],
153
+                8 => ['px' => 56, 'width' => 9.33203125],
154
+                9 => ['px' => 64, 'width' => 9.14062500],
155 155
             10 => ['px' => 64, 'width' => 9.14062500],
156 156
         ],
157 157
         'Calibri' => [
158
-             1 => ['px' => 24, 'width' => 12.00000000],
159
-             2 => ['px' => 24, 'width' => 12.00000000],
160
-             3 => ['px' => 32, 'width' => 10.66406250],
161
-             4 => ['px' => 32, 'width' => 10.66406250],
162
-             5 => ['px' => 40, 'width' => 10.00000000],
163
-             6 => ['px' => 48, 'width' => 9.59765625],
164
-             7 => ['px' => 48, 'width' => 9.59765625],
165
-             8 => ['px' => 56, 'width' => 9.33203125],
166
-             9 => ['px' => 56, 'width' => 9.33203125],
158
+                1 => ['px' => 24, 'width' => 12.00000000],
159
+                2 => ['px' => 24, 'width' => 12.00000000],
160
+                3 => ['px' => 32, 'width' => 10.66406250],
161
+                4 => ['px' => 32, 'width' => 10.66406250],
162
+                5 => ['px' => 40, 'width' => 10.00000000],
163
+                6 => ['px' => 48, 'width' => 9.59765625],
164
+                7 => ['px' => 48, 'width' => 9.59765625],
165
+                8 => ['px' => 56, 'width' => 9.33203125],
166
+                9 => ['px' => 56, 'width' => 9.33203125],
167 167
             10 => ['px' => 64, 'width' => 9.14062500],
168 168
             11 => ['px' => 64, 'width' => 9.14062500],
169 169
         ],
170 170
         'Verdana' => [
171
-             1 => ['px' => 24, 'width' => 12.00000000],
172
-             2 => ['px' => 24, 'width' => 12.00000000],
173
-             3 => ['px' => 32, 'width' => 10.66406250],
174
-             4 => ['px' => 32, 'width' => 10.66406250],
175
-             5 => ['px' => 40, 'width' => 10.00000000],
176
-             6 => ['px' => 48, 'width' => 9.59765625],
177
-             7 => ['px' => 48, 'width' => 9.59765625],
178
-             8 => ['px' => 64, 'width' => 9.14062500],
179
-             9 => ['px' => 72, 'width' => 9.00000000],
171
+                1 => ['px' => 24, 'width' => 12.00000000],
172
+                2 => ['px' => 24, 'width' => 12.00000000],
173
+                3 => ['px' => 32, 'width' => 10.66406250],
174
+                4 => ['px' => 32, 'width' => 10.66406250],
175
+                5 => ['px' => 40, 'width' => 10.00000000],
176
+                6 => ['px' => 48, 'width' => 9.59765625],
177
+                7 => ['px' => 48, 'width' => 9.59765625],
178
+                8 => ['px' => 64, 'width' => 9.14062500],
179
+                9 => ['px' => 72, 'width' => 9.00000000],
180 180
             10 => ['px' => 72, 'width' => 9.00000000],
181 181
         ],
182 182
     ];
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@
 block discarded – undo
45 45
     const CHARSET_ANSI_JAPANESE_SHIFTJIS = 0x80;
46 46
     const CHARSET_ANSI_KOREAN_HANGUL = 0x81;
47 47
     const CHARSET_ANSI_KOREAN_JOHAB = 0x82;
48
-    const CHARSET_ANSI_CHINESE_SIMIPLIFIED = 0x86;        //    gb2312
49
-    const CHARSET_ANSI_CHINESE_TRADITIONAL = 0x88;        //    big5
48
+    const CHARSET_ANSI_CHINESE_SIMIPLIFIED = 0x86; //    gb2312
49
+    const CHARSET_ANSI_CHINESE_TRADITIONAL = 0x88; //    big5
50 50
     const CHARSET_ANSI_GREEK = 0xA1;
51 51
     const CHARSET_ANSI_TURKISH = 0xA2;
52 52
     const CHARSET_ANSI_VIETNAMESE = 0xA3;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/PCLZip/PclZip.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -541,12 +541,12 @@  discard block
 block discarded – undo
541 541
 
542 542
         // ----- For each file in the list check the attributes
543 543
         $v_supported_attributes = [
544
-          PCLZIP_ATT_FILE_NAME => 'mandatory',
545
-          PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional',
546
-          PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional',
547
-          PCLZIP_ATT_FILE_MTIME => 'optional',
548
-          PCLZIP_ATT_FILE_CONTENT => 'optional',
549
-          PCLZIP_ATT_FILE_COMMENT => 'optional',
544
+            PCLZIP_ATT_FILE_NAME => 'mandatory',
545
+            PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional',
546
+            PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional',
547
+            PCLZIP_ATT_FILE_MTIME => 'optional',
548
+            PCLZIP_ATT_FILE_CONTENT => 'optional',
549
+            PCLZIP_ATT_FILE_COMMENT => 'optional',
550 550
         ];
551 551
         foreach ($v_att_list as $v_entry) {
552 552
             $v_result = $this->privFileDescrParseAtt($v_entry, $v_filedescr_list[], $v_options, $v_supported_attributes);
@@ -704,25 +704,25 @@  discard block
 block discarded – undo
704 704
             if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
705 705
                 // ----- Parse the options
706 706
                 $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, [
707
-                  PCLZIP_OPT_PATH => 'optional',
708
-                  PCLZIP_OPT_REMOVE_PATH => 'optional',
709
-                  PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
710
-                  PCLZIP_OPT_ADD_PATH => 'optional',
711
-                  PCLZIP_CB_PRE_EXTRACT => 'optional',
712
-                  PCLZIP_CB_POST_EXTRACT => 'optional',
713
-                  PCLZIP_OPT_SET_CHMOD => 'optional',
714
-                  PCLZIP_OPT_BY_NAME => 'optional',
715
-                  PCLZIP_OPT_BY_EREG => 'optional',
716
-                  PCLZIP_OPT_BY_PREG => 'optional',
717
-                  PCLZIP_OPT_BY_INDEX => 'optional',
718
-                  PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',
719
-                  PCLZIP_OPT_EXTRACT_IN_OUTPUT => 'optional',
720
-                  PCLZIP_OPT_REPLACE_NEWER => 'optional',
721
-                  PCLZIP_OPT_STOP_ON_ERROR => 'optional',
722
-                  PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional',
723
-                  PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional',
724
-                  PCLZIP_OPT_TEMP_FILE_ON => 'optional',
725
-                  PCLZIP_OPT_TEMP_FILE_OFF => 'optional',
707
+                    PCLZIP_OPT_PATH => 'optional',
708
+                    PCLZIP_OPT_REMOVE_PATH => 'optional',
709
+                    PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
710
+                    PCLZIP_OPT_ADD_PATH => 'optional',
711
+                    PCLZIP_CB_PRE_EXTRACT => 'optional',
712
+                    PCLZIP_CB_POST_EXTRACT => 'optional',
713
+                    PCLZIP_OPT_SET_CHMOD => 'optional',
714
+                    PCLZIP_OPT_BY_NAME => 'optional',
715
+                    PCLZIP_OPT_BY_EREG => 'optional',
716
+                    PCLZIP_OPT_BY_PREG => 'optional',
717
+                    PCLZIP_OPT_BY_INDEX => 'optional',
718
+                    PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',
719
+                    PCLZIP_OPT_EXTRACT_IN_OUTPUT => 'optional',
720
+                    PCLZIP_OPT_REPLACE_NEWER => 'optional',
721
+                    PCLZIP_OPT_STOP_ON_ERROR => 'optional',
722
+                    PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional',
723
+                    PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional',
724
+                    PCLZIP_OPT_TEMP_FILE_ON => 'optional',
725
+                    PCLZIP_OPT_TEMP_FILE_OFF => 'optional',
726 726
                 ]);
727 727
                 if ($v_result != 1) {
728 728
                     return 0;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2592,7 +2592,7 @@  discard block
 block discarded – undo
2592 2592
                 // ----- Set the file properties
2593 2593
                 $p_header['size'] = 0;
2594 2594
                 //$p_header['external'] = 0x41FF0010;     // Value for a folder : to be checked
2595
-                $p_header['external'] = 0x00000010;     // Value for a folder : to be checked
2595
+                $p_header['external'] = 0x00000010; // Value for a folder : to be checked
2596 2596
 
2597 2597
                 // ----- Call the header generation
2598 2598
                 if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
@@ -4980,7 +4980,7 @@  discard block
 block discarded – undo
4980 4980
                 if ($v_skip > 0) {
4981 4981
                     --$v_skip;
4982 4982
                 } else {
4983
-                    $v_result = $v_list[$i] . ($i != (sizeof($v_list) - 1)?'/' . $v_result:'');
4983
+                    $v_result = $v_list[$i] . ($i != (sizeof($v_list) - 1) ? '/' . $v_result : '');
4984 4984
                 }
4985 4985
             }
4986 4986
         }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Excel5.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -233,8 +233,8 @@
 block discarded – undo
233 233
         $y1 = $offsetY;
234 234
 
235 235
         // Initialise end cell to the same as the start cell
236
-        $col_end = $col_start;  // Col containing lower right corner of object
237
-        $row_end = $row_start;  // Row containing bottom right corner of object
236
+        $col_end = $col_start; // Col containing lower right corner of object
237
+        $row_end = $row_start; // Row containing bottom right corner of object
238 238
 
239 239
         // Zero the specified offset if greater than the cell dimensions
240 240
         if ($x1 >= self::sizeCol($sheet, \PhpSpreadsheet\Cell::stringFromColumnIndex($col_start))) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/PasswordHasher.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,14 +41,14 @@
 block discarded – undo
41 41
     public static function hashPassword($pPassword = '')
42 42
     {
43 43
         $password = 0x0000;
44
-        $charPos = 1;       // char position
44
+        $charPos = 1; // char position
45 45
 
46 46
         // split the plain text password in its component characters
47 47
         $chars = preg_split('//', $pPassword, -1, PREG_SPLIT_NO_EMPTY);
48 48
         foreach ($chars as $char) {
49
-            $value = ord($char) << $charPos++;    // shifted ASCII value
50
-            $rotated_bits = $value >> 15;                // rotated bits beyond bit 15
51
-            $value &= 0x7fff;                    // first 15 bits
49
+            $value = ord($char) << $charPos++; // shifted ASCII value
50
+            $rotated_bits = $value >> 15; // rotated bits beyond bit 15
51
+            $value &= 0x7fff; // first 15 bits
52 52
             $password ^= ($value | $rotated_bits);
53 53
         }
54 54
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/OLE/PPS.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -170,21 +170,21 @@
 block discarded – undo
170 170
         $ret = str_pad($this->Name, 64, "\x00");
171 171
 
172 172
         $ret .= pack('v', strlen($this->Name) + 2)  // 66
173
-              . pack('c', $this->Type)              // 67
174
-              . pack('c', 0x00) //UK                // 68
175
-              . pack('V', $this->PrevPps) //Prev    // 72
176
-              . pack('V', $this->NextPps) //Next    // 76
177
-              . pack('V', $this->DirPps)  //Dir     // 80
178
-              . "\x00\x09\x02\x00"                  // 84
179
-              . "\x00\x00\x00\x00"                  // 88
180
-              . "\xc0\x00\x00\x00"                  // 92
181
-              . "\x00\x00\x00\x46"                  // 96 // Seems to be ok only for Root
182
-              . "\x00\x00\x00\x00"                  // 100
183
-              . \PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st)          // 108
184
-              . \PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd)          // 116
185
-              . pack('V', isset($this->startBlock) ? $this->startBlock : 0)  // 120
186
-              . pack('V', $this->Size)               // 124
187
-              . pack('V', 0);                        // 128
173
+                . pack('c', $this->Type)              // 67
174
+                . pack('c', 0x00) //UK                // 68
175
+                . pack('V', $this->PrevPps) //Prev    // 72
176
+                . pack('V', $this->NextPps) //Next    // 76
177
+                . pack('V', $this->DirPps)  //Dir     // 80
178
+                . "\x00\x09\x02\x00"                  // 84
179
+                . "\x00\x00\x00\x00"                  // 88
180
+                . "\xc0\x00\x00\x00"                  // 92
181
+                . "\x00\x00\x00\x46"                  // 96 // Seems to be ok only for Root
182
+                . "\x00\x00\x00\x00"                  // 100
183
+                . \PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st)          // 108
184
+                . \PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd)          // 116
185
+                . pack('V', isset($this->startBlock) ? $this->startBlock : 0)  // 120
186
+                . pack('V', $this->Size)               // 124
187
+                . pack('V', 0);                        // 128
188 188
         return $ret;
189 189
     }
190 190
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
184 184
               . \PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd)          // 116
185 185
               . pack('V', isset($this->startBlock) ? $this->startBlock : 0)  // 120
186 186
               . pack('V', $this->Size)               // 124
187
-              . pack('V', 0);                        // 128
187
+              . pack('V', 0); // 128
188 188
         return $ret;
189 189
     }
190 190
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet/AutoFilter.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -707,8 +707,8 @@
 block discarded – undo
707 707
                                 ? AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN
708 708
                                 : AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN;
709 709
                             $ruleValues[] = ['operator' => $operator,
710
-                                                   'value' => $average,
711
-                                                 ];
710
+                                                    'value' => $average,
711
+                                                    ];
712 712
                             $columnFilterTests[$columnID] = [
713 713
                                 'method' => 'filterTestInCustomDataSet',
714 714
                                 'arguments' => ['filterRules' => $ruleValues, 'join' => AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_OR],
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -456,7 +456,7 @@
 block discarded – undo
456 456
      *    @var    array
457 457
      */
458 458
     private static $fromReplace = ['\*', '\?', '~~', '~.*', '~.?'];
459
-    private static $toReplace = ['.*', '.',  '~',  '\*',  '\?'];
459
+    private static $toReplace = ['.*', '.', '~', '\*', '\?'];
460 460
 
461 461
     /**
462 462
      *    Convert a dynamic rule daterange to a custom filter range expression for ease of calculation
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet/BaseDrawing.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,8 +137,7 @@
 block discarded – undo
137 137
         $this->rotation = 0;
138 138
         $this->shadow = new Drawing\Shadow();
139 139
 
140
-        // Set image index
141
-        ++self::$imageCounter;
140
+        // Set image index++self::$imageCounter;
142 141
         $this->imageIndex = self::$imageCounter;
143 142
     }
144 143
 
Please login to merge, or discard this patch.