@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | /** |
45 | 45 | * @dataProvider providerFontSizeToPixels |
46 | 46 | */ |
47 | - public function testFontSizeToPixels(float|int $expectedResult, float|int $size): void |
|
47 | + public function testFontSizeToPixels(float | int $expectedResult, float | int $size): void |
|
48 | 48 | { |
49 | 49 | $result = Font::fontSizeToPixels($size); |
50 | 50 | self::assertEquals($expectedResult, $result); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | /** |
59 | 59 | * @dataProvider providerInchSizeToPixels |
60 | 60 | */ |
61 | - public function testInchSizeToPixels(float|int $expectedResult, float|int $size): void |
|
61 | + public function testInchSizeToPixels(float | int $expectedResult, float | int $size): void |
|
62 | 62 | { |
63 | 63 | $result = Font::inchSizeToPixels($size); |
64 | 64 | self::assertEqualsWithDelta($expectedResult, $result, self::FONT_PRECISION); |
@@ -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 |
@@ -91,7 +91,7 @@ |
||
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
94 | - private function getArrayItem(null|array|false $array): string |
|
94 | + private function getArrayItem(null | array | false $array): string |
|
95 | 95 | { |
96 | 96 | return is_array($array) ? (string) ($array[0] ?? '') : ''; |
97 | 97 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | /** |
17 | 17 | * @dataProvider providerBITOR |
18 | 18 | */ |
19 | - public function testDirectCallToBITOR(float|int|string $expectedResult, null|bool|int|float|string $arg1, null|bool|int|float|string $arg2): void |
|
19 | + public function testDirectCallToBITOR(float | int | string $expectedResult, null | bool | int | float | string $arg1, null | bool | int | float | string $arg2): void |
|
20 | 20 | { |
21 | 21 | $result = BitWise::BITOR($arg1, $arg2); |
22 | 22 | self::assertSame($expectedResult, $result); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | /** |
26 | 26 | * @dataProvider providerBITOR |
27 | 27 | */ |
28 | - public function testBITORAsFormula(float|int|string $expectedResult, mixed ...$args): void |
|
28 | + public function testBITORAsFormula(float | int | string $expectedResult, mixed ...$args): void |
|
29 | 29 | { |
30 | 30 | $arguments = new FormulaArguments(...$args); |
31 | 31 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | /** |
40 | 40 | * @dataProvider providerBITOR |
41 | 41 | */ |
42 | - public function testBITORInWorksheet(float|int|string $expectedResult, mixed ...$args): void |
|
42 | + public function testBITORInWorksheet(float | int | string $expectedResult, mixed ...$args): void |
|
43 | 43 | { |
44 | 44 | $arguments = new FormulaArguments(...$args); |
45 | 45 |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | /** |
17 | 17 | * @dataProvider providerBITAND |
18 | 18 | */ |
19 | - public function testDirectCallToBITAND(float|int|string $expectedResult, null|bool|int|float|string $arg1, null|bool|int|float|string $arg2): void |
|
19 | + public function testDirectCallToBITAND(float | int | string $expectedResult, null | bool | int | float | string $arg1, null | bool | int | float | string $arg2): void |
|
20 | 20 | { |
21 | 21 | $result = BitWise::BITAND($arg1, $arg2); |
22 | 22 | self::assertSame($expectedResult, $result); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | /** |
26 | 26 | * @dataProvider providerBITAND |
27 | 27 | */ |
28 | - public function testBITANDAsFormula(float|int|string $expectedResult, mixed ...$args): void |
|
28 | + public function testBITANDAsFormula(float | int | string $expectedResult, mixed ...$args): void |
|
29 | 29 | { |
30 | 30 | $arguments = new FormulaArguments(...$args); |
31 | 31 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | /** |
40 | 40 | * @dataProvider providerBITAND |
41 | 41 | */ |
42 | - public function testBITANDInWorksheet(float|int|string $expectedResult, mixed ...$args): void |
|
42 | + public function testBITANDInWorksheet(float | int | string $expectedResult, mixed ...$args): void |
|
43 | 43 | { |
44 | 44 | $arguments = new FormulaArguments(...$args); |
45 | 45 |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | /** |
17 | 17 | * @dataProvider providerBITXOR |
18 | 18 | */ |
19 | - public function testDirectCallToBITXOR(float|int|string $expectedResult, null|bool|int|float|string $arg1, null|bool|int|float|string $arg2): void |
|
19 | + public function testDirectCallToBITXOR(float | int | string $expectedResult, null | bool | int | float | string $arg1, null | bool | int | float | string $arg2): void |
|
20 | 20 | { |
21 | 21 | $result = BitWise::BITXOR($arg1, $arg2); |
22 | 22 | self::assertSame($expectedResult, $result); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | /** |
26 | 26 | * @dataProvider providerBITXOR |
27 | 27 | */ |
28 | - public function testBITXORAsFormula(float|int|string $expectedResult, mixed ...$args): void |
|
28 | + public function testBITXORAsFormula(float | int | string $expectedResult, mixed ...$args): void |
|
29 | 29 | { |
30 | 30 | $arguments = new FormulaArguments(...$args); |
31 | 31 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | /** |
40 | 40 | * @dataProvider providerBITXOR |
41 | 41 | */ |
42 | - public function testBITXORInWorksheet(float|int|string $expectedResult, mixed ...$args): void |
|
42 | + public function testBITXORInWorksheet(float | int | string $expectedResult, mixed ...$args): void |
|
43 | 43 | { |
44 | 44 | $arguments = new FormulaArguments(...$args); |
45 | 45 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | /** |
53 | 53 | * @dataProvider providerDateTimeExcelToTimestamp1900 |
54 | 54 | */ |
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.'); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | /** |
72 | 72 | * @dataProvider providerDateTimeTimestampToExcel1900 |
73 | 73 | */ |
74 | - public function testDateTimeTimestampToExcel1900(float|int $expectedResult, float|int|string $unixTimestamp): void |
|
74 | + public function testDateTimeTimestampToExcel1900(float | int $expectedResult, float | int | string $unixTimestamp): void |
|
75 | 75 | { |
76 | 76 | Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); |
77 | 77 | |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | /** |
88 | 88 | * @dataProvider providerDateTimeDateTimeToExcel |
89 | 89 | */ |
90 | - public function testDateTimeDateTimeToExcel(float|int $expectedResult, DateTimeInterface $dateTimeObject): void |
|
90 | + public function testDateTimeDateTimeToExcel(float | int $expectedResult, DateTimeInterface $dateTimeObject): void |
|
91 | 91 | { |
92 | 92 | Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); |
93 | 93 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | /** |
122 | 122 | * @dataProvider providerDateTimeExcelToTimestamp1904 |
123 | 123 | */ |
124 | - public function testDateTimeExcelToTimestamp1904(float|int $expectedResult, float|int $excelDateTimeValue): void |
|
124 | + public function testDateTimeExcelToTimestamp1904(float | int $expectedResult, float | int $excelDateTimeValue): void |
|
125 | 125 | { |
126 | 126 | if ($expectedResult > PHP_INT_MAX || $expectedResult < PHP_INT_MIN) { |
127 | 127 | self::markTestSkipped('Test invalid on 32-bit system.'); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | /** |
141 | 141 | * @dataProvider providerDateTimeTimestampToExcel1904 |
142 | 142 | */ |
143 | - public function testDateTimeTimestampToExcel1904(mixed $expectedResult, float|int|string $unixTimestamp): void |
|
143 | + public function testDateTimeTimestampToExcel1904(mixed $expectedResult, float | int | string $unixTimestamp): void |
|
144 | 144 | { |
145 | 145 | Date::setExcelCalendar(Date::CALENDAR_MAC_1904); |
146 | 146 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | /** |
171 | 171 | * @dataProvider providerDateTimeExcelToTimestamp1900Timezone |
172 | 172 | */ |
173 | - public function testDateTimeExcelToTimestamp1900Timezone(float|int $expectedResult, float|int $excelDateTimeValue, string $timezone): void |
|
173 | + public function testDateTimeExcelToTimestamp1900Timezone(float | int $expectedResult, float | int $excelDateTimeValue, string $timezone): void |
|
174 | 174 | { |
175 | 175 | if (is_numeric($expectedResult) && ($expectedResult > PHP_INT_MAX || $expectedResult < PHP_INT_MIN)) { |
176 | 176 | self::markTestSkipped('Test invalid on 32-bit system.'); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * |
18 | 18 | * @return int[] |
19 | 19 | */ |
20 | - private static function splitNumber(float|int $number): array |
|
20 | + private static function splitNumber(float | int $number): array |
|
21 | 21 | { |
22 | 22 | return [(int) floor($number / self::SPLIT_DIVISOR), (int) fmod($number, self::SPLIT_DIVISOR)]; |
23 | 23 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @return array|int|string If an array of numbers is passed as an argument, then the returned result will also be an array |
37 | 37 | * with the same dimensions |
38 | 38 | */ |
39 | - public static function BITAND(null|array|bool|float|int|string $number1, null|array|bool|float|int|string $number2): array|string|int|float |
|
39 | + public static function BITAND(null | array | bool | float | int | string $number1, null | array | bool | float | int | string $number2): array | string | int | float |
|
40 | 40 | { |
41 | 41 | if (is_array($number1) || is_array($number2)) { |
42 | 42 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $number1, $number2); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @return array|int|string If an array of numbers is passed as an argument, then the returned result will also be an array |
69 | 69 | * with the same dimensions |
70 | 70 | */ |
71 | - public static function BITOR(null|array|bool|float|int|string $number1, null|array|bool|float|int|string $number2): array|string|int|float |
|
71 | + public static function BITOR(null | array | bool | float | int | string $number1, null | array | bool | float | int | string $number2): array | string | int | float |
|
72 | 72 | { |
73 | 73 | if (is_array($number1) || is_array($number2)) { |
74 | 74 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $number1, $number2); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @return array|int|string If an array of numbers is passed as an argument, then the returned result will also be an array |
102 | 102 | * with the same dimensions |
103 | 103 | */ |
104 | - public static function BITXOR(null|array|bool|float|int|string $number1, null|array|bool|float|int|string $number2): array|string|int|float |
|
104 | + public static function BITXOR(null | array | bool | float | int | string $number1, null | array | bool | float | int | string $number2): array | string | int | float |
|
105 | 105 | { |
106 | 106 | if (is_array($number1) || is_array($number2)) { |
107 | 107 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $number1, $number2); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | * @return array|float|string If an array of numbers is passed as an argument, then the returned result will also be an array |
135 | 135 | * with the same dimensions |
136 | 136 | */ |
137 | - public static function BITLSHIFT(null|array|bool|float|int|string $number, null|array|bool|float|int|string $shiftAmount): array|string|float |
|
137 | + public static function BITLSHIFT(null | array | bool | float | int | string $number, null | array | bool | float | int | string $shiftAmount): array | string | float |
|
138 | 138 | { |
139 | 139 | if (is_array($number) || is_array($shiftAmount)) { |
140 | 140 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $shiftAmount); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | * @return array|float|string If an array of numbers is passed as an argument, then the returned result will also be an array |
170 | 170 | * with the same dimensions |
171 | 171 | */ |
172 | - public static function BITRSHIFT(null|array|bool|float|int|string $number, null|array|bool|float|int|string $shiftAmount): array|string|float |
|
172 | + public static function BITRSHIFT(null | array | bool | float | int | string $number, null | array | bool | float | int | string $shiftAmount): array | string | float |
|
173 | 173 | { |
174 | 174 | if (is_array($number) || is_array($shiftAmount)) { |
175 | 175 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $shiftAmount); |