@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | } |
181 | 181 | |
182 | 182 | /** @return array{type: ?string, value: ?string, alpha: ?int} */ |
183 | - protected function setColorProperties(?string $color, null|float|int|string $alpha, ?string $colorType): array |
|
183 | + protected function setColorProperties(?string $color, null | float | int | string $alpha, ?string $colorType): array |
|
184 | 184 | { |
185 | 185 | return [ |
186 | 186 | 'type' => $colorType, |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | * @param mixed[] $properties |
410 | 410 | * @param array<mixed>|int|string $elements |
411 | 411 | */ |
412 | - protected function getArrayElementsValue(array $properties, array|int|string $elements): mixed |
|
412 | + protected function getArrayElementsValue(array $properties, array | int | string $elements): mixed |
|
413 | 413 | { |
414 | 414 | $reference = &$properties; |
415 | 415 | if (!is_array($elements)) { |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | * |
448 | 448 | * @return null|array<mixed>|float|int|string |
449 | 449 | */ |
450 | - public function getGlowProperty(array|string $property): null|array|float|int|string |
|
450 | + public function getGlowProperty(array | string $property): null | array | float | int | string |
|
451 | 451 | { |
452 | 452 | $retVal = null; |
453 | 453 | if ($property === 'size') { |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | /** |
471 | 471 | * Get Glow Color Property. |
472 | 472 | */ |
473 | - public function getGlowColor(string $propertyName): null|int|string |
|
473 | + public function getGlowColor(string $propertyName): null | int | string |
|
474 | 474 | { |
475 | 475 | return $this->glowColor->getColorProperty($propertyName); |
476 | 476 | } |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | /** |
538 | 538 | * Set Shadow Properties. |
539 | 539 | */ |
540 | - public function setShadowProperties(int $presets, ?string $colorValue = null, ?string $colorType = null, null|float|int|string $colorAlpha = null, ?float $blur = null, ?int $angle = null, ?float $distance = null): void |
|
540 | + public function setShadowProperties(int $presets, ?string $colorValue = null, ?string $colorType = null, null | float | int | string $colorAlpha = null, ?float $blur = null, ?int $angle = null, ?float $distance = null): void |
|
541 | 541 | { |
542 | 542 | $this->activateObject()->setShadowPresetsProperties((int) $presets); |
543 | 543 | if ($presets === 0) { |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | * |
629 | 629 | * @return $this |
630 | 630 | */ |
631 | - protected function setShadowAngle(null|float|int|string $angle) |
|
631 | + protected function setShadowAngle(null | float | int | string $angle) |
|
632 | 632 | { |
633 | 633 | if (is_numeric($angle)) { |
634 | 634 | $this->shadowProperties['direction'] = $angle; |
@@ -663,7 +663,7 @@ discard block |
||
663 | 663 | * |
664 | 664 | * @return null|mixed[]|string |
665 | 665 | */ |
666 | - public function getShadowProperty($elements): array|string|null |
|
666 | + public function getShadowProperty($elements): array | string | null |
|
667 | 667 | { |
668 | 668 | if ($elements === 'color') { |
669 | 669 | return [ |
@@ -753,7 +753,7 @@ discard block |
||
753 | 753 | /** |
754 | 754 | * Get Line Color Property. |
755 | 755 | */ |
756 | - public function getLineColorProperty(string $propertyName): null|int|string |
|
756 | + public function getLineColorProperty(string $propertyName): null | int | string |
|
757 | 757 | { |
758 | 758 | return $this->lineColor->getColorProperty($propertyName); |
759 | 759 | } |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | * Set Line Style Properties. |
763 | 763 | */ |
764 | 764 | public function setLineStyleProperties( |
765 | - null|float|int|string $lineWidth = null, |
|
765 | + null | float | int | string $lineWidth = null, |
|
766 | 766 | ?string $compoundType = '', |
767 | 767 | ?string $dashType = '', |
768 | 768 | ?string $capType = '', |
@@ -863,7 +863,7 @@ discard block |
||
863 | 863 | * |
864 | 864 | * @param array<mixed>|string $elements |
865 | 865 | */ |
866 | - public function getLineStyleProperty(array|string $elements): ?string |
|
866 | + public function getLineStyleProperty(array | string $elements): ?string |
|
867 | 867 | { |
868 | 868 | $retVal = $this->getArrayElementsValue($this->lineStyleProperties, $elements); |
869 | 869 | if (is_scalar($retVal)) { |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | int $pointCount = 0, |
88 | 88 | ?array $dataValues = [], |
89 | 89 | ?string $marker = null, |
90 | - null|ChartColor|array|string $fillColor = null, |
|
91 | - int|string $pointSize = 3 |
|
90 | + null | ChartColor | array | string $fillColor = null, |
|
91 | + int | string $pointSize = 3 |
|
92 | 92 | ) { |
93 | 93 | parent::__construct(); |
94 | 94 | $this->markerFillColor = new ChartColor(); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | * |
286 | 286 | * @return string|string[] HEX color or array with HEX colors |
287 | 287 | */ |
288 | - public function getFillColor(): string|array |
|
288 | + public function getFillColor(): string | array |
|
289 | 289 | { |
290 | 290 | if ($this->fillColor === null) { |
291 | 291 | return ''; |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | /** |
349 | 349 | * Get line width for series. |
350 | 350 | */ |
351 | - public function getLineWidth(): null|float|int |
|
351 | + public function getLineWidth(): null | float | int |
|
352 | 352 | { |
353 | 353 | /** @var null|float|int */ |
354 | 354 | $temp = $this->lineStyleProperties['width']; |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | * |
362 | 362 | * @return $this |
363 | 363 | */ |
364 | - public function setLineWidth(null|float|int $width): static |
|
364 | + public function setLineWidth(null | float | int $width): static |
|
365 | 365 | { |
366 | 366 | $this->lineStyleProperties['width'] = $width; |
367 | 367 |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * |
19 | 19 | * @var array<RichText|string>|RichText|string |
20 | 20 | */ |
21 | - private array|RichText|string $caption; |
|
21 | + private array | RichText | string $caption; |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Allow overlay of other elements? |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @param array<RichText|string>|RichText|string $caption |
41 | 41 | */ |
42 | - public function __construct(array|RichText|string $caption = '', ?Layout $layout = null, bool $overlay = false) |
|
42 | + public function __construct(array | RichText | string $caption = '', ?Layout $layout = null, bool $overlay = false) |
|
43 | 43 | { |
44 | 44 | $this->caption = $caption; |
45 | 45 | $this->layout = $layout; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * |
52 | 52 | * @return array<RichText|string>|RichText|string |
53 | 53 | */ |
54 | - public function getCaption(): array|RichText|string |
|
54 | + public function getCaption(): array | RichText | string |
|
55 | 55 | { |
56 | 56 | return $this->caption; |
57 | 57 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * |
93 | 93 | * @return $this |
94 | 94 | */ |
95 | - public function setCaption(array|RichText|string $caption): static |
|
95 | + public function setCaption(array | RichText | string $caption): static |
|
96 | 96 | { |
97 | 97 | $this->caption = $caption; |
98 | 98 |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * @return array<mixed>|string If an array of values is passed for either of the arguments, then the returned result |
80 | 80 | * will also be an array with matching dimensions |
81 | 81 | */ |
82 | - public static function FIXEDFORMAT(mixed $value, mixed $decimals = 2, mixed $noCommas = false): array|string |
|
82 | + public static function FIXEDFORMAT(mixed $value, mixed $decimals = 2, mixed $noCommas = false): array | string |
|
83 | 83 | { |
84 | 84 | if (is_array($value) || is_array($decimals) || is_array($noCommas)) { |
85 | 85 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $decimals, $noCommas); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * @return array<mixed>|string If an array of values is passed for either of the arguments, then the returned result |
120 | 120 | * will also be an array with matching dimensions |
121 | 121 | */ |
122 | - public static function TEXTFORMAT(mixed $value, mixed $format): array|string |
|
122 | + public static function TEXTFORMAT(mixed $value, mixed $format): array | string |
|
123 | 123 | { |
124 | 124 | if (is_array($value) || is_array($format)) { |
125 | 125 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $format); |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | * @return array<mixed>|string If an array of values is passed for either of the arguments, then the returned result |
240 | 240 | * will also be an array with matching dimensions |
241 | 241 | */ |
242 | - public static function valueToText(mixed $value, mixed $format = false): array|string |
|
242 | + public static function valueToText(mixed $value, mixed $format = false): array | string |
|
243 | 243 | { |
244 | 244 | if (is_array($value) || is_array($format)) { |
245 | 245 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $format); |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | * |
283 | 283 | * @return array<mixed>|float|string |
284 | 284 | */ |
285 | - public static function NUMBERVALUE(mixed $value = '', mixed $decimalSeparator = null, mixed $groupSeparator = null): array|string|float |
|
285 | + public static function NUMBERVALUE(mixed $value = '', mixed $decimalSeparator = null, mixed $groupSeparator = null): array | string | float |
|
286 | 286 | { |
287 | 287 | if (is_array($value) || is_array($decimalSeparator) || is_array($groupSeparator)) { |
288 | 288 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $decimalSeparator, $groupSeparator); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @return array<mixed>|string If an array of values is passed for either of the arguments, then the returned result |
29 | 29 | * will also be an array with matching dimensions |
30 | 30 | */ |
31 | - public static function replace(mixed $oldText, mixed $start, mixed $chars, mixed $newText): array|string |
|
31 | + public static function replace(mixed $oldText, mixed $start, mixed $chars, mixed $newText): array | string |
|
32 | 32 | { |
33 | 33 | if (is_array($oldText) || is_array($start) || is_array($chars) || is_array($newText)) { |
34 | 34 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $oldText, $start, $chars, $newText); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @return array<mixed>|string If an array of values is passed for either of the arguments, then the returned result |
69 | 69 | * will also be an array with matching dimensions |
70 | 70 | */ |
71 | - public static function substitute(mixed $text = '', mixed $fromText = '', mixed $toText = '', mixed $instance = null): array|string |
|
71 | + public static function substitute(mixed $text = '', mixed $fromText = '', mixed $toText = '', mixed $instance = null): array | string |
|
72 | 72 | { |
73 | 73 | if (is_array($text) || is_array($fromText) || is_array($toText) || is_array($instance)) { |
74 | 74 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $text, $fromText, $toText, $instance); |
@@ -37,7 +37,7 @@ |
||
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); |
@@ -51,7 +51,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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); |
@@ -21,7 +21,7 @@ discard block |
||
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 |
||
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 |
||
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); |
@@ -164,7 +164,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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)) { |