Passed
Pull Request — master (#4556)
by Owen
15:08
created
src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
      *                    in hidden rows
85 85
      * @param mixed[] $args A mixed data series of values
86 86
      */
87
-    public static function evaluate(mixed $functionType, ...$args): float|int|string
87
+    public static function evaluate(mixed $functionType, ...$args): float | int | string
88 88
     {
89 89
         /** @var Cell */
90 90
         $cellReference = array_pop($args);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/CalculationLocale.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -337,10 +337,10 @@  discard block
 block discarded – undo
337 337
     }
338 338
 
339 339
     /** @var null|string[] */
340
-    private static ?array $functionReplaceFromExcel;
340
+    private static ? array $functionReplaceFromExcel;
341 341
 
342 342
     /** @var null|string[] */
343
-    private static ?array $functionReplaceToLocale;
343
+    private static ? array $functionReplaceToLocale;
344 344
 
345 345
     public function translateFormulaToLocale(string $formula): string
346 346
     {
@@ -376,10 +376,10 @@  discard block
 block discarded – undo
376 376
     }
377 377
 
378 378
     /** @var null|string[] */
379
-    protected static ?array $functionReplaceFromLocale;
379
+    protected static ? array $functionReplaceFromLocale;
380 380
 
381 381
     /** @var null|string[] */
382
-    protected static ?array $functionReplaceToExcel;
382
+    protected static ? array $functionReplaceToExcel;
383 383
 
384 384
     public function translateFormulaToEnglish(string $formula): string
385 385
     {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Database/DatabaseAbstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      *                                        the column label in which you specify a condition for the
26 26
      *                                        column.
27 27
      */
28
-    abstract public static function evaluate(array $database, array|null|int|string $field, array $criteria): null|float|int|string;
28
+    abstract public static function evaluate(array $database, array | null | int | string $field, array $criteria): null | float | int | string;
29 29
 
30 30
     /**
31 31
      * fieldExtract.
Please login to merge, or discard this patch.
PhpSpreadsheetTests/Calculation/Functions/Engineering/ConvertUoMTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
     }
52 52
 
53 53
     #[DataProvider('providerCONVERTUOM')]
54
-    public function testDirectCallToCONVERTUOM(float|int|string $expectedResult, float|int|string $value, string $from, string $to): void
54
+    public function testDirectCallToCONVERTUOM(float | int | string $expectedResult, float | int | string $value, string $from, string $to): void
55 55
     {
56 56
         $result = ConvertUOM::convert($value, $from, $to);
57 57
         self::assertEqualsWithDelta($expectedResult, $result, self::UOM_PRECISION);
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Cell/CoordinateTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
     }
171 171
 
172 172
     #[DataProvider('providerAbsoluteReferences')]
173
-    public function testAbsoluteReferenceFromString(mixed $expectedResult, int|string $rangeSet): void
173
+    public function testAbsoluteReferenceFromString(mixed $expectedResult, int | string $rangeSet): void
174 174
     {
175 175
         $result = Coordinate::absoluteReference((string) $rangeSet);
176 176
         self::assertEquals($expectedResult, $result);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Cell/Coordinate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      *
85 85
      * @return string Absolute coordinate        e.g. '$A' or '$1' or '$A$1'
86 86
      */
87
-    public static function absoluteReference(int|string $cellAddress): string
87
+    public static function absoluteReference(int | string $cellAddress): string
88 88
     {
89 89
         $cellAddress = (string) $cellAddress;
90 90
         if (self::coordinateIsRange($cellAddress)) {
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
      *
421 421
      * @param int|numeric-string $columnIndex Column index (A = 1)
422 422
      */
423
-    public static function stringFromColumnIndex(int|string $columnIndex): string
423
+    public static function stringFromColumnIndex(int | string $columnIndex): string
424 424
     {
425 425
         /** @var string[] */
426 426
         static $indexCache = [];
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Xls.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
         }
384 384
     }
385 385
 
386
-    private function processMemoryDrawing(BstoreContainer &$bstoreContainer, MemoryDrawing $drawing, string $renderingFunctionx): void
386
+    private function processMemoryDrawing(BstoreContainer & $bstoreContainer, MemoryDrawing $drawing, string $renderingFunctionx): void
387 387
     {
388 388
         switch ($renderingFunctionx) {
389 389
             case MemoryDrawing::RENDERING_JPEG:
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 
416 416
     private static int $two = 2; // phpstan silliness
417 417
 
418
-    private function processDrawing(BstoreContainer &$bstoreContainer, Drawing $drawing): void
418
+    private function processDrawing(BstoreContainer & $bstoreContainer, Drawing $drawing): void
419 419
     {
420 420
         $blipType = 0;
421 421
         $blipData = '';
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
         }
473 473
     }
474 474
 
475
-    private function processBaseDrawing(BstoreContainer &$bstoreContainer, BaseDrawing $drawing): void
475
+    private function processBaseDrawing(BstoreContainer & $bstoreContainer, BaseDrawing $drawing): void
476 476
     {
477 477
         if ($drawing instanceof Drawing && $drawing->getPath() !== '') {
478 478
             $this->processDrawing($bstoreContainer, $drawing);
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
     }
761 761
 
762 762
     /** @param array<int, array{summary: array{pack: string, data: mixed}, offset: array{pack: string}, type: array{pack: string, data: int}, data: array{data: mixed}}> $dataSection */
763
-    private function writeSummaryPropOle(float|int $dataProp, int &$dataSection_NumProps, array &$dataSection, int $sumdata, int $typdata): void
763
+    private function writeSummaryPropOle(float | int $dataProp, int &$dataSection_NumProps, array &$dataSection, int $sumdata, int $typdata): void
764 764
     {
765 765
         if ($dataProp) {
766 766
             $dataSection[] = [
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Xls/Parser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
      *
95 95
      * @var mixed[]|string
96 96
      */
97
-    public array|string $parseTree;
97
+    public array | string $parseTree;
98 98
 
99 99
     /**
100 100
      * Array of external sheets.
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
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     }
223 223
 
224 224
     /** @param mixed[] $rowData */
225
-    private function processCRecord(array $rowData, Spreadsheet &$spreadsheet, string &$row, string &$column): void
225
+    private function processCRecord(array $rowData, Spreadsheet & $spreadsheet, string &$row, string &$column): void
226 226
     {
227 227
         //    Read cell value data
228 228
         $hasCalculatedValue = false;
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
         $this->processCFinal($spreadsheet, $hasCalculatedValue, $cellDataFormula, $cellData, "$columnLetter$row", $tryNumeric);
298 298
     }
299 299
 
300
-    private function processCFinal(Spreadsheet &$spreadsheet, bool $hasCalculatedValue, string $cellDataFormula, string $cellData, string $coordinate, bool $tryNumeric): void
300
+    private function processCFinal(Spreadsheet & $spreadsheet, bool $hasCalculatedValue, string $cellDataFormula, string $cellData, string $coordinate, bool $tryNumeric): void
301 301
     {
302 302
         // Set cell value
303 303
         $spreadsheet->getActiveSheet()->getCell($coordinate)->setValue(($hasCalculatedValue) ? $cellDataFormula : $cellData);
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
     }
309 309
 
310 310
     /** @param mixed[] $rowData */
311
-    private function processFRecord(array $rowData, Spreadsheet &$spreadsheet, string &$row, string &$column): void
311
+    private function processFRecord(array $rowData, Spreadsheet & $spreadsheet, string &$row, string &$column): void
312 312
     {
313 313
         //    Read cell formatting
314 314
         $formatStyle = $columnWidth = '';
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
         }
380 380
     }
381 381
 
382
-    private function addFormats(Spreadsheet &$spreadsheet, string $formatStyle, string $row, string $column): void
382
+    private function addFormats(Spreadsheet & $spreadsheet, string $formatStyle, string $row, string $column): void
383 383
     {
384 384
         if ($formatStyle && $column > '' && $row > '') {
385 385
             $columnLetter = Coordinate::stringFromColumnIndex((int) $column);
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
         }
390 390
     }
391 391
 
392
-    private function addFonts(Spreadsheet &$spreadsheet, string $fontStyle, string $row, string $column): void
392
+    private function addFonts(Spreadsheet & $spreadsheet, string $fontStyle, string $row, string $column): void
393 393
     {
394 394
         if ($fontStyle && $column > '' && $row > '') {
395 395
             $columnLetter = Coordinate::stringFromColumnIndex((int) $column);
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
     }
401 401
 
402 402
     /** @param mixed[] $styleData */
403
-    private function addStyle(Spreadsheet &$spreadsheet, array $styleData, string $row, string $column): void
403
+    private function addStyle(Spreadsheet & $spreadsheet, array $styleData, string $row, string $column): void
404 404
     {
405 405
         if ((!empty($styleData)) && $column > '' && $row > '') {
406 406
             $columnLetter = Coordinate::stringFromColumnIndex((int) $column);
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
     }
428 428
 
429 429
     /** @param string[] $rowData */
430
-    private function processPRecord(array $rowData, Spreadsheet &$spreadsheet): void
430
+    private function processPRecord(array $rowData, Spreadsheet & $spreadsheet): void
431 431
     {
432 432
         //    Read shared styles
433 433
         $formatArray = [];
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
     }
485 485
 
486 486
     /** @param mixed[] $formatArray */
487
-    private function processPFinal(Spreadsheet &$spreadsheet, array $formatArray): void
487
+    private function processPFinal(Spreadsheet & $spreadsheet, array $formatArray): void
488 488
     {
489 489
         if (array_key_exists('numberFormat', $formatArray)) {
490 490
             $this->formats['P' . $this->format] = $formatArray;
Please login to merge, or discard this patch.