@@ -213,7 +213,7 @@ |
||
213 | 213 | self::assertEqualsWithDelta($expectedResult, $sheet->getCell('Z99')->getCalculatedValue(), 1.0e-8, 'arguments supplied as ranges'); |
214 | 214 | } |
215 | 215 | |
216 | - private function convertToString(null|bool|float|int|string|Stringable $arg): string |
|
216 | + private function convertToString(null | bool | float | int | string | Stringable $arg): string |
|
217 | 217 | { |
218 | 218 | if (is_string($arg)) { |
219 | 219 | return '"' . $arg . '"'; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * If an array of numbers is passed as an argument, then the returned result will also be an array |
30 | 30 | * with the same dimensions |
31 | 31 | */ |
32 | - public static function DELTA(array|float|bool|string|int $a, array|float|bool|string|int $b = 0.0): array|string|int |
|
32 | + public static function DELTA(array | float | bool | string | int $a, array | float | bool | string | int $b = 0.0): array | string | int |
|
33 | 33 | { |
34 | 34 | if (is_array($a) || is_array($b)) { |
35 | 35 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $a, $b); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | * If an array of numbers is passed as an argument, then the returned result will also be an array |
65 | 65 | * with the same dimensions |
66 | 66 | */ |
67 | - public static function GESTEP(array|float|bool|string|int $number, $step = 0.0): array|string|int |
|
67 | + public static function GESTEP(array | float | bool | string | int $number, $step = 0.0): array | string | int |
|
68 | 68 | { |
69 | 69 | if (is_array($number) || is_array($step)) { |
70 | 70 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $step); |
@@ -329,12 +329,12 @@ discard block |
||
329 | 329 | /** |
330 | 330 | * Pad amount for exact in pixels; use best guess if null. |
331 | 331 | */ |
332 | - private static null|float|int $paddingAmountExact = null; |
|
332 | + private static null | float | int $paddingAmountExact = null; |
|
333 | 333 | |
334 | 334 | /** |
335 | 335 | * Set pad amount for exact in pixels; use best guess if null. |
336 | 336 | */ |
337 | - public static function setPaddingAmountExact(null|float|int $paddingAmountExact): void |
|
337 | + public static function setPaddingAmountExact(null | float | int $paddingAmountExact): void |
|
338 | 338 | { |
339 | 339 | self::$paddingAmountExact = $paddingAmountExact; |
340 | 340 | } |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | /** |
343 | 343 | * Get pad amount for exact in pixels; or null if using best guess. |
344 | 344 | */ |
345 | - public static function getPaddingAmountExact(): null|float|int |
|
345 | + public static function getPaddingAmountExact(): null | float | int |
|
346 | 346 | { |
347 | 347 | return self::$paddingAmountExact; |
348 | 348 | } |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | * |
504 | 504 | * @return int Font size (in pixels) |
505 | 505 | */ |
506 | - public static function fontSizeToPixels(float|int $fontSizeInPoints): int |
|
506 | + public static function fontSizeToPixels(float | int $fontSizeInPoints): int |
|
507 | 507 | { |
508 | 508 | return (int) ((4 / 3) * $fontSizeInPoints); |
509 | 509 | } |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | * |
516 | 516 | * @return float|int Size (in pixels) |
517 | 517 | */ |
518 | - public static function inchSizeToPixels(int|float $sizeInInch): int|float |
|
518 | + public static function inchSizeToPixels(int | float $sizeInInch): int | float |
|
519 | 519 | { |
520 | 520 | return $sizeInInch * 96; |
521 | 521 | } |
@@ -527,7 +527,7 @@ discard block |
||
527 | 527 | * |
528 | 528 | * @return float Size (in pixels) |
529 | 529 | */ |
530 | - public static function centimeterSizeToPixels(int|float $sizeInCm): float |
|
530 | + public static function centimeterSizeToPixels(int | float $sizeInCm): float |
|
531 | 531 | { |
532 | 532 | return $sizeInCm * 37.795275591; |
533 | 533 | } |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | * |
629 | 629 | * @return ($returnAsPixels is true ? int : float) Column width |
630 | 630 | */ |
631 | - public static function getDefaultColumnWidthByFont(FontStyle $font, bool $returnAsPixels = false): float|int |
|
631 | + public static function getDefaultColumnWidthByFont(FontStyle $font, bool $returnAsPixels = false): float | int |
|
632 | 632 | { |
633 | 633 | if (isset(self::DEFAULT_COLUMN_WIDTHS[$font->getName()][$font->getSize()])) { |
634 | 634 | // Exact width can be determined |
@@ -6,11 +6,11 @@ discard block |
||
6 | 6 | { |
7 | 7 | private string $type; |
8 | 8 | |
9 | - private null|float|int|string $value; |
|
9 | + private null | float | int | string $value; |
|
10 | 10 | |
11 | 11 | private ?string $cellFormula; |
12 | 12 | |
13 | - public function __construct(string $type, null|float|int|string $value = null, ?string $cellFormula = null) |
|
13 | + public function __construct(string $type, null | float | int | string $value = null, ?string $cellFormula = null) |
|
14 | 14 | { |
15 | 15 | $this->type = $type; |
16 | 16 | $this->value = $value; |
@@ -29,12 +29,12 @@ discard block |
||
29 | 29 | return $this; |
30 | 30 | } |
31 | 31 | |
32 | - public function getValue(): null|float|int|string |
|
32 | + public function getValue(): null | float | int | string |
|
33 | 33 | { |
34 | 34 | return $this->value; |
35 | 35 | } |
36 | 36 | |
37 | - public function setValue(null|float|int|string $value): self |
|
37 | + public function setValue(null | float | int | string $value): self |
|
38 | 38 | { |
39 | 39 | $this->value = $value; |
40 | 40 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @return DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object, |
26 | 26 | * depending on the value of the ReturnDateType flag |
27 | 27 | */ |
28 | - public static function today(): DateTime|float|int|string |
|
28 | + public static function today(): DateTime | float | int | string |
|
29 | 29 | { |
30 | 30 | $dti = new DateTimeImmutable(); |
31 | 31 | $dateArray = Helpers::dateParse($dti->format('c')); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * @return DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object, |
51 | 51 | * depending on the value of the ReturnDateType flag |
52 | 52 | */ |
53 | - public static function now(): DateTime|float|int|string |
|
53 | + public static function now(): DateTime | float | int | string |
|
54 | 54 | { |
55 | 55 | $dti = new DateTimeImmutable(); |
56 | 56 | $dateArray = Helpers::dateParse($dti->format('c')); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | * If an array of values is passed as the argument, then the returned result will also be an array |
35 | 35 | * with the same dimensions |
36 | 36 | */ |
37 | - public static function adjust(mixed $dateValue, array|string|bool|float|int $adjustmentMonths): DateTime|float|int|string|array |
|
37 | + public static function adjust(mixed $dateValue, array | string | bool | float | int $adjustmentMonths): DateTime | float | int | string | array |
|
38 | 38 | { |
39 | 39 | if (is_array($dateValue) || is_array($adjustmentMonths)) { |
40 | 40 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $dateValue, $adjustmentMonths); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | * If an array of values is passed as the argument, then the returned result will also be an array |
79 | 79 | * with the same dimensions |
80 | 80 | */ |
81 | - public static function lastDay(mixed $dateValue, array|float|int|bool|string $adjustmentMonths): array|string|DateTime|float|int |
|
81 | + public static function lastDay(mixed $dateValue, array | float | int | bool | string $adjustmentMonths): array | string | DateTime | float | int |
|
82 | 82 | { |
83 | 83 | if (is_array($dateValue) || is_array($adjustmentMonths)) { |
84 | 84 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $dateValue, $adjustmentMonths); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * If an array of numbers is passed as the argument, then the returned result will also be an array |
41 | 41 | * with the same dimensions |
42 | 42 | */ |
43 | - public static function fromString(null|array|string|int|bool|float $dateValue): array|string|float|int|DateTime |
|
43 | + public static function fromString(null | array | string | int | bool | float $dateValue): array | string | float | int | DateTime |
|
44 | 44 | { |
45 | 45 | if (is_array($dateValue)) { |
46 | 46 | return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | * @return DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object, |
136 | 136 | * depending on the value of the ReturnDateType flag |
137 | 137 | */ |
138 | - private static function finalResults(array $PHPDateArray, DateTimeImmutable $dti, int $baseYear): string|float|int|DateTime |
|
138 | + private static function finalResults(array $PHPDateArray, DateTimeImmutable $dti, int $baseYear): string | float | int | DateTime |
|
139 | 139 | { |
140 | 140 | $retValue = ExcelError::Value(); |
141 | 141 | if (Helpers::dateParseSucceeded($PHPDateArray)) { |
@@ -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; |