@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | #[DataProvider('providerOCT2DEC')] |
32 | - public function testDirectCallToOCT2DEC(mixed $expectedResult, bool|string $value): void |
|
32 | + public function testDirectCallToOCT2DEC(mixed $expectedResult, bool | string $value): void |
|
33 | 33 | { |
34 | 34 | $result = ConvertOctal::toDecimal($value); |
35 | 35 | self::assertSame($expectedResult, $result); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | #[DataProvider('providerOCT2DECOds')] |
101 | - public function testOCT2DECOds(mixed $expectedResult, bool|string $value): void |
|
101 | + public function testOCT2DECOds(mixed $expectedResult, bool | string $value): void |
|
102 | 102 | { |
103 | 103 | Functions::setCompatibilityMode( |
104 | 104 | Functions::COMPATIBILITY_OPENOFFICE |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | #[DataProvider('providerBIN2DEC')] |
32 | - public function testDirectCallToBIN2DEC(float|int|string $expectedResult, bool|int|string $arg1): void |
|
32 | + public function testDirectCallToBIN2DEC(float | int | string $expectedResult, bool | int | string $arg1): void |
|
33 | 33 | { |
34 | 34 | $result = ConvertBinary::toDecimal($arg1); |
35 | 35 | self::assertSame($expectedResult, $result); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | #[DataProvider('providerBIN2DECOds')] |
101 | - public function testBIN2DECOds(float|int|string $expectedResult, bool $arg1): void |
|
101 | + public function testBIN2DECOds(float | int | string $expectedResult, bool $arg1): void |
|
102 | 102 | { |
103 | 103 | Functions::setCompatibilityMode( |
104 | 104 | Functions::COMPATIBILITY_OPENOFFICE |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | #[DataProvider('providerHEX2DEC')] |
32 | - public function testDirectCallToHEX2DEC(mixed $expectedResult, bool|float|int|string $value): void |
|
32 | + public function testDirectCallToHEX2DEC(mixed $expectedResult, bool | float | int | string $value): void |
|
33 | 33 | { |
34 | 34 | $result = ConvertHex::toDecimal($value); |
35 | 35 | self::assertSame($expectedResult, $result); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | #[DataProvider('providerHEX2DECOds')] |
101 | - public function testHEX2DECOds(mixed $expectedResult, bool|float|int|string $value): void |
|
101 | + public function testHEX2DECOds(mixed $expectedResult, bool | float | int | string $value): void |
|
102 | 102 | { |
103 | 103 | Functions::setCompatibilityMode( |
104 | 104 | Functions::COMPATIBILITY_OPENOFFICE |
@@ -9,7 +9,7 @@ |
||
9 | 9 | |
10 | 10 | class CustomFunction |
11 | 11 | { |
12 | - public static function fourthPower(mixed $number): float|int|string |
|
12 | + public static function fourthPower(mixed $number): float | int | string |
|
13 | 13 | { |
14 | 14 | try { |
15 | 15 | $number = Helpers::validateNumericNullBool($number); |
@@ -2029,26 +2029,26 @@ |
||
2029 | 2029 | } |
2030 | 2030 | } |
2031 | 2031 | |
2032 | - private static function getArrayItem(null|array|bool|SimpleXMLElement $array, int|string $key = 0): mixed |
|
2032 | + private static function getArrayItem(null | array | bool | SimpleXMLElement $array, int | string $key = 0): mixed |
|
2033 | 2033 | { |
2034 | 2034 | return ($array === null || is_bool($array)) ? null : ($array[$key] ?? null); |
2035 | 2035 | } |
2036 | 2036 | |
2037 | - private static function getArrayItemString(null|array|bool|SimpleXMLElement $array, int|string $key = 0): string |
|
2037 | + private static function getArrayItemString(null | array | bool | SimpleXMLElement $array, int | string $key = 0): string |
|
2038 | 2038 | { |
2039 | 2039 | $retVal = self::getArrayItem($array, $key); |
2040 | 2040 | |
2041 | 2041 | return StringHelper::convertToString($retVal, false); |
2042 | 2042 | } |
2043 | 2043 | |
2044 | - private static function getArrayItemIntOrSxml(null|array|bool|SimpleXMLElement $array, int|string $key = 0): int|SimpleXMLElement |
|
2044 | + private static function getArrayItemIntOrSxml(null | array | bool | SimpleXMLElement $array, int | string $key = 0): int | SimpleXMLElement |
|
2045 | 2045 | { |
2046 | 2046 | $retVal = self::getArrayItem($array, $key); |
2047 | 2047 | |
2048 | 2048 | return (is_int($retVal) || $retVal instanceof SimpleXMLElement) ? $retVal : 0; |
2049 | 2049 | } |
2050 | 2050 | |
2051 | - private static function dirAdd(null|SimpleXMLElement|string $base, null|SimpleXMLElement|string $add): string |
|
2051 | + private static function dirAdd(null | SimpleXMLElement | string $base, null | SimpleXMLElement | string $add): string |
|
2052 | 2052 | { |
2053 | 2053 | $base = (string) $base; |
2054 | 2054 | $add = (string) $add; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | class MySpreadsheet extends Spreadsheet |
10 | 10 | { |
11 | - public function calcSquare(string $cellAddress): float|int|string |
|
11 | + public function calcSquare(string $cellAddress): float | int | string |
|
12 | 12 | { |
13 | 13 | $value = $this->getActiveSheet() |
14 | 14 | ->getCell($cellAddress) |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | * |
255 | 255 | * @param-out string $cellContent In one case, it can be bool |
256 | 256 | */ |
257 | - protected function flushCell(Worksheet $sheet, string $column, int|string $row, mixed &$cellContent, array $attributeArray): void |
|
257 | + protected function flushCell(Worksheet $sheet, string $column, int | string $row, mixed &$cellContent, array $attributeArray): void |
|
258 | 258 | { |
259 | 259 | if (is_string($cellContent)) { |
260 | 260 | // Simple String content |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | /** @var array<int, array<int, string>> */ |
305 | 305 | private static array $falseTrueArray = []; |
306 | 306 | |
307 | - private static function convertBoolean(?string $cellContent): bool|string |
|
307 | + private static function convertBoolean(?string $cellContent): bool | string |
|
308 | 308 | { |
309 | 309 | if ($cellContent === '1') { |
310 | 310 | return true; |
@@ -892,7 +892,7 @@ discard block |
||
892 | 892 | * TODO : |
893 | 893 | * - Implement to other propertie, such as border |
894 | 894 | */ |
895 | - private function applyInlineStyle(Worksheet &$sheet, int $row, string $column, array $attributeArray): void |
|
895 | + private function applyInlineStyle(Worksheet & $sheet, int $row, string $column, array $attributeArray): void |
|
896 | 896 | { |
897 | 897 | if (!isset($attributeArray['style'])) { |
898 | 898 | return; |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * |
25 | 25 | * @return int|string Result, or a string containing an error |
26 | 26 | */ |
27 | - public static function daysPerYear(mixed $year, $basis = 0): string|int |
|
27 | + public static function daysPerYear(mixed $year, $basis = 0): string | int |
|
28 | 28 | { |
29 | 29 | if (!is_int($year) && !is_string($year)) { |
30 | 30 | return ExcelError::VALUE(); |
@@ -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 $dates */ |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * The first payment date indicates the beginning of the schedule of payments. |
120 | 120 | * All other dates must be later than this date, but they may occur in any order. |
121 | 121 | */ |
122 | - public static function presentValue(mixed $rate, mixed $values, mixed $dates): float|string |
|
122 | + public static function presentValue(mixed $rate, mixed $values, mixed $dates): float | string |
|
123 | 123 | { |
124 | 124 | return self::xnpvOrdered($rate, $values, $dates, true); |
125 | 125 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | return ''; |
179 | 179 | } |
180 | 180 | |
181 | - private static function xirrPart3(array $values, array $dates, float $x1, float $x2): float|string |
|
181 | + private static function xirrPart3(array $values, array $dates, float $x1, float $x2): float | string |
|
182 | 182 | { |
183 | 183 | $f = self::xnpvOrdered($x1, $values, $dates, false); |
184 | 184 | if ($f < 0.0) { |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | return $rslt; |
208 | 208 | } |
209 | 209 | |
210 | - private static function xirrBisection(array $values, array $dates, float $x1, float $x2): string|float |
|
210 | + private static function xirrBisection(array $values, array $dates, float $x1, float $x2): string | float |
|
211 | 211 | { |
212 | 212 | $rslt = ExcelError::NAN(); |
213 | 213 | for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) { |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | } |
245 | 245 | |
246 | 246 | /** @param array<int,float|int|numeric-string> $values> */ |
247 | - private static function xnpvOrdered(mixed $rate, mixed $values, mixed $dates, bool $ordered = true, bool $capAtNegative1 = false): float|string |
|
247 | + private static function xnpvOrdered(mixed $rate, mixed $values, mixed $dates, bool $ordered = true, bool $capAtNegative1 = false): float | string |
|
248 | 248 | { |
249 | 249 | $rate = Functions::flattenSingleValue($rate); |
250 | 250 | if (!is_numeric($rate)) { |