@@ -21,7 +21,7 @@ |
||
21 | 21 | } |
22 | 22 | |
23 | 23 | #[DataProvider('providerANDLiteral')] |
24 | - public function testANDLiteral(bool|string $expectedResult, float|int|string $formula): void |
|
24 | + public function testANDLiteral(bool | string $expectedResult, float | int | string $formula): void |
|
25 | 25 | { |
26 | 26 | $sheet = $this->getSheet(); |
27 | 27 | $sheet->getCell('A1')->setValue("=AND($formula)"); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * All other dates must be later than this date, but they may occur in any order |
31 | 31 | * @param mixed $guess An optional guess at the expected answer |
32 | 32 | */ |
33 | - public static function rate(mixed $values, mixed $dates, mixed $guess = self::DEFAULT_GUESS): float|string |
|
33 | + public static function rate(mixed $values, mixed $dates, mixed $guess = self::DEFAULT_GUESS): float | string |
|
34 | 34 | { |
35 | 35 | $rslt = self::xirrPart1($values, $dates); |
36 | 36 | if ($rslt !== '') { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * The first payment date indicates the beginning of the schedule of payments. |
118 | 118 | * All other dates must be later than this date, but they may occur in any order. |
119 | 119 | */ |
120 | - public static function presentValue(mixed $rate, mixed $values, mixed $dates): float|string |
|
120 | + public static function presentValue(mixed $rate, mixed $values, mixed $dates): float | string |
|
121 | 121 | { |
122 | 122 | return self::xnpvOrdered($rate, $values, $dates, true); |
123 | 123 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | return ''; |
175 | 175 | } |
176 | 176 | |
177 | - private static function xirrPart3(array $values, array $dates, float $x1, float $x2): float|string |
|
177 | + private static function xirrPart3(array $values, array $dates, float $x1, float $x2): float | string |
|
178 | 178 | { |
179 | 179 | $f = self::xnpvOrdered($x1, $values, $dates, false); |
180 | 180 | if ($f < 0.0) { |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | return $rslt; |
204 | 204 | } |
205 | 205 | |
206 | - private static function xirrBisection(array $values, array $dates, float $x1, float $x2): string|float |
|
206 | + private static function xirrBisection(array $values, array $dates, float $x1, float $x2): string | float |
|
207 | 207 | { |
208 | 208 | $rslt = ExcelError::NAN(); |
209 | 209 | for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) { |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | } |
241 | 241 | |
242 | 242 | /** @param array<int,float|int|numeric-string> $values> */ |
243 | - private static function xnpvOrdered(mixed $rate, mixed $values, mixed $dates, bool $ordered = true, bool $capAtNegative1 = false): float|string |
|
243 | + private static function xnpvOrdered(mixed $rate, mixed $values, mixed $dates, bool $ordered = true, bool $capAtNegative1 = false): float | string |
|
244 | 244 | { |
245 | 245 | $rate = Functions::flattenSingleValue($rate); |
246 | 246 | $values = Functions::flattenArray($values); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * @param mixed $principal the present value |
21 | 21 | * @param float[] $schedule an array of interest rates to apply |
22 | 22 | */ |
23 | - public static function futureValue(mixed $principal, array $schedule): string|float |
|
23 | + public static function futureValue(mixed $principal, array $schedule): string | float |
|
24 | 24 | { |
25 | 25 | $principal = Functions::flattenSingleValue($principal); |
26 | 26 | $schedule = Functions::flattenArray($schedule); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * |
51 | 51 | * @return float|string Result, or a string containing an error |
52 | 52 | */ |
53 | - public static function periods(mixed $rate, mixed $presentValue, mixed $futureValue): string|float |
|
53 | + public static function periods(mixed $rate, mixed $presentValue, mixed $futureValue): string | float |
|
54 | 54 | { |
55 | 55 | $rate = Functions::flattenSingleValue($rate); |
56 | 56 | $presentValue = Functions::flattenSingleValue($presentValue); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * |
84 | 84 | * @return float|string Result, or a string containing an error |
85 | 85 | */ |
86 | - public static function interestRate(mixed $periods = 0.0, mixed $presentValue = 0.0, mixed $futureValue = 0.0): string|float |
|
86 | + public static function interestRate(mixed $periods = 0.0, mixed $presentValue = 0.0, mixed $futureValue = 0.0): string | float |
|
87 | 87 | { |
88 | 88 | $periods = Functions::flattenSingleValue($periods); |
89 | 89 | $presentValue = Functions::flattenSingleValue($presentValue); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | #[\PHPUnit\Framework\Attributes\DataProvider('providerDateTimeExcelToTimestamp1900')] |
55 | - public function testDateTimeExcelToTimestamp1900(float|int $expectedResult, float|int $excelDateTimeValue): void |
|
55 | + public function testDateTimeExcelToTimestamp1900(float | int $expectedResult, float | int $excelDateTimeValue): void |
|
56 | 56 | { |
57 | 57 | if ($expectedResult > PHP_INT_MAX || $expectedResult < PHP_INT_MIN) { |
58 | 58 | self::markTestSkipped('Test invalid on 32-bit system.'); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | #[\PHPUnit\Framework\Attributes\DataProvider('providerDateTimeTimestampToExcel1900')] |
72 | - public function testDateTimeTimestampToExcel1900(float|int $expectedResult, float|int|string $unixTimestamp): void |
|
72 | + public function testDateTimeTimestampToExcel1900(float | int $expectedResult, float | int | string $unixTimestamp): void |
|
73 | 73 | { |
74 | 74 | Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); |
75 | 75 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | #[\PHPUnit\Framework\Attributes\DataProvider('providerDateTimeDateTimeToExcel')] |
86 | - public function testDateTimeDateTimeToExcel(float|int $expectedResult, DateTimeInterface $dateTimeObject): void |
|
86 | + public function testDateTimeDateTimeToExcel(float | int $expectedResult, DateTimeInterface $dateTimeObject): void |
|
87 | 87 | { |
88 | 88 | Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); |
89 | 89 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | } |
115 | 115 | |
116 | 116 | #[\PHPUnit\Framework\Attributes\DataProvider('providerDateTimeExcelToTimestamp1904')] |
117 | - public function testDateTimeExcelToTimestamp1904(float|int $expectedResult, float|int $excelDateTimeValue): void |
|
117 | + public function testDateTimeExcelToTimestamp1904(float | int $expectedResult, float | int $excelDateTimeValue): void |
|
118 | 118 | { |
119 | 119 | if ($expectedResult > PHP_INT_MAX || $expectedResult < PHP_INT_MIN) { |
120 | 120 | self::markTestSkipped('Test invalid on 32-bit system.'); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | #[\PHPUnit\Framework\Attributes\DataProvider('providerDateTimeTimestampToExcel1904')] |
134 | - public function testDateTimeTimestampToExcel1904(mixed $expectedResult, float|int|string $unixTimestamp): void |
|
134 | + public function testDateTimeTimestampToExcel1904(mixed $expectedResult, float | int | string $unixTimestamp): void |
|
135 | 135 | { |
136 | 136 | Date::setExcelCalendar(Date::CALENDAR_MAC_1904); |
137 | 137 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } |
158 | 158 | |
159 | 159 | #[\PHPUnit\Framework\Attributes\DataProvider('providerDateTimeExcelToTimestamp1900Timezone')] |
160 | - public function testDateTimeExcelToTimestamp1900Timezone(float|int $expectedResult, float|int $excelDateTimeValue, string $timezone): void |
|
160 | + public function testDateTimeExcelToTimestamp1900Timezone(float | int $expectedResult, float | int $excelDateTimeValue, string $timezone): void |
|
161 | 161 | { |
162 | 162 | if ($expectedResult > PHP_INT_MAX || $expectedResult < PHP_INT_MIN) { |
163 | 163 | self::markTestSkipped('Test invalid on 32-bit system.'); |