@@ -41,7 +41,7 @@ |
||
41 | 41 | * |
42 | 42 | * @return array|string An array containing a cell or range of cells, or a string on error |
43 | 43 | */ |
44 | - public static function OFFSET(?string $cellAddress = null, mixed $rows = 0, mixed $columns = 0, mixed $height = null, mixed $width = null, ?Cell $cell = null): string|array |
|
44 | + public static function OFFSET(?string $cellAddress = null, mixed $rows = 0, mixed $columns = 0, mixed $height = null, mixed $width = null, ?Cell $cell = null): string | array |
|
45 | 45 | { |
46 | 46 | $rows = Functions::flattenSingleValue($rows); |
47 | 47 | $columns = Functions::flattenSingleValue($columns); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * |
18 | 18 | * @return bool TRUE if the year is a leap year, otherwise FALSE |
19 | 19 | */ |
20 | - public static function isLeapYear(int|string $year): bool |
|
20 | + public static function isLeapYear(int | string $year): bool |
|
21 | 21 | { |
22 | 22 | return (($year % 4) === 0) && (($year % 100) !== 0) || (($year % 400) === 0); |
23 | 23 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | /** |
126 | 126 | * Return result in one of three formats. |
127 | 127 | */ |
128 | - public static function returnIn3FormatsArray(array $dateArray, bool $noFrac = false): DateTime|float|int |
|
128 | + public static function returnIn3FormatsArray(array $dateArray, bool $noFrac = false): DateTime | float | int |
|
129 | 129 | { |
130 | 130 | $retType = Functions::getReturnDateType(); |
131 | 131 | if ($retType === Functions::RETURNDATE_PHP_DATETIME_OBJECT) { |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | /** |
159 | 159 | * Return result in one of three formats. |
160 | 160 | */ |
161 | - public static function returnIn3FormatsFloat(float $excelDateValue): float|int|DateTime |
|
161 | + public static function returnIn3FormatsFloat(float $excelDateValue): float | int | DateTime |
|
162 | 162 | { |
163 | 163 | $retType = Functions::getReturnDateType(); |
164 | 164 | if ($retType === Functions::RETURNDATE_EXCEL) { |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | /** |
176 | 176 | * Return result in one of three formats. |
177 | 177 | */ |
178 | - public static function returnIn3FormatsObject(DateTime $PHPDateObject): DateTime|float|int |
|
178 | + public static function returnIn3FormatsObject(DateTime $PHPDateObject): DateTime | float | int |
|
179 | 179 | { |
180 | 180 | $retType = Functions::getReturnDateType(); |
181 | 181 | if ($retType === Functions::RETURNDATE_PHP_DATETIME_OBJECT) { |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | /** |
221 | 221 | * Many functions accept null argument treated as 0. |
222 | 222 | */ |
223 | - public static function validateNumericNull(mixed $number): int|float |
|
223 | + public static function validateNumericNull(mixed $number): int | float |
|
224 | 224 | { |
225 | 225 | $number = Functions::flattenSingleValue($number); |
226 | 226 | if ($number === null) { |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | * |
276 | 276 | * @param array|false $dateArray |
277 | 277 | */ |
278 | - private static function forceArray(array|bool $dateArray): array |
|
278 | + private static function forceArray(array | bool $dateArray): array |
|
279 | 279 | { |
280 | 280 | return is_array($dateArray) ? $dateArray : ['error_count' => 1]; |
281 | 281 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * If an array of values is passed for the $startDate or $endDays,arguments, then the returned result |
32 | 32 | * will also be an array with matching dimensions |
33 | 33 | */ |
34 | - public static function between(array|DateTimeInterface|float|int|string $endDate, array|DateTimeInterface|float|int|string $startDate): array|int|string |
|
34 | + public static function between(array | DateTimeInterface | float | int | string $endDate, array | DateTimeInterface | float | int | string $startDate): array | int | string |
|
35 | 35 | { |
36 | 36 | if (is_array($endDate) || is_array($startDate)) { |
37 | 37 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $endDate, $startDate); |
@@ -44,7 +44,7 @@ |
||
44 | 44 | * If an array of values is passed for the $startDate or $endDays,arguments, then the returned result |
45 | 45 | * will also be an array with matching dimensions |
46 | 46 | */ |
47 | - public static function between(mixed $startDate = 0, mixed $endDate = 0, mixed $method = false): array|string|int |
|
47 | + public static function between(mixed $startDate = 0, mixed $endDate = 0, mixed $method = false): array | string | int |
|
48 | 48 | { |
49 | 49 | if (is_array($startDate) || is_array($endDate) || is_array($method)) { |
50 | 50 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $startDate, $endDate, $method); |
@@ -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): mixed |
|
81 | + public static function lastDay(mixed $dateValue, array | float | int | bool | string $adjustmentMonths): mixed |
|
82 | 82 | { |
83 | 83 | if (is_array($dateValue) || is_array($adjustmentMonths)) { |
84 | 84 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $dateValue, $adjustmentMonths); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | * If an array of numbers is passed as the argument, then the returned result will also be an array |
40 | 40 | * with the same dimensions |
41 | 41 | */ |
42 | - public static function fromString(null|array|string|int|bool $dateValue): mixed |
|
42 | + public static function fromString(null | array | string | int | bool $dateValue): mixed |
|
43 | 43 | { |
44 | 44 | if (is_array($dateValue)) { |
45 | 45 | return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue); |
@@ -43,7 +43,7 @@ |
||
43 | 43 | * If an array of numbers is passed as the argument, then the returned result will also be an array |
44 | 44 | * with the same dimensions |
45 | 45 | */ |
46 | - public static function fromHMS(array|int|float|bool|null|string $hour, array|int|float|bool|null|string $minute, array|int|float|bool|null|string $second): array|string|float|int|DateTime |
|
46 | + public static function fromHMS(array | int | float | bool | null | string $hour, array | int | float | bool | null | string $minute, array | int | float | bool | null | string $second): array | string | float | int | DateTime |
|
47 | 47 | { |
48 | 48 | if (is_array($hour) || is_array($minute) || is_array($second)) { |
49 | 49 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $hour, $minute, $second); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * If an array of values is passed for the $startDate or $endDays,arguments, then the returned result |
37 | 37 | * will also be an array with matching dimensions |
38 | 38 | */ |
39 | - public static function date(mixed $startDate, array|int|string $endDays, mixed ...$dateArgs): mixed |
|
39 | + public static function date(mixed $startDate, array | int | string $endDays, mixed ...$dateArgs): mixed |
|
40 | 40 | { |
41 | 41 | if (is_array($startDate) || is_array($endDays)) { |
42 | 42 | return self::evaluateArrayArgumentsSubset( |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | /** |
74 | 74 | * Use incrementing logic to determine Workday. |
75 | 75 | */ |
76 | - private static function incrementing(float $startDate, int $endDays, array $holidayArray): float|int|DateTime |
|
76 | + private static function incrementing(float $startDate, int $endDays, array $holidayArray): float | int | DateTime |
|
77 | 77 | { |
78 | 78 | // Adjust the start date if it falls over a weekend |
79 | 79 | $startDoW = self::getWeekDay($startDate, 3); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | /** |
133 | 133 | * Use decrementing logic to determine Workday. |
134 | 134 | */ |
135 | - private static function decrementing(float $startDate, int $endDays, array $holidayArray): float|int|DateTime |
|
135 | + private static function decrementing(float $startDate, int $endDays, array $holidayArray): float | int | DateTime |
|
136 | 136 | { |
137 | 137 | // Adjust the start date if it falls over a weekend |
138 | 138 | $startDoW = self::getWeekDay($startDate, 3); |
@@ -43,7 +43,7 @@ |
||
43 | 43 | * If an array of values is passed for the $startDate or $endDays,arguments, then the returned result |
44 | 44 | * will also be an array with matching dimensions |
45 | 45 | */ |
46 | - public static function fraction(mixed $startDate, mixed $endDate, array|int|string|null $method = 0): array|string|int|float |
|
46 | + public static function fraction(mixed $startDate, mixed $endDate, array | int | string | null $method = 0): array | string | int | float |
|
47 | 47 | { |
48 | 48 | if (is_array($startDate) || is_array($endDate) || is_array($method)) { |
49 | 49 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $startDate, $endDate, $method); |