@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | }; |
115 | 115 | } |
116 | 116 | |
117 | - protected function wrapValue(mixed $value): float|int|string |
|
117 | + protected function wrapValue(mixed $value): float | int | string |
|
118 | 118 | { |
119 | 119 | if (!is_numeric($value)) { |
120 | 120 | if (is_bool($value)) { |
@@ -129,14 +129,14 @@ discard block |
||
129 | 129 | return $value; |
130 | 130 | } |
131 | 131 | |
132 | - protected function wrapCellValue(): float|int|string |
|
132 | + protected function wrapCellValue(): float | int | string |
|
133 | 133 | { |
134 | 134 | $this->cell = $this->worksheet->getCell([$this->cellColumn, $this->cellRow]); |
135 | 135 | |
136 | 136 | return $this->wrapValue($this->cell->getCalculatedValue()); |
137 | 137 | } |
138 | 138 | |
139 | - protected function conditionCellAdjustment(array $matches): float|int|string |
|
139 | + protected function conditionCellAdjustment(array $matches): float | int | string |
|
140 | 140 | { |
141 | 141 | $column = $matches[6]; |
142 | 142 | $row = $matches[7]; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * |
50 | 50 | * @param array $args data to be concatenated |
51 | 51 | */ |
52 | - public static function actualCONCATENATE(...$args): array|string |
|
52 | + public static function actualCONCATENATE(...$args): array | string |
|
53 | 53 | { |
54 | 54 | if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_GNUMERIC) { |
55 | 55 | return self::CONCATENATE(...$args); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | return $result; |
66 | 66 | } |
67 | 67 | |
68 | - private static function concatenate2Args(array|string $operand1, null|array|bool|float|int|string $operand2): array|string |
|
68 | + private static function concatenate2Args(array | string $operand1, null | array | bool | float | int | string $operand2): array | string |
|
69 | 69 | { |
70 | 70 | if (is_array($operand1) || is_array($operand2)) { |
71 | 71 | $operand1 = Calculation::boolToString($operand1); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * If an array of values is passed for the $delimiter or $ignoreEmpty arguments, then the returned result |
112 | 112 | * will also be an array with matching dimensions |
113 | 113 | */ |
114 | - public static function TEXTJOIN(mixed $delimiter = '', mixed $ignoreEmpty = true, mixed ...$args): array|string |
|
114 | + public static function TEXTJOIN(mixed $delimiter = '', mixed $ignoreEmpty = true, mixed ...$args): array | string |
|
115 | 115 | { |
116 | 116 | if (is_array($delimiter) || is_array($ignoreEmpty)) { |
117 | 117 | return self::evaluateArrayArgumentsSubset( |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | * If an array of values is passed for the $stringValue or $repeatCount arguments, then the returned result |
169 | 169 | * will also be an array with matching dimensions |
170 | 170 | */ |
171 | - public static function builtinREPT(mixed $stringValue, mixed $repeatCount): array|string |
|
171 | + public static function builtinREPT(mixed $stringValue, mixed $repeatCount): array | string |
|
172 | 172 | { |
173 | 173 | if (is_array($stringValue) || is_array($repeatCount)) { |
174 | 174 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $stringValue, $repeatCount); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | return $result; |
40 | 40 | } |
41 | 41 | |
42 | - public static function anchorArray(string $cellReference, Cell $cell): array|string |
|
42 | + public static function anchorArray(string $cellReference, Cell $cell): array | string |
|
43 | 43 | { |
44 | 44 | //$coordinate = $cell->getCoordinate(); |
45 | 45 | $worksheet = $cell->getWorksheet(); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | string $cellAddress, |
29 | 29 | string $expectedRange, |
30 | 30 | string $expectedFormula, |
31 | - array|float $expectedValue |
|
31 | + array | float $expectedValue |
|
32 | 32 | ): void { |
33 | 33 | $filename = 'tests/data/Reader/Gnumeric/ArrayFormulaTest.gnumeric'; |
34 | 34 | $reader = new Gnumeric(); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | string $cellAddress, |
29 | 29 | string $expectedRange, |
30 | 30 | string $expectedFormula, |
31 | - array|float $expectedValue |
|
31 | + array | float $expectedValue |
|
32 | 32 | ): void { |
33 | 33 | $filename = 'tests/data/Reader/Ods/ArrayFormulaTest.ods'; |
34 | 34 | $reader = new Ods(); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | return array_key_exists($key, self::$excelConstants); |
211 | 211 | } |
212 | 212 | |
213 | - public static function getExcelConstants(string $key): bool|null |
|
213 | + public static function getExcelConstants(string $key): bool | null |
|
214 | 214 | { |
215 | 215 | return self::$excelConstants[$key]; |
216 | 216 | } |
@@ -3279,10 +3279,10 @@ discard block |
||
3279 | 3279 | } |
3280 | 3280 | |
3281 | 3281 | /** @var ?array */ |
3282 | - private static ?array $functionReplaceFromExcel; |
|
3282 | + private static ? array $functionReplaceFromExcel; |
|
3283 | 3283 | |
3284 | 3284 | /** @var ?array */ |
3285 | - private static ?array $functionReplaceToLocale; |
|
3285 | + private static ? array $functionReplaceToLocale; |
|
3286 | 3286 | |
3287 | 3287 | /** |
3288 | 3288 | * @deprecated 1.30.0 use translateFormulaToLocale() instead |
@@ -3328,10 +3328,10 @@ discard block |
||
3328 | 3328 | } |
3329 | 3329 | |
3330 | 3330 | /** @var ?array */ |
3331 | - private static ?array $functionReplaceFromLocale; |
|
3331 | + private static ? array $functionReplaceFromLocale; |
|
3332 | 3332 | |
3333 | 3333 | /** @var ?array */ |
3334 | - private static ?array $functionReplaceToExcel; |
|
3334 | + private static ? array $functionReplaceToExcel; |
|
3335 | 3335 | |
3336 | 3336 | /** |
3337 | 3337 | * @deprecated 1.30.0 use translateFormulaToEnglish() instead |
@@ -3548,7 +3548,7 @@ discard block |
||
3548 | 3548 | * |
3549 | 3549 | * @param string $formula Formula to parse |
3550 | 3550 | */ |
3551 | - public function parseFormula(string $formula): array|bool |
|
3551 | + public function parseFormula(string $formula): array | bool |
|
3552 | 3552 | { |
3553 | 3553 | $formula = preg_replace_callback( |
3554 | 3554 | self::CALCULATION_REGEXP_CELLREF_SPILL, |
@@ -3951,7 +3951,7 @@ discard block |
||
3951 | 3951 | /** |
3952 | 3952 | * @return false|string False indicates an error |
3953 | 3953 | */ |
3954 | - private function convertMatrixReferences(string $formula): false|string |
|
3954 | + private function convertMatrixReferences(string $formula): false | string |
|
3955 | 3955 | { |
3956 | 3956 | static $matrixReplaceFrom = [self::FORMULA_OPEN_MATRIX_BRACE, ';', self::FORMULA_CLOSE_MATRIX_BRACE]; |
3957 | 3957 | static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))']; |
@@ -4046,7 +4046,7 @@ discard block |
||
4046 | 4046 | /** |
4047 | 4047 | * @return array<int, mixed>|false |
4048 | 4048 | */ |
4049 | - private function internalParseFormula(string $formula, ?Cell $cell = null): bool|array |
|
4049 | + private function internalParseFormula(string $formula, ?Cell $cell = null): bool | array |
|
4050 | 4050 | { |
4051 | 4051 | if (($formula = $this->convertMatrixReferences(trim($formula))) === false) { |
4052 | 4052 | return false; |
@@ -5208,7 +5208,7 @@ discard block |
||
5208 | 5208 | return true; |
5209 | 5209 | } |
5210 | 5210 | |
5211 | - private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays): array |
|
5211 | + private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays): array |
|
5212 | 5212 | { |
5213 | 5213 | $result = []; |
5214 | 5214 | if (!is_array($operand2)) { |
@@ -5247,7 +5247,7 @@ discard block |
||
5247 | 5247 | return $result; |
5248 | 5248 | } |
5249 | 5249 | |
5250 | - private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool |
|
5250 | + private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays = false): array | bool |
|
5251 | 5251 | { |
5252 | 5252 | // If we're dealing with matrix operations, we want a matrix result |
5253 | 5253 | if ((is_array($operand1)) || (is_array($operand2))) { |
@@ -5264,7 +5264,7 @@ discard block |
||
5264 | 5264 | return $result; |
5265 | 5265 | } |
5266 | 5266 | |
5267 | - private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack): mixed |
|
5267 | + private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack): mixed |
|
5268 | 5268 | { |
5269 | 5269 | // Validate the two operands |
5270 | 5270 | if ( |
@@ -5469,7 +5469,7 @@ discard block |
||
5469 | 5469 | * |
5470 | 5470 | * @return array|string Array of values in range if range contains more than one element. Otherwise, a single value is returned. |
5471 | 5471 | */ |
5472 | - public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array |
|
5472 | + public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string | array |
|
5473 | 5473 | { |
5474 | 5474 | // Return value |
5475 | 5475 | $returnValue = []; |
@@ -5610,7 +5610,7 @@ discard block |
||
5610 | 5610 | /** |
5611 | 5611 | * Add cell reference if needed while making sure that it is the last argument. |
5612 | 5612 | */ |
5613 | - private function addCellReference(array $args, bool $passCellReference, array|string $functionCall, ?Cell $cell = null): array |
|
5613 | + private function addCellReference(array $args, bool $passCellReference, array | string $functionCall, ?Cell $cell = null): array |
|
5614 | 5614 | { |
5615 | 5615 | if ($passCellReference) { |
5616 | 5616 | if (is_array($functionCall)) { |