@@ -161,7 +161,7 @@ discard block |
||
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 | } |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | * |
529 | 529 | * @param string $formula Formula to parse |
530 | 530 | */ |
531 | - public function parseFormula(string $formula): array|bool |
|
531 | + public function parseFormula(string $formula): array | bool |
|
532 | 532 | { |
533 | 533 | $formula = preg_replace_callback( |
534 | 534 | self::CALCULATION_REGEXP_CELLREF_SPILL, |
@@ -943,7 +943,7 @@ discard block |
||
943 | 943 | /** |
944 | 944 | * @return false|string False indicates an error |
945 | 945 | */ |
946 | - private function convertMatrixReferences(string $formula): false|string |
|
946 | + private function convertMatrixReferences(string $formula): false | string |
|
947 | 947 | { |
948 | 948 | static $matrixReplaceFrom = [self::FORMULA_OPEN_MATRIX_BRACE, ';', self::FORMULA_CLOSE_MATRIX_BRACE]; |
949 | 949 | static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))']; |
@@ -1022,7 +1022,7 @@ discard block |
||
1022 | 1022 | /** |
1023 | 1023 | * @return array<int, mixed>|false |
1024 | 1024 | */ |
1025 | - private function internalParseFormula(string $formula, ?Cell $cell = null): bool|array |
|
1025 | + private function internalParseFormula(string $formula, ?Cell $cell = null): bool | array |
|
1026 | 1026 | { |
1027 | 1027 | if (($formula = $this->convertMatrixReferences(trim($formula))) === false) { |
1028 | 1028 | return false; |
@@ -1534,7 +1534,7 @@ discard block |
||
1534 | 1534 | /** |
1535 | 1535 | * @return array<int, mixed>|false|string |
1536 | 1536 | */ |
1537 | - private function processTokenStack(false|array $tokens, ?string $cellID = null, ?Cell $cell = null) |
|
1537 | + private function processTokenStack(false | array $tokens, ?string $cellID = null, ?Cell $cell = null) |
|
1538 | 1538 | { |
1539 | 1539 | if ($tokens === false) { |
1540 | 1540 | return false; |
@@ -2180,7 +2180,7 @@ discard block |
||
2180 | 2180 | return $output; |
2181 | 2181 | } |
2182 | 2182 | |
2183 | - private function validateBinaryOperand(mixed &$operand, Stack &$stack): bool |
|
2183 | + private function validateBinaryOperand(mixed &$operand, Stack & $stack): bool |
|
2184 | 2184 | { |
2185 | 2185 | if (is_array($operand)) { |
2186 | 2186 | if ((count($operand, COUNT_RECURSIVE) - count($operand)) == 1) { |
@@ -2218,7 +2218,7 @@ discard block |
||
2218 | 2218 | return true; |
2219 | 2219 | } |
2220 | 2220 | |
2221 | - private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays): array |
|
2221 | + private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays): array |
|
2222 | 2222 | { |
2223 | 2223 | $result = []; |
2224 | 2224 | if (!is_array($operand2) && is_array($operand1)) { |
@@ -2262,7 +2262,7 @@ discard block |
||
2262 | 2262 | return $result; |
2263 | 2263 | } |
2264 | 2264 | |
2265 | - private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool |
|
2265 | + private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays = false): array | bool |
|
2266 | 2266 | { |
2267 | 2267 | // If we're dealing with matrix operations, we want a matrix result |
2268 | 2268 | if ((is_array($operand1)) || (is_array($operand2))) { |
@@ -2279,7 +2279,7 @@ discard block |
||
2279 | 2279 | return $result; |
2280 | 2280 | } |
2281 | 2281 | |
2282 | - private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack): mixed |
|
2282 | + private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack): mixed |
|
2283 | 2283 | { |
2284 | 2284 | // Validate the two operands |
2285 | 2285 | if ( |
@@ -2502,7 +2502,7 @@ discard block |
||
2502 | 2502 | * |
2503 | 2503 | * @return array|string Array of values in range if range contains more than one element. Otherwise, a single value is returned. |
2504 | 2504 | */ |
2505 | - public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array |
|
2505 | + public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string | array |
|
2506 | 2506 | { |
2507 | 2507 | // Return value |
2508 | 2508 | $returnValue = []; |
@@ -2637,7 +2637,7 @@ discard block |
||
2637 | 2637 | /** |
2638 | 2638 | * Add cell reference if needed while making sure that it is the last argument. |
2639 | 2639 | */ |
2640 | - private function addCellReference(array $args, bool $passCellReference, array|string $functionCall, ?Cell $cell = null): array |
|
2640 | + private function addCellReference(array $args, bool $passCellReference, array | string $functionCall, ?Cell $cell = null): array |
|
2641 | 2641 | { |
2642 | 2642 | if ($passCellReference) { |
2643 | 2643 | if (is_array($functionCall)) { |