Passed
Pull Request — master (#4414)
by Owen
13:11
created
tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2DecTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     }
30 30
 
31 31
     #[DataProvider('providerOCT2DEC')]
32
-    public function testDirectCallToOCT2DEC(mixed $expectedResult, bool|string $value): void
32
+    public function testDirectCallToOCT2DEC(mixed $expectedResult, bool | string $value): void
33 33
     {
34 34
         $result = ConvertOctal::toDecimal($value);
35 35
         self::assertSame($expectedResult, $result);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     }
99 99
 
100 100
     #[DataProvider('providerOCT2DECOds')]
101
-    public function testOCT2DECOds(mixed $expectedResult, bool|string $value): void
101
+    public function testOCT2DECOds(mixed $expectedResult, bool | string $value): void
102 102
     {
103 103
         Functions::setCompatibilityMode(
104 104
             Functions::COMPATIBILITY_OPENOFFICE
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2DecTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     }
30 30
 
31 31
     #[DataProvider('providerBIN2DEC')]
32
-    public function testDirectCallToBIN2DEC(float|int|string $expectedResult, bool|int|string $arg1): void
32
+    public function testDirectCallToBIN2DEC(float | int | string $expectedResult, bool | int | string $arg1): void
33 33
     {
34 34
         $result = ConvertBinary::toDecimal($arg1);
35 35
         self::assertSame($expectedResult, $result);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     }
99 99
 
100 100
     #[DataProvider('providerBIN2DECOds')]
101
-    public function testBIN2DECOds(float|int|string $expectedResult, bool $arg1): void
101
+    public function testBIN2DECOds(float | int | string $expectedResult, bool $arg1): void
102 102
     {
103 103
         Functions::setCompatibilityMode(
104 104
             Functions::COMPATIBILITY_OPENOFFICE
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2DecTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     }
30 30
 
31 31
     #[DataProvider('providerHEX2DEC')]
32
-    public function testDirectCallToHEX2DEC(mixed $expectedResult, bool|float|int|string $value): void
32
+    public function testDirectCallToHEX2DEC(mixed $expectedResult, bool | float | int | string $value): void
33 33
     {
34 34
         $result = ConvertHex::toDecimal($value);
35 35
         self::assertSame($expectedResult, $result);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     }
99 99
 
100 100
     #[DataProvider('providerHEX2DECOds')]
101
-    public function testHEX2DECOds(mixed $expectedResult, bool|float|int|string $value): void
101
+    public function testHEX2DECOds(mixed $expectedResult, bool | float | int | string $value): void
102 102
     {
103 103
         Functions::setCompatibilityMode(
104 104
             Functions::COMPATIBILITY_OPENOFFICE
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Calculation/CustomFunction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 
10 10
 class CustomFunction
11 11
 {
12
-    public static function fourthPower(mixed $number): float|int|string
12
+    public static function fourthPower(mixed $number): float | int | string
13 13
     {
14 14
         try {
15 15
             $number = Helpers::validateNumericNullBool($number);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xlsx.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2029,26 +2029,26 @@
 block discarded – undo
2029 2029
         }
2030 2030
     }
2031 2031
 
2032
-    private static function getArrayItem(null|array|bool|SimpleXMLElement $array, int|string $key = 0): mixed
2032
+    private static function getArrayItem(null | array | bool | SimpleXMLElement $array, int | string $key = 0): mixed
2033 2033
     {
2034 2034
         return ($array === null || is_bool($array)) ? null : ($array[$key] ?? null);
2035 2035
     }
2036 2036
 
2037
-    private static function getArrayItemString(null|array|bool|SimpleXMLElement $array, int|string $key = 0): string
2037
+    private static function getArrayItemString(null | array | bool | SimpleXMLElement $array, int | string $key = 0): string
2038 2038
     {
2039 2039
         $retVal = self::getArrayItem($array, $key);
2040 2040
 
2041 2041
         return StringHelper::convertToString($retVal, false);
2042 2042
     }
2043 2043
 
2044
-    private static function getArrayItemIntOrSxml(null|array|bool|SimpleXMLElement $array, int|string $key = 0): int|SimpleXMLElement
2044
+    private static function getArrayItemIntOrSxml(null | array | bool | SimpleXMLElement $array, int | string $key = 0): int | SimpleXMLElement
2045 2045
     {
2046 2046
         $retVal = self::getArrayItem($array, $key);
2047 2047
 
2048 2048
         return (is_int($retVal) || $retVal instanceof SimpleXMLElement) ? $retVal : 0;
2049 2049
     }
2050 2050
 
2051
-    private static function dirAdd(null|SimpleXMLElement|string $base, null|SimpleXMLElement|string $add): string
2051
+    private static function dirAdd(null | SimpleXMLElement | string $base, null | SimpleXMLElement | string $add): string
2052 2052
     {
2053 2053
         $base = (string) $base;
2054 2054
         $add = (string) $add;
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
@@ -327,9 +327,9 @@  discard block
 block discarded – undo
327 327
         return $formula;
328 328
     }
329 329
 
330
-    private static ?array $functionReplaceFromExcel;
330
+    private static ? array $functionReplaceFromExcel;
331 331
 
332
-    private static ?array $functionReplaceToLocale;
332
+    private static ? array $functionReplaceToLocale;
333 333
 
334 334
     public function translateFormulaToLocale(string $formula): string
335 335
     {
@@ -364,9 +364,9 @@  discard block
 block discarded – undo
364 364
         );
365 365
     }
366 366
 
367
-    protected static ?array $functionReplaceFromLocale;
367
+    protected static ? array $functionReplaceFromLocale;
368 368
 
369
-    protected static ?array $functionReplaceToExcel;
369
+    protected static ? array $functionReplaceToExcel;
370 370
 
371 371
     public function translateFormulaToEnglish(string $formula): string
372 372
     {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Calculation.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         return array_key_exists($key, self::EXCEL_CONSTANTS);
162 162
     }
163 163
 
164
-    public static function getExcelConstants(string $key): bool|null
164
+    public static function getExcelConstants(string $key): bool | null
165 165
     {
166 166
         return self::EXCEL_CONSTANTS[$key];
167 167
     }
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
      *
528 528
      * @param string $formula Formula to parse
529 529
      */
530
-    public function parseFormula(string $formula): array|bool
530
+    public function parseFormula(string $formula): array | bool
531 531
     {
532 532
         $formula = preg_replace_callback(
533 533
             self::CALCULATION_REGEXP_CELLREF_SPILL,
@@ -930,7 +930,7 @@  discard block
 block discarded – undo
930 930
     /**
931 931
      * @return false|string False indicates an error
932 932
      */
933
-    private function convertMatrixReferences(string $formula): false|string
933
+    private function convertMatrixReferences(string $formula): false | string
934 934
     {
935 935
         static $matrixReplaceFrom = [self::FORMULA_OPEN_MATRIX_BRACE, ';', self::FORMULA_CLOSE_MATRIX_BRACE];
936 936
         static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))'];
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
     /**
1010 1010
      * @return array<int, mixed>|false
1011 1011
      */
1012
-    private function internalParseFormula(string $formula, ?Cell $cell = null): bool|array
1012
+    private function internalParseFormula(string $formula, ?Cell $cell = null): bool | array
1013 1013
     {
1014 1014
         if (($formula = $this->convertMatrixReferences(trim($formula))) === false) {
1015 1015
             return false;
@@ -2201,7 +2201,7 @@  discard block
 block discarded – undo
2201 2201
         return true;
2202 2202
     }
2203 2203
 
2204
-    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays): array
2204
+    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays): array
2205 2205
     {
2206 2206
         $result = [];
2207 2207
         if (!is_array($operand2)) {
@@ -2243,7 +2243,7 @@  discard block
 block discarded – undo
2243 2243
         return $result;
2244 2244
     }
2245 2245
 
2246
-    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool
2246
+    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays = false): array | bool
2247 2247
     {
2248 2248
         //    If we're dealing with matrix operations, we want a matrix result
2249 2249
         if ((is_array($operand1)) || (is_array($operand2))) {
@@ -2260,7 +2260,7 @@  discard block
 block discarded – undo
2260 2260
         return $result;
2261 2261
     }
2262 2262
 
2263
-    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack): mixed
2263
+    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack): mixed
2264 2264
     {
2265 2265
         //    Validate the two operands
2266 2266
         if (
@@ -2477,7 +2477,7 @@  discard block
 block discarded – undo
2477 2477
      *
2478 2478
      * @return array|string Array of values in range if range contains more than one element. Otherwise, a single value is returned.
2479 2479
      */
2480
-    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array
2480
+    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string | array
2481 2481
     {
2482 2482
         // Return value
2483 2483
         $returnValue = [];
@@ -2612,7 +2612,7 @@  discard block
 block discarded – undo
2612 2612
     /**
2613 2613
      * Add cell reference if needed while making sure that it is the last argument.
2614 2614
      */
2615
-    private function addCellReference(array $args, bool $passCellReference, array|string $functionCall, ?Cell $cell = null): array
2615
+    private function addCellReference(array $args, bool $passCellReference, array | string $functionCall, ?Cell $cell = null): array
2616 2616
     {
2617 2617
         if ($passCellReference) {
2618 2618
             if (is_array($functionCall)) {
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Reader/Xlsx/MySpreadsheet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
 class MySpreadsheet extends Spreadsheet
10 10
 {
11
-    public function calcSquare(string $cellAddress): float|int|string
11
+    public function calcSquare(string $cellAddress): float | int | string
12 12
     {
13 13
         $value = $this->getActiveSheet()
14 14
             ->getCell($cellAddress)
Please login to merge, or discard this patch.