Passed
Push — master ( b504ba...c2a964 )
by
unknown
21:09 queued 09:01
created
src/PhpSpreadsheet/Calculation/Calculation.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         return array_key_exists($key, self::EXCEL_CONSTANTS);
164 164
     }
165 165
 
166
-    public static function getExcelConstants(string $key): bool|null
166
+    public static function getExcelConstants(string $key): bool | null
167 167
     {
168 168
         return self::EXCEL_CONSTANTS[$key];
169 169
     }
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
      *
539 539
      * @param string $formula Formula to parse
540 540
      */
541
-    public function parseFormula(string $formula): array|bool
541
+    public function parseFormula(string $formula): array | bool
542 542
     {
543 543
         $formula = preg_replace_callback(
544 544
             self::CALCULATION_REGEXP_CELLREF_SPILL,
@@ -957,7 +957,7 @@  discard block
 block discarded – undo
957 957
     /**
958 958
      * @return false|string False indicates an error
959 959
      */
960
-    private function convertMatrixReferences(string $formula): false|string
960
+    private function convertMatrixReferences(string $formula): false | string
961 961
     {
962 962
         static $matrixReplaceFrom = [self::FORMULA_OPEN_MATRIX_BRACE, ';', self::FORMULA_CLOSE_MATRIX_BRACE];
963 963
         static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))'];
@@ -1036,7 +1036,7 @@  discard block
 block discarded – undo
1036 1036
     /**
1037 1037
      * @return array<int, mixed>|false
1038 1038
      */
1039
-    private function internalParseFormula(string $formula, ?Cell $cell = null): bool|array
1039
+    private function internalParseFormula(string $formula, ?Cell $cell = null): bool | array
1040 1040
     {
1041 1041
         if (($formula = $this->convertMatrixReferences(trim($formula))) === false) {
1042 1042
             return false;
@@ -1549,7 +1549,7 @@  discard block
 block discarded – undo
1549 1549
     /**
1550 1550
      * @return array<int, mixed>|false|string
1551 1551
      */
1552
-    private function processTokenStack(false|array $tokens, ?string $cellID = null, ?Cell $cell = null)
1552
+    private function processTokenStack(false | array $tokens, ?string $cellID = null, ?Cell $cell = null)
1553 1553
     {
1554 1554
         if ($tokens === false) {
1555 1555
             return false;
@@ -2201,7 +2201,7 @@  discard block
 block discarded – undo
2201 2201
         return $output;
2202 2202
     }
2203 2203
 
2204
-    private function validateBinaryOperand(mixed &$operand, Stack &$stack): bool
2204
+    private function validateBinaryOperand(mixed &$operand, Stack & $stack): bool
2205 2205
     {
2206 2206
         if (is_array($operand)) {
2207 2207
             if ((count($operand, COUNT_RECURSIVE) - count($operand)) == 1) {
@@ -2240,7 +2240,7 @@  discard block
 block discarded – undo
2240 2240
     }
2241 2241
 
2242 2242
     /** @return mixed[] */
2243
-    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays): array
2243
+    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays): array
2244 2244
     {
2245 2245
         $result = [];
2246 2246
         if (!is_array($operand2) && is_array($operand1)) {
@@ -2285,7 +2285,7 @@  discard block
 block discarded – undo
2285 2285
     }
2286 2286
 
2287 2287
     /** @return bool|mixed[] */
2288
-    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool
2288
+    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays = false): array | bool
2289 2289
     {
2290 2290
         //    If we're dealing with matrix operations, we want a matrix result
2291 2291
         if ((is_array($operand1)) || (is_array($operand2))) {
@@ -2302,7 +2302,7 @@  discard block
 block discarded – undo
2302 2302
         return $result;
2303 2303
     }
2304 2304
 
2305
-    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack): mixed
2305
+    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack): mixed
2306 2306
     {
2307 2307
         //    Validate the two operands
2308 2308
         if (
@@ -2525,7 +2525,7 @@  discard block
 block discarded – undo
2525 2525
      *
2526 2526
      * @return mixed[]|string Array of values in range if range contains more than one element. Otherwise, a single value is returned.
2527 2527
      */
2528
-    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array
2528
+    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string | array
2529 2529
     {
2530 2530
         // Return value
2531 2531
         $returnValue = [];
@@ -2674,7 +2674,7 @@  discard block
 block discarded – undo
2674 2674
      *
2675 2675
      * @return mixed[]
2676 2676
      */
2677
-    private function addCellReference(array $args, bool $passCellReference, array|string $functionCall, ?Cell $cell = null): array
2677
+    private function addCellReference(array $args, bool $passCellReference, array | string $functionCall, ?Cell $cell = null): array
2678 2678
     {
2679 2679
         if ($passCellReference) {
2680 2680
             if (is_array($functionCall)) {
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/Chart/Title.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      *
19 19
      * @var array<RichText|string>|RichText|string
20 20
      */
21
-    private array|RichText|string $caption;
21
+    private array | RichText | string $caption;
22 22
 
23 23
     /**
24 24
      * Allow overlay of other elements?
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     /**
38 38
      * Create a new Title.
39 39
      */
40
-    public function __construct(array|RichText|string $caption = '', ?Layout $layout = null, bool $overlay = false)
40
+    public function __construct(array | RichText | string $caption = '', ?Layout $layout = null, bool $overlay = false)
41 41
     {
42 42
         $this->caption = $caption;
43 43
         $this->layout = $layout;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      *
50 50
      * @return array<RichText|string>|RichText|string
51 51
      */
52
-    public function getCaption(): array|RichText|string
52
+    public function getCaption(): array | RichText | string
53 53
     {
54 54
         return $this->caption;
55 55
     }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      *
89 89
      * @return $this
90 90
      */
91
-    public function setCaption(array|RichText|string $caption): static
91
+    public function setCaption(array | RichText | string $caption): static
92 92
     {
93 93
         $this->caption = $caption;
94 94
 
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/Html.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1428,7 +1428,7 @@  discard block
 block discarded – undo
1428 1428
     }
1429 1429
 
1430 1430
     /** @param string|string[] $cssClass */
1431
-    private function generateRowCellData(Worksheet $worksheet, null|Cell|string $cell, array|string &$cssClass): string
1431
+    private function generateRowCellData(Worksheet $worksheet, null | Cell | string $cell, array | string &$cssClass): string
1432 1432
     {
1433 1433
         $cellData = '&nbsp;';
1434 1434
         if ($cell instanceof Cell) {
@@ -1513,7 +1513,7 @@  discard block
 block discarded – undo
1513 1513
         string $cellData,
1514 1514
         int $colSpan,
1515 1515
         int $rowSpan,
1516
-        array|string $cssClass,
1516
+        array | string $cssClass,
1517 1517
         int $colNum,
1518 1518
         int $sheetIndex,
1519 1519
         int $row,
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.
src/PhpSpreadsheet/Reader/BaseReader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
     }
120 120
 
121 121
     /** @param null|string|string[] $sheetList */
122
-    public function setLoadSheetsOnly(string|array|null $sheetList): self
122
+    public function setLoadSheetsOnly(string | array | null $sheetList): self
123 123
     {
124 124
         if ($sheetList === null) {
125 125
             return $this->setLoadAllSheets();
Please login to merge, or discard this patch.