Completed
Push — develop ( e0a9f9...ba7054 )
by Adrien
19:36
created
src/PhpSpreadsheet/Reader/SYLK.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -219,8 +219,8 @@
 block discarded – undo
219 219
         }
220 220
         $spreadsheet->setActiveSheetIndex($this->sheetIndex);
221 221
 
222
-        $fromFormats = ['\-',    '\ '];
223
-        $toFormats = ['-',    ' '];
222
+        $fromFormats = ['\-', '\ '];
223
+        $toFormats = ['-', ' '];
224 224
 
225 225
         // Loop through file
226 226
         $rowData = [];
Please login to merge, or discard this patch.
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/Shared/Date.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
 class Date
30 30
 {
31 31
     /** constants */
32
-    const CALENDAR_WINDOWS_1900 = 1900;        //    Base date of 1st Jan 1900 = 1.0
33
-    const CALENDAR_MAC_1904 = 1904;            //    Base date of 2nd Jan 1904 = 1.0
32
+    const CALENDAR_WINDOWS_1900 = 1900; //    Base date of 1st Jan 1900 = 1.0
33
+    const CALENDAR_MAC_1904 = 1904; //    Base date of 2nd Jan 1904 = 1.0
34 34
 
35 35
     /*
36 36
      * Names of the months of the year, indexed by shortname
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     /**
165 165
      * Convert a MS serialized datetime value from Excel to a PHP Date/Time object
166 166
      *
167
-     * @param     int|float                      $excelTimestamp      MS Excel serialized date/time value
167
+     * @param     integer                      $excelTimestamp      MS Excel serialized date/time value
168 168
      * @param     \DateTimeZone|string|null          $timeZone            The timezone to assume for the Excel timestamp,
169 169
      *                                                                        if you don't want to treat it as a UTC value
170 170
      *                                                                    Use the default (UST) unless you absolutely need a conversion
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     /**
204 204
      * Convert a MS serialized datetime value from Excel to a unix timestamp
205 205
      *
206
-     * @param     int|float                      $excelTimestamp        MS Excel serialized date/time value
206
+     * @param     integer                      $excelTimestamp        MS Excel serialized date/time value
207 207
      * @param     \DateTimeZone|string|null          $timeZone            The timezone to assume for the Excel timestamp,
208 208
      *                                                                        if you don't want to treat it as a UTC value
209 209
      *                                                                    Use the default (UST) unless you absolutely need a conversion
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     /**
220 220
      *    Convert a date from PHP to an MS Excel serialized date/time value
221 221
      *
222
-     *    @param    mixed            $dateValue            Unix Timestamp or PHP DateTime object or a string
222
+     *    @param    integer            $dateValue            Unix Timestamp or PHP DateTime object or a string
223 223
      *    @return   float|bool    Excel date/time value
224 224
      *                                  or boolean FALSE on failure
225 225
      */
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
     /**
258 258
      *    Convert a Unix timestamp to an MS Excel serialized date/time value
259 259
      *
260
-     *    @param    \DateTimeInterface    $dateValue       Unix Timestamp
260
+     *    @param    integer    $dateValue       Unix Timestamp
261 261
      *    @return   float                 MS Excel serialized date/time value
262 262
      */
263 263
     public static function timestampToExcel($dateValue = 0)
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
      * @param    int    $hours
279 279
      * @param    int    $minutes
280 280
      * @param    int    $seconds
281
-     * @return   int    Excel date/time value
281
+     * @return   double    Excel date/time value
282 282
      */
283 283
     public static function formattedPHPToExcel($year, $month, $day, $hours = 0, $minutes = 0, $seconds = 0)
284 284
     {
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/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.
tests/PhpSpreadsheet/Shared/StringTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
     public function testGetCurrencyCode()
66 66
     {
67 67
         $localeconv = localeconv();
68
-        $expectedResult = (!empty($localeconv['currency_symbol']) ? $localeconv['currency_symbol'] : (!empty($localeconv['int_curr_symbol']) ? $localeconv['int_curr_symbol']: '$'));
68
+        $expectedResult = (!empty($localeconv['currency_symbol']) ? $localeconv['currency_symbol'] : (!empty($localeconv['int_curr_symbol']) ? $localeconv['int_curr_symbol'] : '$'));
69 69
         $result = call_user_func([StringHelper::class, 'getCurrencyCode']);
70 70
         $this->assertEquals($expectedResult, $result);
71 71
     }
Please login to merge, or discard this patch.
tests/PhpSpreadsheet/Worksheet/AutoFilter/ColumnTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     {
114 114
         $attributeSet = ['val' => 100,
115 115
                                 'maxVal' => 200,
116
-                             ];
116
+                                ];
117 117
 
118 118
         //    Setters return the instance to implement the fluent interface
119 119
         $result = $this->testAutoFilterColumnObject->setAttributes($attributeSet);
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     {
125 125
         $attributeSet = ['val' => 100,
126 126
                                 'maxVal' => 200,
127
-                             ];
127
+                                ];
128 128
 
129 129
         $this->testAutoFilterColumnObject->setAttributes($attributeSet);
130 130
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     {
138 138
         $attributeSet = ['val' => 100,
139 139
                                 'maxVal' => 200,
140
-                             ];
140
+                                ];
141 141
 
142 142
         foreach ($attributeSet as $attributeName => $attributeValue) {
143 143
             //    Setters return the instance to implement the fluent interface
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     {
151 151
         $attributeSet = ['val' => 100,
152 152
                                 'maxVal' => 200,
153
-                             ];
153
+                                ];
154 154
 
155 155
         $this->testAutoFilterColumnObject->setAttributes($attributeSet);
156 156
 
Please login to merge, or discard this patch.