Passed
Push — master ( 055281...135371 )
by
unknown
19:31 queued 11:35
created
src/PhpSpreadsheet/Calculation/TextData/Trim.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array
38 38
      *            with the same dimensions
39 39
      */
40
-    public static function spaces(mixed $stringValue = ''): array|string
40
+    public static function spaces(mixed $stringValue = ''): array | string
41 41
     {
42 42
         if (is_array($stringValue)) {
43 43
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $stringValue);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/TextData/Concatenate.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      *
52 52
      * @return array<string>|string
53 53
      */
54
-    public static function actualCONCATENATE(...$args): array|string
54
+    public static function actualCONCATENATE(...$args): array | string
55 55
     {
56 56
         if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_GNUMERIC) {
57 57
             return self::CONCATENATE(...$args);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      *
74 74
      * @return array<string>|string
75 75
      */
76
-    private static function concatenate2Args(array|string $operand1, null|array|bool|float|int|string $operand2): array|string
76
+    private static function concatenate2Args(array | string $operand1, null | array | bool | float | int | string $operand2): array | string
77 77
     {
78 78
         if (is_array($operand1) || is_array($operand2)) {
79 79
             $operand1 = Calculation::boolToString($operand1);
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      *         If an array of values is passed for the $delimiter or $ignoreEmpty arguments, then the returned result
125 125
      *            will also be an array with matching dimensions
126 126
      */
127
-    public static function TEXTJOIN($delimiter = '', $ignoreEmpty = true, mixed ...$args): array|string
127
+    public static function TEXTJOIN($delimiter = '', $ignoreEmpty = true, mixed ...$args): array | string
128 128
     {
129 129
         if (is_array($delimiter) || is_array($ignoreEmpty)) {
130 130
             return self::evaluateArrayArgumentsSubset(
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
      *         If an array of values is passed for the $stringValue or $repeatCount arguments, then the returned result
184 184
      *            will also be an array with matching dimensions
185 185
      */
186
-    public static function builtinREPT(mixed $stringValue, mixed $repeatCount): array|string
186
+    public static function builtinREPT(mixed $stringValue, mixed $repeatCount): array | string
187 187
     {
188 188
         if (is_array($stringValue) || is_array($repeatCount)) {
189 189
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $stringValue, $repeatCount);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/TextData/CaseConvert.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array
22 22
      *            with the same dimensions
23 23
      */
24
-    public static function lower(mixed $mixedCaseValue): array|string
24
+    public static function lower(mixed $mixedCaseValue): array | string
25 25
     {
26 26
         if (is_array($mixedCaseValue)) {
27 27
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array
48 48
      *            with the same dimensions
49 49
      */
50
-    public static function upper(mixed $mixedCaseValue): array|string
50
+    public static function upper(mixed $mixedCaseValue): array | string
51 51
     {
52 52
         if (is_array($mixedCaseValue)) {
53 53
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array
74 74
      *            with the same dimensions
75 75
      */
76
-    public static function proper(mixed $mixedCaseValue): array|string
76
+    public static function proper(mixed $mixedCaseValue): array | string
77 77
     {
78 78
         if (is_array($mixedCaseValue)) {
79 79
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Calculation.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         return array_key_exists($key, self::EXCEL_CONSTANTS);
165 165
     }
166 166
 
167
-    public static function getExcelConstants(string $key): bool|null
167
+    public static function getExcelConstants(string $key): bool | null
168 168
     {
169 169
         return self::EXCEL_CONSTANTS[$key];
170 170
     }
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
      *
544 544
      * @return array<mixed>|bool
545 545
      */
546
-    public function parseFormula(string $formula): array|bool
546
+    public function parseFormula(string $formula): array | bool
547 547
     {
548 548
         $formula = preg_replace_callback(
549 549
             self::CALCULATION_REGEXP_CELLREF_SPILL,
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
     /**
968 968
      * @return false|string False indicates an error
969 969
      */
970
-    private function convertMatrixReferences(string $formula): false|string
970
+    private function convertMatrixReferences(string $formula): false | string
971 971
     {
972 972
         //    Convert any Excel matrix references to the MKMATRIX() function
973 973
         if (str_contains($formula, self::FORMULA_OPEN_MATRIX_BRACE)) {
@@ -1043,7 +1043,7 @@  discard block
 block discarded – undo
1043 1043
     /**
1044 1044
      * @return array<int, mixed>|false
1045 1045
      */
1046
-    private function internalParseFormula(string $formula, ?Cell $cell = null): bool|array
1046
+    private function internalParseFormula(string $formula, ?Cell $cell = null): bool | array
1047 1047
     {
1048 1048
         if (($formula = $this->convertMatrixReferences(trim($formula))) === false) {
1049 1049
             return false;
@@ -1563,7 +1563,7 @@  discard block
 block discarded – undo
1563 1563
      *
1564 1564
      * @return array<int, mixed>|false|string
1565 1565
      */
1566
-    private function processTokenStack(false|array $tokens, ?string $cellID = null, ?Cell $cell = null)
1566
+    private function processTokenStack(false | array $tokens, ?string $cellID = null, ?Cell $cell = null)
1567 1567
     {
1568 1568
         if ($tokens === false) {
1569 1569
             return false;
@@ -2234,7 +2234,7 @@  discard block
 block discarded – undo
2234 2234
         return $output;
2235 2235
     }
2236 2236
 
2237
-    private function validateBinaryOperand(mixed &$operand, Stack &$stack): bool
2237
+    private function validateBinaryOperand(mixed &$operand, Stack & $stack): bool
2238 2238
     {
2239 2239
         if (is_array($operand)) {
2240 2240
             if ((count($operand, COUNT_RECURSIVE) - count($operand)) == 1) {
@@ -2273,7 +2273,7 @@  discard block
 block discarded – undo
2273 2273
     }
2274 2274
 
2275 2275
     /** @return mixed[] */
2276
-    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays): array
2276
+    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays): array
2277 2277
     {
2278 2278
         $result = [];
2279 2279
         if (!is_array($operand2) && is_array($operand1)) {
@@ -2318,7 +2318,7 @@  discard block
 block discarded – undo
2318 2318
     }
2319 2319
 
2320 2320
     /** @return bool|mixed[] */
2321
-    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool
2321
+    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays = false): array | bool
2322 2322
     {
2323 2323
         //    If we're dealing with matrix operations, we want a matrix result
2324 2324
         if ((is_array($operand1)) || (is_array($operand2))) {
@@ -2335,7 +2335,7 @@  discard block
 block discarded – undo
2335 2335
         return $result;
2336 2336
     }
2337 2337
 
2338
-    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack): mixed
2338
+    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack): mixed
2339 2339
     {
2340 2340
         //    Validate the two operands
2341 2341
         if (
@@ -2561,7 +2561,7 @@  discard block
 block discarded – undo
2561 2561
      *
2562 2562
      * @return mixed[]|string Array of values in range if range contains more than one element. Otherwise, a single value is returned.
2563 2563
      */
2564
-    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array
2564
+    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string | array
2565 2565
     {
2566 2566
         // Return value
2567 2567
         $returnValue = [];
@@ -2711,7 +2711,7 @@  discard block
 block discarded – undo
2711 2711
      *
2712 2712
      * @return mixed[]
2713 2713
      */
2714
-    private function addCellReference(array $args, bool $passCellReference, array|string $functionCall, ?Cell $cell = null): array
2714
+    private function addCellReference(array $args, bool $passCellReference, array | string $functionCall, ?Cell $cell = null): array
2715 2715
     {
2716 2716
         if ($passCellReference) {
2717 2717
             if (is_array($functionCall)) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
71 71
      *            with the same dimensions
72 72
      */
73
-    public static function math(mixed $number, mixed $significance = null, $mode = 0, bool $checkSigns = false): array|string|float
73
+    public static function math(mixed $number, mixed $significance = null, $mode = 0, bool $checkSigns = false): array | string | float
74 74
     {
75 75
         if (is_array($number) || is_array($significance) || is_array($mode)) {
76 76
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $significance, $mode);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
117 117
      *            with the same dimensions
118 118
      */
119
-    public static function precise(mixed $number, $significance = 1): array|string|float
119
+    public static function precise(mixed $number, $significance = 1): array | string | float
120 120
     {
121 121
         if (is_array($number) || is_array($significance)) {
122 122
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $significance);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      *
150 150
      * @return array<mixed>|float|string Rounded Number, or a string containing an error
151 151
      */
152
-    public static function mathOds(mixed $number, mixed $significance = null, $mode = 0): array|string|float
152
+    public static function mathOds(mixed $number, mixed $significance = null, $mode = 0): array | string | float
153 153
     {
154 154
         return self::math($number, $significance, $mode, true);
155 155
     }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     /**
166 166
      * Avoid Scrutinizer problems concerning complexity.
167 167
      */
168
-    private static function argumentsOk(float $number, float $significance): float|string
168
+    private static function argumentsOk(float $number, float $significance): float | string
169 169
     {
170 170
         if (empty($number * $significance)) {
171 171
             return 0.0;
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Calculation/Functions/Database/DCountTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      * @param mixed[][] $criteria
16 16
      */
17 17
     #[DataProvider('providerDCount')]
18
-    public function testDirectCallToDCount(int|string $expectedResult, array $database, string|int|null $field, array $criteria): void
18
+    public function testDirectCallToDCount(int | string $expectedResult, array $database, string | int | null $field, array $criteria): void
19 19
     {
20 20
         $result = DCount::evaluate($database, $field, $criteria);
21 21
         self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @param mixed[][] $criteria
27 27
      */
28 28
     #[DataProvider('providerDCount')]
29
-    public function testDCountAsWorksheetFormula(int|string $expectedResult, array $database, string|int|null $field, array $criteria): void
29
+    public function testDCountAsWorksheetFormula(int | string $expectedResult, array $database, string | int | null $field, array $criteria): void
30 30
     {
31 31
         $this->prepareWorksheetWithFormula('DCOUNT', $database, $field, $criteria);
32 32
 
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Calculation/Functions/Database/DSumTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      * @param mixed[][] $criteria
16 16
      */
17 17
     #[DataProvider('providerDSum')]
18
-    public function testDirectCallToDSum(int|float|string $expectedResult, array $database, ?string $field, array $criteria): void
18
+    public function testDirectCallToDSum(int | float | string $expectedResult, array $database, ?string $field, array $criteria): void
19 19
     {
20 20
         $result = DSum::evaluate($database, $field, $criteria);
21 21
         self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @param mixed[][] $criteria
27 27
      */
28 28
     #[DataProvider('providerDSum')]
29
-    public function testDSumAsWorksheetFormula(int|float|string $expectedResult, array $database, ?string $field, array $criteria): void
29
+    public function testDSumAsWorksheetFormula(int | float | string $expectedResult, array $database, ?string $field, array $criteria): void
30 30
     {
31 31
         $this->prepareWorksheetWithFormula('DSUM', $database, $field, $criteria);
32 32
 
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Calculation/Functions/Database/DVarTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      * @param mixed[][] $criteria
16 16
      */
17 17
     #[DataProvider('providerDVar')]
18
-    public function testDirectCallToDVar(float|string $expectedResult, array $database, ?string $field, array $criteria): void
18
+    public function testDirectCallToDVar(float | string $expectedResult, array $database, ?string $field, array $criteria): void
19 19
     {
20 20
         $result = DVar::evaluate($database, $field, $criteria);
21 21
         self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @param mixed[][] $criteria
27 27
      */
28 28
     #[DataProvider('providerDVar')]
29
-    public function testDVarAsWorksheetFormula(float|string $expectedResult, array $database, ?string $field, array $criteria): void
29
+    public function testDVarAsWorksheetFormula(float | string $expectedResult, array $database, ?string $field, array $criteria): void
30 30
     {
31 31
         $this->prepareWorksheetWithFormula('DVAR', $database, $field, $criteria);
32 32
 
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Calculation/Functions/Database/DStDevTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      * @param mixed[][] $criteria
16 16
      */
17 17
     #[DataProvider('providerDStDev')]
18
-    public function testDirectCallToDStDev(float|string $expectedResult, array $database, ?string $field, array $criteria): void
18
+    public function testDirectCallToDStDev(float | string $expectedResult, array $database, ?string $field, array $criteria): void
19 19
     {
20 20
         $result = DStDev::evaluate($database, $field, $criteria);
21 21
         self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @param mixed[][] $criteria
27 27
      */
28 28
     #[DataProvider('providerDStDev')]
29
-    public function testDStDevAsWorksheetFormula(float|string $expectedResult, array $database, ?string $field, array $criteria): void
29
+    public function testDStDevAsWorksheetFormula(float | string $expectedResult, array $database, ?string $field, array $criteria): void
30 30
     {
31 31
         $this->prepareWorksheetWithFormula('DSTDEV', $database, $field, $criteria);
32 32
 
Please login to merge, or discard this patch.