Passed
Pull Request — master (#3834)
by Shinji
21:30
created
src/PhpSpreadsheet/Helper/Dimension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      *                If this is a height, then size is measured in pixels ()
49 49
      *                   or in points () if $unit is null.
50 50
      */
51
-    protected float|int $size;
51
+    protected float | int $size;
52 52
 
53 53
     /**
54 54
      * @var null|string
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Document/Properties.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
     /**
41 41
      * Created.
42 42
      */
43
-    private float|int $created;
43
+    private float | int $created;
44 44
 
45 45
     /**
46 46
      * Modified.
47 47
      */
48
-    private float|int $modified;
48
+    private float | int $modified;
49 49
 
50 50
     /**
51 51
      * Title.
@@ -459,32 +459,32 @@  discard block
 block discarded – undo
459 459
     }
460 460
 
461 461
     private const PROPERTY_TYPE_ARRAY = [
462
-        'i' => self::PROPERTY_TYPE_INTEGER,      //    Integer
463
-        'i1' => self::PROPERTY_TYPE_INTEGER,     //    1-Byte Signed Integer
464
-        'i2' => self::PROPERTY_TYPE_INTEGER,     //    2-Byte Signed Integer
465
-        'i4' => self::PROPERTY_TYPE_INTEGER,     //    4-Byte Signed Integer
466
-        'i8' => self::PROPERTY_TYPE_INTEGER,     //    8-Byte Signed Integer
467
-        'int' => self::PROPERTY_TYPE_INTEGER,    //    Integer
468
-        'ui1' => self::PROPERTY_TYPE_INTEGER,    //    1-Byte Unsigned Integer
469
-        'ui2' => self::PROPERTY_TYPE_INTEGER,    //    2-Byte Unsigned Integer
470
-        'ui4' => self::PROPERTY_TYPE_INTEGER,    //    4-Byte Unsigned Integer
471
-        'ui8' => self::PROPERTY_TYPE_INTEGER,    //    8-Byte Unsigned Integer
472
-        'uint' => self::PROPERTY_TYPE_INTEGER,   //    Unsigned Integer
473
-        'f' => self::PROPERTY_TYPE_FLOAT,        //    Real Number
474
-        'r4' => self::PROPERTY_TYPE_FLOAT,       //    4-Byte Real Number
475
-        'r8' => self::PROPERTY_TYPE_FLOAT,       //    8-Byte Real Number
476
-        'decimal' => self::PROPERTY_TYPE_FLOAT,  //    Decimal
477
-        's' => self::PROPERTY_TYPE_STRING,       //    String
478
-        'empty' => self::PROPERTY_TYPE_STRING,   //    Empty
479
-        'null' => self::PROPERTY_TYPE_STRING,    //    Null
480
-        'lpstr' => self::PROPERTY_TYPE_STRING,   //    LPSTR
481
-        'lpwstr' => self::PROPERTY_TYPE_STRING,  //    LPWSTR
482
-        'bstr' => self::PROPERTY_TYPE_STRING,    //    Basic String
483
-        'd' => self::PROPERTY_TYPE_DATE,         //    Date and Time
484
-        'date' => self::PROPERTY_TYPE_DATE,      //    Date and Time
485
-        'filetime' => self::PROPERTY_TYPE_DATE,  //    File Time
486
-        'b' => self::PROPERTY_TYPE_BOOLEAN,      //    Boolean
487
-        'bool' => self::PROPERTY_TYPE_BOOLEAN,   //    Boolean
462
+        'i' => self::PROPERTY_TYPE_INTEGER, //    Integer
463
+        'i1' => self::PROPERTY_TYPE_INTEGER, //    1-Byte Signed Integer
464
+        'i2' => self::PROPERTY_TYPE_INTEGER, //    2-Byte Signed Integer
465
+        'i4' => self::PROPERTY_TYPE_INTEGER, //    4-Byte Signed Integer
466
+        'i8' => self::PROPERTY_TYPE_INTEGER, //    8-Byte Signed Integer
467
+        'int' => self::PROPERTY_TYPE_INTEGER, //    Integer
468
+        'ui1' => self::PROPERTY_TYPE_INTEGER, //    1-Byte Unsigned Integer
469
+        'ui2' => self::PROPERTY_TYPE_INTEGER, //    2-Byte Unsigned Integer
470
+        'ui4' => self::PROPERTY_TYPE_INTEGER, //    4-Byte Unsigned Integer
471
+        'ui8' => self::PROPERTY_TYPE_INTEGER, //    8-Byte Unsigned Integer
472
+        'uint' => self::PROPERTY_TYPE_INTEGER, //    Unsigned Integer
473
+        'f' => self::PROPERTY_TYPE_FLOAT, //    Real Number
474
+        'r4' => self::PROPERTY_TYPE_FLOAT, //    4-Byte Real Number
475
+        'r8' => self::PROPERTY_TYPE_FLOAT, //    8-Byte Real Number
476
+        'decimal' => self::PROPERTY_TYPE_FLOAT, //    Decimal
477
+        's' => self::PROPERTY_TYPE_STRING, //    String
478
+        'empty' => self::PROPERTY_TYPE_STRING, //    Empty
479
+        'null' => self::PROPERTY_TYPE_STRING, //    Null
480
+        'lpstr' => self::PROPERTY_TYPE_STRING, //    LPSTR
481
+        'lpwstr' => self::PROPERTY_TYPE_STRING, //    LPWSTR
482
+        'bstr' => self::PROPERTY_TYPE_STRING, //    Basic String
483
+        'd' => self::PROPERTY_TYPE_DATE, //    Date and Time
484
+        'date' => self::PROPERTY_TYPE_DATE, //    Date and Time
485
+        'filetime' => self::PROPERTY_TYPE_DATE, //    File Time
486
+        'b' => self::PROPERTY_TYPE_BOOLEAN, //    Boolean
487
+        'bool' => self::PROPERTY_TYPE_BOOLEAN, //    Boolean
488 488
     ];
489 489
 
490 490
     private const SPECIAL_TYPES = [
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Shared/ExactFontTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         'be189a7e2711cdf2a7f6275c60cbc7e2',
53 53
     ];
54 54
 
55
-    private float|int|null $paddingAmountExact;
55
+    private float | int | null $paddingAmountExact;
56 56
 
57 57
     protected function setUp(): void
58 58
     {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Calculation.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3978,7 +3978,7 @@  discard block
 block discarded – undo
3978 3978
     /**
3979 3979
      * @return false|string False indicates an error
3980 3980
      */
3981
-    private function convertMatrixReferences(string $formula): false|string
3981
+    private function convertMatrixReferences(string $formula): false | string
3982 3982
     {
3983 3983
         static $matrixReplaceFrom = [self::FORMULA_OPEN_MATRIX_BRACE, ';', self::FORMULA_CLOSE_MATRIX_BRACE];
3984 3984
         static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))'];
@@ -4081,7 +4081,7 @@  discard block
 block discarded – undo
4081 4081
      *
4082 4082
      * @return array<int, mixed>|false
4083 4083
      */
4084
-    private function internalParseFormula($formula, ?Cell $cell = null): bool|array
4084
+    private function internalParseFormula($formula, ?Cell $cell = null): bool | array
4085 4085
     {
4086 4086
         if (($formula = $this->convertMatrixReferences(trim($formula))) === false) {
4087 4087
             return false;
@@ -5219,7 +5219,7 @@  discard block
 block discarded – undo
5219 5219
         return true;
5220 5220
     }
5221 5221
 
5222
-    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays): array
5222
+    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays): array
5223 5223
     {
5224 5224
         $result = [];
5225 5225
         if (!is_array($operand2)) {
@@ -5258,7 +5258,7 @@  discard block
 block discarded – undo
5258 5258
         return $result;
5259 5259
     }
5260 5260
 
5261
-    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool
5261
+    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays = false): array | bool
5262 5262
     {
5263 5263
         //    If we're dealing with matrix operations, we want a matrix result
5264 5264
         if ((is_array($operand1)) || (is_array($operand2))) {
@@ -5486,7 +5486,7 @@  discard block
 block discarded – undo
5486 5486
      *
5487 5487
      * @return array|string Array of values in range if range contains more than one element. Otherwise, a single value is returned.
5488 5488
      */
5489
-    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array
5489
+    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string | array
5490 5490
     {
5491 5491
         // Return value
5492 5492
         $returnValue = [];
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Engineering.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      *                                If places is nonnumeric, DEC2BIN returns the #VALUE! error value.
242 242
      *                                If places is zero or negative, DEC2BIN returns the #NUM! error value.
243 243
      */
244
-    public static function DECTOBIN(mixed $x, mixed $places = null): string|array
244
+    public static function DECTOBIN(mixed $x, mixed $places = null): string | array
245 245
     {
246 246
         return Engineering\ConvertDecimal::toBinary($x, $places);
247 247
     }
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      *                                If places is nonnumeric, DEC2HEX returns the #VALUE! error value.
276 276
      *                                If places is zero or negative, DEC2HEX returns the #NUM! error value.
277 277
      */
278
-    public static function DECTOHEX(mixed $x, mixed $places = null): string|array
278
+    public static function DECTOHEX(mixed $x, mixed $places = null): string | array
279 279
     {
280 280
         return Engineering\ConvertDecimal::toHex($x, $places);
281 281
     }
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      *                                If places is nonnumeric, DEC2OCT returns the #VALUE! error value.
310 310
      *                                If places is zero or negative, DEC2OCT returns the #NUM! error value.
311 311
      */
312
-    public static function DECTOOCT(mixed $x, mixed $places = null): string|array
312
+    public static function DECTOOCT(mixed $x, mixed $places = null): string | array
313 313
     {
314 314
         return Engineering\ConvertDecimal::toOctal($x, $places);
315 315
     }
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
      *                                    If places is nonnumeric, OCT2HEX returns the #VALUE! error value.
517 517
      *                                    If places is negative, OCT2HEX returns the #NUM! error value.
518 518
      */
519
-    public static function OCTTOHEX(mixed $x, mixed $places = null): string|array
519
+    public static function OCTTOHEX(mixed $x, mixed $places = null): string | array
520 520
     {
521 521
         return Engineering\ConvertOctal::toHex($x, $places);
522 522
     }
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
      * @param string $complexNumber the complex number for which you want the imaginary
561 561
      *                                         coefficient
562 562
      */
563
-    public static function IMAGINARY($complexNumber): string|float|array
563
+    public static function IMAGINARY($complexNumber): string | float | array
564 564
     {
565 565
         return Engineering\Complex::IMAGINARY($complexNumber);
566 566
     }
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
      *
580 580
      * @param string $complexNumber the complex number for which you want the real coefficient
581 581
      */
582
-    public static function IMREAL($complexNumber): string|float|array
582
+    public static function IMREAL($complexNumber): string | float | array
583 583
     {
584 584
         return Engineering\Complex::IMREAL($complexNumber);
585 585
     }
@@ -1247,7 +1247,7 @@  discard block
 block discarded – undo
1247 1247
      * @param float $upper upper bound for integrating ERF.
1248 1248
      *                                If omitted, ERF integrates between zero and lower_limit
1249 1249
      */
1250
-    public static function ERF($lower, $upper = null): float|string|array
1250
+    public static function ERF($lower, $upper = null): float | string | array
1251 1251
     {
1252 1252
         return Engineering\Erf::ERF($lower, $upper);
1253 1253
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      *
21 21
      * @return float|string
22 22
      */
23
-    public static function sumSquare(mixed ...$args): string|int|float
23
+    public static function sumSquare(mixed ...$args): string | int | float
24 24
     {
25 25
         try {
26 26
             $returnValue = 0;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      *
64 64
      * @return float|string
65 65
      */
66
-    public static function sumXSquaredMinusYSquared($matrixData1, $matrixData2): string|int|float
66
+    public static function sumXSquaredMinusYSquared($matrixData1, $matrixData2): string | int | float
67 67
     {
68 68
         try {
69 69
             $array1 = Functions::flattenArray($matrixData1);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      *
92 92
      * @return float|string
93 93
      */
94
-    public static function sumXSquaredPlusYSquared($matrixData1, $matrixData2): string|int|float
94
+    public static function sumXSquaredPlusYSquared($matrixData1, $matrixData2): string | int | float
95 95
     {
96 96
         try {
97 97
             $array1 = Functions::flattenArray($matrixData1);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      *
120 120
      * @return float|string
121 121
      */
122
-    public static function sumXMinusYSquared($matrixData1, $matrixData2): string|int|float
122
+    public static function sumXMinusYSquared($matrixData1, $matrixData2): string | int | float
123 123
     {
124 124
         try {
125 125
             $array1 = Functions::flattenArray($matrixData1);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/SeriesSum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      *
23 23
      * @return array|float|string The result, or a string containing an error
24 24
      */
25
-    public static function evaluate(mixed $x, mixed $n, mixed $m, ...$args): array|string|float|int
25
+    public static function evaluate(mixed $x, mixed $n, mixed $m, ...$args): array | string | float | int
26 26
     {
27 27
         if (is_array($x) || is_array($n) || is_array($m)) {
28 28
             return self::evaluateArrayArgumentsSubset([self::class, __FUNCTION__], 3, $x, $n, $m, ...$args);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Lcm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      *
50 50
      * @return int|string Lowest Common Multiplier, or a string containing an error
51 51
      */
52
-    public static function evaluate(mixed ...$args): int|string
52
+    public static function evaluate(mixed ...$args): int | string
53 53
     {
54 54
         try {
55 55
             $arrayArgs = [];
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Absolute.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
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
21 21
      *            with the same dimensions
22 22
      */
23
-    public static function evaluate(mixed $number): array|string|int|float
23
+    public static function evaluate(mixed $number): array | string | int | float
24 24
     {
25 25
         if (is_array($number)) {
26 26
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);
Please login to merge, or discard this patch.