@@ -32,7 +32,7 @@ |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | #[DataProvider('providerTIMEVALUE')] |
35 | - public function testDirectCallToTIMEVALUE(int|float|string $expectedResult, bool|int|string $value): void |
|
35 | + public function testDirectCallToTIMEVALUE(int | float | string $expectedResult, bool | int | string $value): void |
|
36 | 36 | { |
37 | 37 | $result = TimeValue::fromString($value); |
38 | 38 | self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | #[DataProvider('providerWEEKDAY')] |
34 | - public function testDirectCallToWEEKDAY(int|string $expectedResult, bool|int|string $dateValue, null|int|string $style = null): void |
|
34 | + public function testDirectCallToWEEKDAY(int | string $expectedResult, bool | int | string $dateValue, null | int | string $style = null): void |
|
35 | 35 | { |
36 | 36 | $result = ($style === null) ? Week::day($dateValue) : Week::day($dateValue, $style); |
37 | 37 | self::assertSame($expectedResult, $result); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | class DaysTest extends TestCase |
18 | 18 | { |
19 | 19 | #[DataProvider('providerDAYS')] |
20 | - public function testDirectCallToDAYS(int|string $expectedResult, int|string $date1, int|string $date2): void |
|
20 | + public function testDirectCallToDAYS(int | string $expectedResult, int | string $date1, int | string $date2): void |
|
21 | 21 | { |
22 | 22 | $result = Days::between($date1, $date2); |
23 | 23 | self::assertSame($expectedResult, $result); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | /** @param array<mixed>|int|string $expectedResult */ |
21 | 21 | #[DataProvider('providerDATEDIF')] |
22 | - public function testDirectCallToDATEDIF(array|int|string $expectedResult, string ...$args): void |
|
22 | + public function testDirectCallToDATEDIF(array | int | string $expectedResult, string ...$args): void |
|
23 | 23 | { |
24 | 24 | $result = Difference::interval(...$args); |
25 | 25 | self::assertSame($expectedResult, $result); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | /** @param array<mixed>|string $functionCall */ |
29 | 29 | #[DataProvider('providerGetFunctions')] |
30 | - public function testGetFunctions(array|string $functionCall): void |
|
30 | + public function testGetFunctions(array | string $functionCall): void |
|
31 | 31 | { |
32 | 32 | self::assertIsCallable($functionCall); |
33 | 33 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | /** @return array<mixed>|string */ |
43 | - public static function anchorArray(string $cellReference, Cell $cell): array|string |
|
43 | + public static function anchorArray(string $cellReference, Cell $cell): array | string |
|
44 | 44 | { |
45 | 45 | //$coordinate = $cell->getCoordinate(); |
46 | 46 | $worksheet = $cell->getWorksheet(); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * @param mixed $yValues array of mixed Data Series Y |
77 | 77 | * @param null|mixed $xValues array of mixed Data Series X |
78 | 78 | */ |
79 | - public static function CORREL(mixed $yValues, $xValues = null): float|string |
|
79 | + public static function CORREL(mixed $yValues, $xValues = null): float | string |
|
80 | 80 | { |
81 | 81 | if (($xValues === null) || (!is_array($yValues)) || (!is_array($xValues))) { |
82 | 82 | return ExcelError::VALUE(); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | * @param mixed[] $yValues array of mixed Data Series Y |
103 | 103 | * @param mixed[] $xValues array of mixed Data Series X |
104 | 104 | */ |
105 | - public static function COVAR(array $yValues, array $xValues): float|string |
|
105 | + public static function COVAR(array $yValues, array $xValues): float | string |
|
106 | 106 | { |
107 | 107 | try { |
108 | 108 | self::checkTrendArrays($yValues, $xValues); |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | * @param mixed[] $yValues Data Series Y |
191 | 191 | * @param mixed[] $xValues Data Series X |
192 | 192 | */ |
193 | - public static function INTERCEPT(array $yValues, array $xValues): float|string |
|
193 | + public static function INTERCEPT(array $yValues, array $xValues): float | string |
|
194 | 194 | { |
195 | 195 | try { |
196 | 196 | self::checkTrendArrays($yValues, $xValues); |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | * |
218 | 218 | * @return array<mixed>|string The result, or a string containing an error |
219 | 219 | */ |
220 | - public static function LINEST(array $yValues, ?array $xValues = null, mixed $const = true, mixed $stats = false): string|array |
|
220 | + public static function LINEST(array $yValues, ?array $xValues = null, mixed $const = true, mixed $stats = false): string | array |
|
221 | 221 | { |
222 | 222 | $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const); |
223 | 223 | $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats); |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | * |
279 | 279 | * @return array<mixed>|string The result, or a string containing an error |
280 | 280 | */ |
281 | - public static function LOGEST(array $yValues, ?array $xValues = null, mixed $const = true, mixed $stats = false): string|array |
|
281 | + public static function LOGEST(array $yValues, ?array $xValues = null, mixed $const = true, mixed $stats = false): string | array |
|
282 | 282 | { |
283 | 283 | $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const); |
284 | 284 | $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats); |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | * @param mixed[] $yValues Data Series Y |
390 | 390 | * @param mixed[] $xValues Data Series X |
391 | 391 | */ |
392 | - public static function STEYX(array $yValues, array $xValues): float|string |
|
392 | + public static function STEYX(array $yValues, array $xValues): float | string |
|
393 | 393 | { |
394 | 394 | try { |
395 | 395 | self::checkTrendArrays($yValues, $xValues); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * calculate the internal rate of return. |
30 | 30 | * @param mixed $guess A number that you guess is close to the result of IRR |
31 | 31 | */ |
32 | - public static function rate(mixed $values, mixed $guess = 0.1): string|float |
|
32 | + public static function rate(mixed $values, mixed $guess = 0.1): string | float |
|
33 | 33 | { |
34 | 34 | if (!is_array($values)) { |
35 | 35 | return ExcelError::VALUE(); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | * |
101 | 101 | * @return float|string Result, or a string containing an error |
102 | 102 | */ |
103 | - public static function modifiedRate(mixed $values, mixed $financeRate, mixed $reinvestmentRate): string|float |
|
103 | + public static function modifiedRate(mixed $values, mixed $financeRate, mixed $reinvestmentRate): string | float |
|
104 | 104 | { |
105 | 105 | if (!is_array($values)) { |
106 | 106 | return ExcelError::DIV0(); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | * |
143 | 143 | * @param array<mixed> $args |
144 | 144 | */ |
145 | - public static function presentValue(mixed $rate, ...$args): int|float |
|
145 | + public static function presentValue(mixed $rate, ...$args): int | float |
|
146 | 146 | { |
147 | 147 | $returnValue = 0; |
148 | 148 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * All other dates must be later than this date, but they may occur in any order |
32 | 32 | * @param mixed $guess An optional guess at the expected answer |
33 | 33 | */ |
34 | - public static function rate(mixed $values, $dates, mixed $guess = self::DEFAULT_GUESS): float|string |
|
34 | + public static function rate(mixed $values, $dates, mixed $guess = self::DEFAULT_GUESS): float | string |
|
35 | 35 | { |
36 | 36 | $rslt = self::xirrPart1($values, $dates); |
37 | 37 | /** @var array<int, float|int|numeric-string> $dates */ |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | * The first payment date indicates the beginning of the schedule of payments. |
121 | 121 | * All other dates must be later than this date, but they may occur in any order. |
122 | 122 | */ |
123 | - public static function presentValue(mixed $rate, mixed $values, mixed $dates): float|string |
|
123 | + public static function presentValue(mixed $rate, mixed $values, mixed $dates): float | string |
|
124 | 124 | { |
125 | 125 | return self::xnpvOrdered($rate, $values, $dates, true); |
126 | 126 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | * @param array<int, float|int|numeric-string> $values |
186 | 186 | * @param array<int, float|int|numeric-string> $dates |
187 | 187 | */ |
188 | - private static function xirrPart3(array $values, array $dates, float $x1, float $x2): float|string |
|
188 | + private static function xirrPart3(array $values, array $dates, float $x1, float $x2): float | string |
|
189 | 189 | { |
190 | 190 | $f = self::xnpvOrdered($x1, $values, $dates, false); |
191 | 191 | if ($f < 0.0) { |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | * @param array<int, float|int|numeric-string> $values |
219 | 219 | * @param array<int, float|int|numeric-string> $dates |
220 | 220 | */ |
221 | - private static function xirrBisection(array $values, array $dates, float $x1, float $x2): string|float |
|
221 | + private static function xirrBisection(array $values, array $dates, float $x1, float $x2): string | float |
|
222 | 222 | { |
223 | 223 | $rslt = ExcelError::NAN(); |
224 | 224 | for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) { |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | } |
256 | 256 | |
257 | 257 | /** @param array<int,float|int|numeric-string> $values> */ |
258 | - private static function xnpvOrdered(mixed $rate, mixed $values, mixed $dates, bool $ordered = true, bool $capAtNegative1 = false): float|string |
|
258 | + private static function xnpvOrdered(mixed $rate, mixed $values, mixed $dates, bool $ordered = true, bool $capAtNegative1 = false): float | string |
|
259 | 259 | { |
260 | 260 | $rate = Functions::flattenSingleValue($rate); |
261 | 261 | if (!is_numeric($rate)) { |