@@ -108,7 +108,7 @@ |
||
108 | 108 | } |
109 | 109 | |
110 | 110 | /** @return false|SimpleXMLElement */ |
111 | - private function trySimpleXMLLoadStringPrivate(string $filename, string $fileOrString = 'file'): SimpleXMLElement|bool |
|
111 | + private function trySimpleXMLLoadStringPrivate(string $filename, string $fileOrString = 'file'): SimpleXMLElement | bool |
|
112 | 112 | { |
113 | 113 | $this->xmlFailMessage = "Cannot load invalid XML $fileOrString: " . $filename; |
114 | 114 | $xml = false; |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | return array_key_exists($key, self::$excelConstants); |
215 | 215 | } |
216 | 216 | |
217 | - public static function getExcelConstants(string $key): bool|null |
|
217 | + public static function getExcelConstants(string $key): bool | null |
|
218 | 218 | { |
219 | 219 | return self::$excelConstants[$key]; |
220 | 220 | } |
@@ -3314,9 +3314,9 @@ discard block |
||
3314 | 3314 | return $formula; |
3315 | 3315 | } |
3316 | 3316 | |
3317 | - private static ?array $functionReplaceFromExcel; |
|
3317 | + private static ? array $functionReplaceFromExcel; |
|
3318 | 3318 | |
3319 | - private static ?array $functionReplaceToLocale; |
|
3319 | + private static ? array $functionReplaceToLocale; |
|
3320 | 3320 | |
3321 | 3321 | public function translateFormulaToLocale(string $formula): string |
3322 | 3322 | { |
@@ -3351,9 +3351,9 @@ discard block |
||
3351 | 3351 | ); |
3352 | 3352 | } |
3353 | 3353 | |
3354 | - private static ?array $functionReplaceFromLocale; |
|
3354 | + private static ? array $functionReplaceFromLocale; |
|
3355 | 3355 | |
3356 | - private static ?array $functionReplaceToExcel; |
|
3356 | + private static ? array $functionReplaceToExcel; |
|
3357 | 3357 | |
3358 | 3358 | public function translateFormulaToEnglish(string $formula): string |
3359 | 3359 | { |
@@ -3538,7 +3538,7 @@ discard block |
||
3538 | 3538 | * |
3539 | 3539 | * @param string $formula Formula to parse |
3540 | 3540 | */ |
3541 | - public function parseFormula(string $formula): array|bool |
|
3541 | + public function parseFormula(string $formula): array | bool |
|
3542 | 3542 | { |
3543 | 3543 | $formula = preg_replace_callback( |
3544 | 3544 | self::CALCULATION_REGEXP_CELLREF_SPILL, |
@@ -3941,7 +3941,7 @@ discard block |
||
3941 | 3941 | /** |
3942 | 3942 | * @return false|string False indicates an error |
3943 | 3943 | */ |
3944 | - private function convertMatrixReferences(string $formula): false|string |
|
3944 | + private function convertMatrixReferences(string $formula): false | string |
|
3945 | 3945 | { |
3946 | 3946 | static $matrixReplaceFrom = [self::FORMULA_OPEN_MATRIX_BRACE, ';', self::FORMULA_CLOSE_MATRIX_BRACE]; |
3947 | 3947 | static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))']; |
@@ -4036,7 +4036,7 @@ discard block |
||
4036 | 4036 | /** |
4037 | 4037 | * @return array<int, mixed>|false |
4038 | 4038 | */ |
4039 | - private function internalParseFormula(string $formula, ?Cell $cell = null): bool|array |
|
4039 | + private function internalParseFormula(string $formula, ?Cell $cell = null): bool | array |
|
4040 | 4040 | { |
4041 | 4041 | if (($formula = $this->convertMatrixReferences(trim($formula))) === false) { |
4042 | 4042 | return false; |
@@ -5210,7 +5210,7 @@ discard block |
||
5210 | 5210 | return true; |
5211 | 5211 | } |
5212 | 5212 | |
5213 | - private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays): array |
|
5213 | + private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays): array |
|
5214 | 5214 | { |
5215 | 5215 | $result = []; |
5216 | 5216 | if (!is_array($operand2)) { |
@@ -5249,7 +5249,7 @@ discard block |
||
5249 | 5249 | return $result; |
5250 | 5250 | } |
5251 | 5251 | |
5252 | - private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool |
|
5252 | + private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays = false): array | bool |
|
5253 | 5253 | { |
5254 | 5254 | // If we're dealing with matrix operations, we want a matrix result |
5255 | 5255 | if ((is_array($operand1)) || (is_array($operand2))) { |
@@ -5266,7 +5266,7 @@ discard block |
||
5266 | 5266 | return $result; |
5267 | 5267 | } |
5268 | 5268 | |
5269 | - private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack): mixed |
|
5269 | + private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack): mixed |
|
5270 | 5270 | { |
5271 | 5271 | // Validate the two operands |
5272 | 5272 | if ( |
@@ -5483,7 +5483,7 @@ discard block |
||
5483 | 5483 | * |
5484 | 5484 | * @return array|string Array of values in range if range contains more than one element. Otherwise, a single value is returned. |
5485 | 5485 | */ |
5486 | - public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array |
|
5486 | + public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string | array |
|
5487 | 5487 | { |
5488 | 5488 | // Return value |
5489 | 5489 | $returnValue = []; |
@@ -5624,7 +5624,7 @@ discard block |
||
5624 | 5624 | /** |
5625 | 5625 | * Add cell reference if needed while making sure that it is the last argument. |
5626 | 5626 | */ |
5627 | - private function addCellReference(array $args, bool $passCellReference, array|string $functionCall, ?Cell $cell = null): array |
|
5627 | + private function addCellReference(array $args, bool $passCellReference, array | string $functionCall, ?Cell $cell = null): array |
|
5628 | 5628 | { |
5629 | 5629 | if ($passCellReference) { |
5630 | 5630 | if (is_array($functionCall)) { |