@@ -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 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * If this is a height, then size is measured in pixels () |
49 | 49 | * or in points () if $unit is null. |
50 | 50 | */ |
51 | - protected float|int $size; |
|
51 | + protected float | int $size; |
|
52 | 52 | |
53 | 53 | protected ?string $unit = null; |
54 | 54 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * Phpstan bug has been fixed; this function allows us to |
57 | 57 | * pass Phpstan whether fixed or not. |
58 | 58 | */ |
59 | - private static function stanBugFixed(array|int|null $value): array |
|
59 | + private static function stanBugFixed(array | int | null $value): array |
|
60 | 60 | { |
61 | 61 | return is_array($value) ? $value : [null, null]; |
62 | 62 | } |
@@ -34,14 +34,14 @@ |
||
34 | 34 | * @phpstan-assert int|numeric-string $columnId |
35 | 35 | * @phpstan-assert int|numeric-string $rowId |
36 | 36 | */ |
37 | - private static function validateColumnAndRow(int|string $columnId, int|string $rowId): void |
|
37 | + private static function validateColumnAndRow(int | string $columnId, int | string $rowId): void |
|
38 | 38 | { |
39 | 39 | if (!is_numeric($columnId) || $columnId <= 0 || !is_numeric($rowId) || $rowId <= 0) { |
40 | 40 | throw new Exception('Row and Column Ids must be positive integer values'); |
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | - public static function fromColumnAndRow(int|string $columnId, int|string $rowId, ?Worksheet $worksheet = null): self |
|
44 | + public static function fromColumnAndRow(int | string $columnId, int | string $rowId, ?Worksheet $worksheet = null): self |
|
45 | 45 | { |
46 | 46 | self::validateColumnAndRow($columnId, $rowId); |
47 | 47 |