@@ -64,7 +64,7 @@ |
||
64 | 64 | * If an array of numbers is passed as the argument, then the returned result will also be an array |
65 | 65 | * with the same dimensions |
66 | 66 | */ |
67 | - public static function fromYMD(array|float|int|string $year, array|float|int|string $month, array|float|int|string $day): float|int|DateTime|string|array |
|
67 | + public static function fromYMD(array | float | int | string $year, array | float | int | string $month, array | float | int | string $day): float | int | DateTime | string | array |
|
68 | 68 | { |
69 | 69 | if (is_array($year) || is_array($month) || is_array($day)) { |
70 | 70 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $year, $month, $day); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | return array_key_exists($key, self::$excelConstants); |
209 | 209 | } |
210 | 210 | |
211 | - public static function getExcelConstants(string $key): bool|null |
|
211 | + public static function getExcelConstants(string $key): bool | null |
|
212 | 212 | { |
213 | 213 | return self::$excelConstants[$key]; |
214 | 214 | } |
@@ -3273,10 +3273,10 @@ discard block |
||
3273 | 3273 | } |
3274 | 3274 | |
3275 | 3275 | /** @var ?array */ |
3276 | - private static ?array $functionReplaceFromExcel; |
|
3276 | + private static ? array $functionReplaceFromExcel; |
|
3277 | 3277 | |
3278 | 3278 | /** @var ?array */ |
3279 | - private static ?array $functionReplaceToLocale; |
|
3279 | + private static ? array $functionReplaceToLocale; |
|
3280 | 3280 | |
3281 | 3281 | /** |
3282 | 3282 | * @deprecated 1.30.0 use translateFormulaToLocale() instead |
@@ -3322,10 +3322,10 @@ discard block |
||
3322 | 3322 | } |
3323 | 3323 | |
3324 | 3324 | /** @var ?array */ |
3325 | - private static ?array $functionReplaceFromLocale; |
|
3325 | + private static ? array $functionReplaceFromLocale; |
|
3326 | 3326 | |
3327 | 3327 | /** @var ?array */ |
3328 | - private static ?array $functionReplaceToExcel; |
|
3328 | + private static ? array $functionReplaceToExcel; |
|
3329 | 3329 | |
3330 | 3330 | /** |
3331 | 3331 | * @deprecated 1.30.0 use translateFormulaToEnglish() instead |
@@ -3533,7 +3533,7 @@ discard block |
||
3533 | 3533 | * |
3534 | 3534 | * @param string $formula Formula to parse |
3535 | 3535 | */ |
3536 | - public function parseFormula(string $formula): array|bool |
|
3536 | + public function parseFormula(string $formula): array | bool |
|
3537 | 3537 | { |
3538 | 3538 | // Basic validation that this is indeed a formula |
3539 | 3539 | // We return an empty array if not |
@@ -3927,7 +3927,7 @@ discard block |
||
3927 | 3927 | /** |
3928 | 3928 | * @return false|string False indicates an error |
3929 | 3929 | */ |
3930 | - private function convertMatrixReferences(string $formula): false|string |
|
3930 | + private function convertMatrixReferences(string $formula): false | string |
|
3931 | 3931 | { |
3932 | 3932 | static $matrixReplaceFrom = [self::FORMULA_OPEN_MATRIX_BRACE, ';', self::FORMULA_CLOSE_MATRIX_BRACE]; |
3933 | 3933 | static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))']; |
@@ -4022,7 +4022,7 @@ discard block |
||
4022 | 4022 | /** |
4023 | 4023 | * @return array<int, mixed>|false |
4024 | 4024 | */ |
4025 | - private function internalParseFormula(string $formula, ?Cell $cell = null): bool|array |
|
4025 | + private function internalParseFormula(string $formula, ?Cell $cell = null): bool | array |
|
4026 | 4026 | { |
4027 | 4027 | if (($formula = $this->convertMatrixReferences(trim($formula))) === false) { |
4028 | 4028 | return false; |
@@ -5153,7 +5153,7 @@ discard block |
||
5153 | 5153 | return true; |
5154 | 5154 | } |
5155 | 5155 | |
5156 | - private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays): array |
|
5156 | + private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays): array |
|
5157 | 5157 | { |
5158 | 5158 | $result = []; |
5159 | 5159 | if (!is_array($operand2)) { |
@@ -5192,7 +5192,7 @@ discard block |
||
5192 | 5192 | return $result; |
5193 | 5193 | } |
5194 | 5194 | |
5195 | - private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool |
|
5195 | + private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays = false): array | bool |
|
5196 | 5196 | { |
5197 | 5197 | // If we're dealing with matrix operations, we want a matrix result |
5198 | 5198 | if ((is_array($operand1)) || (is_array($operand2))) { |
@@ -5209,7 +5209,7 @@ discard block |
||
5209 | 5209 | return $result; |
5210 | 5210 | } |
5211 | 5211 | |
5212 | - private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack): mixed |
|
5212 | + private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack): mixed |
|
5213 | 5213 | { |
5214 | 5214 | // Validate the two operands |
5215 | 5215 | if ( |
@@ -5414,7 +5414,7 @@ discard block |
||
5414 | 5414 | * |
5415 | 5415 | * @return array|string Array of values in range if range contains more than one element. Otherwise, a single value is returned. |
5416 | 5416 | */ |
5417 | - public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array |
|
5417 | + public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string | array |
|
5418 | 5418 | { |
5419 | 5419 | // Return value |
5420 | 5420 | $returnValue = []; |
@@ -5555,7 +5555,7 @@ discard block |
||
5555 | 5555 | /** |
5556 | 5556 | * Add cell reference if needed while making sure that it is the last argument. |
5557 | 5557 | */ |
5558 | - private function addCellReference(array $args, bool $passCellReference, array|string $functionCall, ?Cell $cell = null): array |
|
5558 | + private function addCellReference(array $args, bool $passCellReference, array | string $functionCall, ?Cell $cell = null): array |
|
5559 | 5559 | { |
5560 | 5560 | if ($passCellReference) { |
5561 | 5561 | if (is_array($functionCall)) { |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | abstract class MaxMinBase |
6 | 6 | { |
7 | - protected static function datatypeAdjustmentAllowStrings(int|float|string|bool $value): int|float |
|
7 | + protected static function datatypeAdjustmentAllowStrings(int | float | string | bool $value): int | float |
|
8 | 8 | { |
9 | 9 | if (is_bool($value)) { |
10 | 10 | return (int) $value; |
@@ -6,7 +6,7 @@ |
||
6 | 6 | |
7 | 7 | abstract class VarianceBase |
8 | 8 | { |
9 | - protected static function datatypeAdjustmentAllowStrings(int|float|string|bool $value): int|float |
|
9 | + protected static function datatypeAdjustmentAllowStrings(int | float | string | bool $value): int | float |
|
10 | 10 | { |
11 | 11 | if (is_bool($value)) { |
12 | 12 | return (int) $value; |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | * Formats a numeric value as a string for output in various output writers forcing |
330 | 330 | * point as decimal separator in case locale is other than English. |
331 | 331 | */ |
332 | - public static function formatNumber(float|int|string|null $numericValue): string |
|
332 | + public static function formatNumber(float | int | string | null $numericValue): string |
|
333 | 333 | { |
334 | 334 | if (is_float($numericValue)) { |
335 | 335 | return str_replace(',', '.', (string) $numericValue); |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | { |
385 | 385 | // characters |
386 | 386 | $chars = self::convertEncoding($textValue, 'UTF-16LE', 'UTF-8'); |
387 | - $ln = (int) (strlen($chars) / 2); // N.B. - strlen, not mb_strlen issue #642 |
|
387 | + $ln = (int) (strlen($chars) / 2); // N.B. - strlen, not mb_strlen issue #642 |
|
388 | 388 | |
389 | 389 | return pack('vC', $ln, 0x0001) . $chars; |
390 | 390 | } |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | * |
639 | 639 | * @return float|string string or only the leading numeric part of the string |
640 | 640 | */ |
641 | - public static function testStringAsNumeric(string $textValue): float|string |
|
641 | + public static function testStringAsNumeric(string $textValue): float | string |
|
642 | 642 | { |
643 | 643 | if (is_numeric($textValue)) { |
644 | 644 | return $textValue; |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | return ((float) $value) / self::PERCENTAGE_MULTIPLIER; |
179 | 179 | } |
180 | 180 | |
181 | - protected function setColorProperties(?string $color, null|float|int|string $alpha, ?string $colorType): array |
|
181 | + protected function setColorProperties(?string $color, null | float | int | string $alpha, ?string $colorType): array |
|
182 | 182 | { |
183 | 183 | return [ |
184 | 184 | 'type' => $colorType, |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | /** |
404 | 404 | * Get value of array element. |
405 | 405 | */ |
406 | - protected function getArrayElementsValue(array $properties, array|int|string $elements): mixed |
|
406 | + protected function getArrayElementsValue(array $properties, array | int | string $elements): mixed |
|
407 | 407 | { |
408 | 408 | $reference = &$properties; |
409 | 409 | if (!is_array($elements)) { |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | /** |
438 | 438 | * Get Glow Property. |
439 | 439 | */ |
440 | - public function getGlowProperty(array|string $property): null|array|float|int|string |
|
440 | + public function getGlowProperty(array | string $property): null | array | float | int | string |
|
441 | 441 | { |
442 | 442 | $retVal = null; |
443 | 443 | if ($property === 'size') { |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | /** |
459 | 459 | * Get Glow Color Property. |
460 | 460 | */ |
461 | - public function getGlowColor(string $propertyName): null|int|string |
|
461 | + public function getGlowColor(string $propertyName): null | int | string |
|
462 | 462 | { |
463 | 463 | return $this->glowColor->getColorProperty($propertyName); |
464 | 464 | } |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | /** |
523 | 523 | * Set Shadow Properties. |
524 | 524 | */ |
525 | - 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 |
|
525 | + 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 |
|
526 | 526 | { |
527 | 527 | $this->activateObject()->setShadowPresetsProperties((int) $presets); |
528 | 528 | if ($presets === 0) { |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | * |
606 | 606 | * @return $this |
607 | 607 | */ |
608 | - protected function setShadowAngle(null|float|int|string $angle) |
|
608 | + protected function setShadowAngle(null | float | int | string $angle) |
|
609 | 609 | { |
610 | 610 | if (is_numeric($angle)) { |
611 | 611 | $this->shadowProperties['direction'] = $angle; |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | * |
639 | 639 | * @param string|string[] $elements |
640 | 640 | */ |
641 | - public function getShadowProperty($elements): array|string|null |
|
641 | + public function getShadowProperty($elements): array | string | null |
|
642 | 642 | { |
643 | 643 | if ($elements === 'color') { |
644 | 644 | return [ |
@@ -718,7 +718,7 @@ discard block |
||
718 | 718 | /** |
719 | 719 | * Get Line Color Property. |
720 | 720 | */ |
721 | - public function getLineColorProperty(string $propertyName): null|int|string |
|
721 | + public function getLineColorProperty(string $propertyName): null | int | string |
|
722 | 722 | { |
723 | 723 | return $this->lineColor->getColorProperty($propertyName); |
724 | 724 | } |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | * Set Line Style Properties. |
728 | 728 | */ |
729 | 729 | public function setLineStyleProperties( |
730 | - null|float|int|string $lineWidth = null, |
|
730 | + null | float | int | string $lineWidth = null, |
|
731 | 731 | ?string $compoundType = '', |
732 | 732 | ?string $dashType = '', |
733 | 733 | ?string $capType = '', |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | /** |
824 | 824 | * Get Line Style Property. |
825 | 825 | */ |
826 | - public function getLineStyleProperty(array|string $elements): ?string |
|
826 | + public function getLineStyleProperty(array | string $elements): ?string |
|
827 | 827 | { |
828 | 828 | return $this->getArrayElementsValue($this->lineStyleProperties, $elements); |
829 | 829 | } |
@@ -113,8 +113,8 @@ discard block |
||
113 | 113 | * @param DataSeriesValues[] $plotValues |
114 | 114 | */ |
115 | 115 | public function __construct( |
116 | - null|string $plotType = null, |
|
117 | - null|string $plotGrouping = null, |
|
116 | + null | string $plotType = null, |
|
117 | + null | string $plotGrouping = null, |
|
118 | 118 | array $plotOrder = [], |
119 | 119 | array $plotLabel = [], |
120 | 120 | array $plotCategory = [], |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | * |
233 | 233 | * @return DataSeriesValues|false |
234 | 234 | */ |
235 | - public function getPlotLabelByIndex(int $index): bool|DataSeriesValues |
|
235 | + public function getPlotLabelByIndex(int $index): bool | DataSeriesValues |
|
236 | 236 | { |
237 | 237 | $keys = array_keys($this->plotLabel); |
238 | 238 | if (in_array($index, $keys)) { |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | * |
258 | 258 | * @return DataSeriesValues|false |
259 | 259 | */ |
260 | - public function getPlotCategoryByIndex(int $index): bool|DataSeriesValues |
|
260 | + public function getPlotCategoryByIndex(int $index): bool | DataSeriesValues |
|
261 | 261 | { |
262 | 262 | $keys = array_keys($this->plotCategory); |
263 | 263 | if (in_array($index, $keys)) { |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | * |
305 | 305 | * @return DataSeriesValues|false |
306 | 306 | */ |
307 | - public function getPlotValuesByIndex(int $index): bool|DataSeriesValues |
|
307 | + public function getPlotValuesByIndex(int $index): bool | DataSeriesValues |
|
308 | 308 | { |
309 | 309 | $keys = array_keys($this->plotValues); |
310 | 310 | if (in_array($index, $keys)) { |
@@ -51,12 +51,12 @@ discard block |
||
51 | 51 | /** |
52 | 52 | * The object to be returned by the reader. Modified during load. |
53 | 53 | */ |
54 | - private BSE|BstoreContainer|DgContainer|DggContainer|\PhpOffice\PhpSpreadsheet\Shared\Escher|SpContainer|SpgrContainer $object; |
|
54 | + private BSE | BstoreContainer | DgContainer | DggContainer | \PhpOffice\PhpSpreadsheet\Shared\Escher | SpContainer | SpgrContainer $object; |
|
55 | 55 | |
56 | 56 | /** |
57 | 57 | * Create a new Escher instance. |
58 | 58 | */ |
59 | - public function __construct(BSE|BstoreContainer|DgContainer|DggContainer|\PhpOffice\PhpSpreadsheet\Shared\Escher|SpContainer|SpgrContainer $object) |
|
59 | + public function __construct(BSE | BstoreContainer | DgContainer | DggContainer | \PhpOffice\PhpSpreadsheet\Shared\Escher | SpContainer | SpgrContainer $object) |
|
60 | 60 | { |
61 | 61 | $this->object = $object; |
62 | 62 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | /** |
86 | 86 | * Load Escher stream data. May be a partial Escher stream. |
87 | 87 | */ |
88 | - public function load(string $data): BSE|BstoreContainer|DgContainer|DggContainer|\PhpOffice\PhpSpreadsheet\Shared\Escher|SpContainer|SpgrContainer |
|
88 | + public function load(string $data): BSE | BstoreContainer | DgContainer | DggContainer | \PhpOffice\PhpSpreadsheet\Shared\Escher | SpContainer | SpgrContainer |
|
89 | 89 | { |
90 | 90 | $this->data = $data; |
91 | 91 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | /** |
18 | 18 | * The object we are writing. |
19 | 19 | */ |
20 | - private Blip|BSE|BstoreContainer|DgContainer|DggContainer|Escher|SpContainer|SpgrContainer|SharedEscher $object; |
|
20 | + private Blip | BSE | BstoreContainer | DgContainer | DggContainer | Escher | SpContainer | SpgrContainer | SharedEscher $object; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * The written binary data. |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | /** |
38 | 38 | * Constructor. |
39 | 39 | */ |
40 | - public function __construct(Blip|BSE|BstoreContainer|DgContainer|DggContainer|self|SpContainer|SpgrContainer|SharedEscher $object) |
|
40 | + public function __construct(Blip | BSE | BstoreContainer | DgContainer | DggContainer | self | SpContainer | SpgrContainer | SharedEscher $object) |
|
41 | 41 | { |
42 | 42 | $this->object = $object; |
43 | 43 | } |