Passed
Pull Request — master (#3718)
by Adrien
13:25
created
Category
tests/PhpSpreadsheetTests/Style/NumberFormat/Wizard/CurrencyTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
             ["[\$€-fy-NL]\u{a0}#,##0.00;[\$€-fy-NL]\u{a0}#,##0.00-", '€', 'fy-NL'], // Trailing negative
68 68
             ["[\$€-nl-NL]\u{a0}#,##0.00;[\$€-nl-NL]\u{a0}-#,##0.00", '€', 'nl-NL'], // Sign between currency and value
69 69
             ["[\$€-nl-BE]\u{a0}#,##0.00;[\$€-nl-BE]\u{a0}-#,##0.00", '€', 'NL-BE'], // Sign between currency and value
70
-            ["#,##0.00\u{a0}[\$€-fr-BE]", '€', 'fr-be'],   // Trailing currency code
71
-            ["#,##0.00\u{a0}[\$€-el-GR]", '€', 'el-gr'],   // Trailing currency code
70
+            ["#,##0.00\u{a0}[\$€-fr-BE]", '€', 'fr-be'], // Trailing currency code
71
+            ["#,##0.00\u{a0}[\$€-el-GR]", '€', 'el-gr'], // Trailing currency code
72 72
             ['[$$-en-CA]#,##0.00', '$', 'en-ca'],
73
-            ["#,##0.00\u{a0}[\$\$-fr-CA]", '$', 'fr-ca'],   // Trailing currency code
73
+            ["#,##0.00\u{a0}[\$\$-fr-CA]", '$', 'fr-ca'], // Trailing currency code
74 74
             ['[$¥-ja-JP]#,##0', '¥', 'ja-JP'], // No decimals
75
-            ["#,##0.000\u{a0}[\$د.ب\u{200e}-ar-BH]", "د.ب\u{200e}", 'ar-BH', true],  // 3 decimals
75
+            ["#,##0.000\u{a0}[\$د.ب\u{200e}-ar-BH]", "د.ب\u{200e}", 'ar-BH', true], // 3 decimals
76 76
         ];
77 77
     }
78 78
 
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
             ["[\$€-fy-NL]\u{a0}#,##0;[\$€-fy-NL]\u{a0}#,##0-", '€', 'fy-NL'], // Trailing negative
131 131
             ["[\$€-nl-NL]\u{a0}#,##0;[\$€-nl-NL]\u{a0}-#,##0", '€', 'nl-NL'], // Sign between currency and value
132 132
             ["[\$€-nl-BE]\u{a0}#,##0;[\$€-nl-BE]\u{a0}-#,##0", '€', 'NL-BE'], // Sign between currency and value
133
-            ["#,##0\u{a0}[\$€-fr-BE]", '€', 'fr-be'],   // Trailing currency code
134
-            ["#,##0\u{a0}[\$€-el-GR]", '€', 'el-gr'],   // Trailing currency code
133
+            ["#,##0\u{a0}[\$€-fr-BE]", '€', 'fr-be'], // Trailing currency code
134
+            ["#,##0\u{a0}[\$€-el-GR]", '€', 'el-gr'], // Trailing currency code
135 135
             ['[$$-en-CA]#,##0', '$', 'en-ca'],
136
-            ["#,##0\u{a0}[\$\$-fr-CA]", '$', 'fr-ca'],   // Trailing currency code
136
+            ["#,##0\u{a0}[\$\$-fr-CA]", '$', 'fr-ca'], // Trailing currency code
137 137
             ['[$¥-ja-JP]#,##0', '¥', 'ja-JP'], // No decimals to truncate
138
-            ["#,##0\u{a0}[\$د.ب\u{200e}-ar-BH]", "د.ب\u{200e}", 'ar-BH', true],  // 3 decimals truncated to none
138
+            ["#,##0\u{a0}[\$د.ب\u{200e}-ar-BH]", "د.ب\u{200e}", 'ar-BH', true], // 3 decimals truncated to none
139 139
         ];
140 140
     }
141 141
 
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Style/NumberFormat/Wizard/AccountingTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             ['[$$-en-CA]#,##0.00;([$$-en-CA]#,##0.00)', '$', 'en-ca'],
73 73
             ["#,##0.00\u{a0}[\$\$-fr-CA];(#,##0.00\u{a0}[\$\$-fr-CA])", '$', 'fr-ca'],
74 74
             ['[$¥-ja-JP]#,##0;([$¥-ja-JP]#,##0)', '¥', 'ja-JP'], // No decimals
75
-            ["#,##0.000\u{a0}[\$د.ب\u{200e}-ar-BH]", "د.ب\u{200e}", 'ar-BH', true],  // 3 decimals
75
+            ["#,##0.000\u{a0}[\$د.ب\u{200e}-ar-BH]", "د.ب\u{200e}", 'ar-BH', true], // 3 decimals
76 76
         ];
77 77
     }
78 78
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             ['[$$-en-CA]#,##0;([$$-en-CA]#,##0)', '$', 'en-ca'],
136 136
             ["#,##0\u{a0}[\$\$-fr-CA];(#,##0\u{a0}[\$\$-fr-CA])", '$', 'fr-ca'],
137 137
             ['[$¥-ja-JP]#,##0;([$¥-ja-JP]#,##0)', '¥', 'ja-JP'], // No decimals to truncate
138
-            ["#,##0\u{a0}[\$د.ب\u{200e}-ar-BH]", "د.ب\u{200e}", 'ar-BH', true],  // 3 decimals truncated to none
138
+            ["#,##0\u{a0}[\$د.ب\u{200e}-ar-BH]", "د.ب\u{200e}", 'ar-BH', true], // 3 decimals truncated to none
139 139
         ];
140 140
     }
141 141
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Slk.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         $hasCalculatedValue = true;
267 267
     }
268 268
 
269
-    private function processCRecord(array $rowData, Spreadsheet &$spreadsheet, string &$row, string &$column): void
269
+    private function processCRecord(array $rowData, Spreadsheet & $spreadsheet, string &$row, string &$column): void
270 270
     {
271 271
         //    Read cell value data
272 272
         $hasCalculatedValue = false;
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
         $this->processCFinal($spreadsheet, $hasCalculatedValue, $cellDataFormula, $cellData, "$columnLetter$row", $tryNumeric);
312 312
     }
313 313
 
314
-    private function processCFinal(Spreadsheet &$spreadsheet, bool $hasCalculatedValue, string $cellDataFormula, string $cellData, string $coordinate, bool $tryNumeric): void
314
+    private function processCFinal(Spreadsheet & $spreadsheet, bool $hasCalculatedValue, string $cellDataFormula, string $cellData, string $coordinate, bool $tryNumeric): void
315 315
     {
316 316
         // Set cell value
317 317
         $spreadsheet->getActiveSheet()->getCell($coordinate)->setValue(($hasCalculatedValue) ? $cellDataFormula : $cellData);
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
         }
322 322
     }
323 323
 
324
-    private function processFRecord(array $rowData, Spreadsheet &$spreadsheet, string &$row, string &$column): void
324
+    private function processFRecord(array $rowData, Spreadsheet & $spreadsheet, string &$row, string &$column): void
325 325
     {
326 326
         //    Read cell formatting
327 327
         $formatStyle = $columnWidth = '';
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
         }
390 390
     }
391 391
 
392
-    private function addFormats(Spreadsheet &$spreadsheet, string $formatStyle, string $row, string $column): void
392
+    private function addFormats(Spreadsheet & $spreadsheet, string $formatStyle, string $row, string $column): void
393 393
     {
394 394
         if ($formatStyle && $column > '' && $row > '') {
395 395
             $columnLetter = Coordinate::stringFromColumnIndex((int) $column);
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
         }
400 400
     }
401 401
 
402
-    private function addFonts(Spreadsheet &$spreadsheet, string $fontStyle, string $row, string $column): void
402
+    private function addFonts(Spreadsheet & $spreadsheet, string $fontStyle, string $row, string $column): void
403 403
     {
404 404
         if ($fontStyle && $column > '' && $row > '') {
405 405
             $columnLetter = Coordinate::stringFromColumnIndex((int) $column);
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
         }
410 410
     }
411 411
 
412
-    private function addStyle(Spreadsheet &$spreadsheet, array $styleData, string $row, string $column): void
412
+    private function addStyle(Spreadsheet & $spreadsheet, array $styleData, string $row, string $column): void
413 413
     {
414 414
         if ((!empty($styleData)) && $column > '' && $row > '') {
415 415
             $columnLetter = Coordinate::stringFromColumnIndex((int) $column);
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
         }
435 435
     }
436 436
 
437
-    private function processPRecord(array $rowData, Spreadsheet &$spreadsheet): void
437
+    private function processPRecord(array $rowData, Spreadsheet & $spreadsheet): void
438 438
     {
439 439
         //    Read shared styles
440 440
         $formatArray = [];
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
         }
488 488
     }
489 489
 
490
-    private function processPFinal(Spreadsheet &$spreadsheet, array $formatArray): void
490
+    private function processPFinal(Spreadsheet & $spreadsheet, array $formatArray): void
491 491
     {
492 492
         if (array_key_exists('numberFormat', $formatArray)) {
493 493
             $this->formats['P' . $this->format] = $formatArray;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/StringHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -414,7 +414,7 @@
 block discarded – undo
414 414
     {
415 415
         // characters
416 416
         $chars = self::convertEncoding($textValue, 'UTF-16LE', 'UTF-8');
417
-        $ln = (int) (strlen($chars) / 2);  // N.B. - strlen, not mb_strlen issue #642
417
+        $ln = (int) (strlen($chars) / 2); // N.B. - strlen, not mb_strlen issue #642
418 418
 
419 419
         return pack('vC', $ln, 0x0001) . $chars;
420 420
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart/Legend.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
      *
110 110
      * @return false|int
111 111
      */
112
-    public function getPositionXL(): int|bool
112
+    public function getPositionXL(): int | bool
113 113
     {
114 114
         // Scrutinizer thinks the following could return string. It is wrong.
115 115
         return array_search($this->position, self::POSITION_XLREF);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
      *
58 58
      * @return array|string The resulting array, or a string containing an error
59 59
      */
60
-    public static function sequence($rows = 1, $columns = 1, $start = 1, $step = 1): string|array
60
+    public static function sequence($rows = 1, $columns = 1, $start = 1, $step = 1): string | array
61 61
     {
62 62
         try {
63 63
             $rows = (int) Helpers::validateNumericNullSubstitution($rows, 1);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/HashTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
      *
113 113
      * @return false|int Index
114 114
      */
115
-    public function getIndexForHashCode(string $hashCode): int|bool
115
+    public function getIndexForHashCode(string $hashCode): int | bool
116 116
     {
117 117
         // Scrutinizer thinks the following could return string. It is wrong.
118 118
         return array_search($hashCode, $this->keyMap, true);
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Chart/Issue589Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      *
22 22
      * @param string|string[] $color HEX color or array with HEX colors
23 23
      */
24
-    private function buildChartSpreadsheet(string|array $color): Spreadsheet
24
+    private function buildChartSpreadsheet(string | array $color): Spreadsheet
25 25
     {
26 26
         // Problem occurs when setting plot line color
27 27
         // The output chart xml file is missing the a:ln tag
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Custom/ComplexAssert.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         parent::__construct('complexAssert');
21 21
     }
22 22
 
23
-    private function testExpectedExceptions(string|float $expected, string|float $actual): bool
23
+    private function testExpectedExceptions(string | float $expected, string | float $actual): bool
24 24
     {
25 25
         //    Expecting an error, so we do a straight string comparison
26 26
         if ($expected === $actual) {
Please login to merge, or discard this patch.