@@ -21,7 +21,7 @@ |
||
21 | 21 | } |
22 | 22 | |
23 | 23 | #[\PHPUnit\Framework\Attributes\DataProvider('providerNumberFormatNoConversionTest')] |
24 | - public function testNumberFormatNoConversion(int|string $expectedValue, string $expectedFormat, string $cellAddress): void |
|
24 | + public function testNumberFormatNoConversion(int | string $expectedValue, string $expectedFormat, string $cellAddress): void |
|
25 | 25 | { |
26 | 26 | $spreadsheet = $this->csvReader->load($this->filename); |
27 | 27 | $worksheet = $spreadsheet->getActiveSheet(); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | class CsvTest extends TestCase |
12 | 12 | { |
13 | 13 | #[\PHPUnit\Framework\Attributes\DataProvider('providerDelimiterDetection')] |
14 | - public function testDelimiterDetection(string $filename, string $expectedDelimiter, string $cell, string|float|int|null $expectedValue): void |
|
14 | + public function testDelimiterDetection(string $filename, string $expectedDelimiter, string $cell, string | float | int | null $expectedValue): void |
|
15 | 15 | { |
16 | 16 | $reader = new Csv(); |
17 | 17 | $delim1 = $reader->getDelimiter(); |
@@ -10,7 +10,7 @@ |
||
10 | 10 | class ErrorCodeMapTest extends TestCase |
11 | 11 | { |
12 | 12 | #[\PHPUnit\Framework\Attributes\DataProvider('errorCodeMapProvider')] |
13 | - public function testErrorCode(bool|string $expected, int $index): void |
|
13 | + public function testErrorCode(bool | string $expected, int $index): void |
|
14 | 14 | { |
15 | 15 | self::assertSame($expected, ErrorCode::lookup($index)); |
16 | 16 | } |
@@ -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 (is_numeric($expectedResult) && ($expectedResult > PHP_INT_MAX || $expectedResult < PHP_INT_MIN)) { |
163 | 163 | self::markTestSkipped('Test invalid on 32-bit system.'); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | * @param string|string[] $expectedResult |
15 | 15 | */ |
16 | 16 | #[\PHPUnit\Framework\Attributes\DataProvider('providerCodePage')] |
17 | - public function testCodePageNumberToName(array|string $expectedResult, int $codePageIndex): void |
|
17 | + public function testCodePageNumberToName(array | string $expectedResult, int $codePageIndex): void |
|
18 | 18 | { |
19 | 19 | if ($expectedResult === 'exception') { |
20 | 20 | $this->expectException(Exception::class); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | #[\PHPUnit\Framework\Attributes\DataProvider('providerFontSizeToPixels')] |
45 | - public function testFontSizeToPixels(float|int $expectedResult, float|int $size): void |
|
45 | + public function testFontSizeToPixels(float | int $expectedResult, float | int $size): void |
|
46 | 46 | { |
47 | 47 | $result = Font::fontSizeToPixels($size); |
48 | 48 | self::assertEquals($expectedResult, $result); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | #[\PHPUnit\Framework\Attributes\DataProvider('providerInchSizeToPixels')] |
57 | - public function testInchSizeToPixels(float|int $expectedResult, float|int $size): void |
|
57 | + public function testInchSizeToPixels(float | int $expectedResult, float | int $size): void |
|
58 | 58 | { |
59 | 59 | $result = Font::inchSizeToPixels($size); |
60 | 60 | self::assertEqualsWithDelta($expectedResult, $result, self::FONT_PRECISION); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | #[\PHPUnit\Framework\Attributes\DataProvider('providerTimeOnly')] |
41 | - public function testTimeOnly(int|float $expectedResult, int|float|string $value, ?string $format = null): void |
|
41 | + public function testTimeOnly(int | float $expectedResult, int | float | string $value, ?string $format = null): void |
|
42 | 42 | { |
43 | 43 | Cell::setCalculateDateTimeType(Cell::CALCULATE_TIME_FLOAT); |
44 | 44 | $this->spreadsheet = new Spreadsheet(); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | #[\PHPUnit\Framework\Attributes\DataProvider('providerDateAndTime')] |
84 | - public function testDateAndTime(int|float $expectedResult, int|float|string $value, ?string $format = null): void |
|
84 | + public function testDateAndTime(int | float $expectedResult, int | float | string $value, ?string $format = null): void |
|
85 | 85 | { |
86 | 86 | Cell::setCalculateDateTimeType(Cell::CALCULATE_DATE_TIME_FLOAT); |
87 | 87 | $this->spreadsheet = new Spreadsheet(); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | #[\PHPUnit\Framework\Attributes\DataProvider('providerAsis')] |
127 | - public function testDefault(int|float $expectedResult, int|float|string $value, ?string $format = null): void |
|
127 | + public function testDefault(int | float $expectedResult, int | float | string $value, ?string $format = null): void |
|
128 | 128 | { |
129 | 129 | //Cell::setCalculateDateTimeType(Cell::CALCULATE_DATE_TIME_ASIS); |
130 | 130 | $this->spreadsheet = new Spreadsheet(); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | #[\PHPUnit\Framework\Attributes\DataProvider('providerAsis')] |
147 | - public function testAsis(int|float $expectedResult, int|float|string $value, ?string $format = null): void |
|
147 | + public function testAsis(int | float $expectedResult, int | float | string $value, ?string $format = null): void |
|
148 | 148 | { |
149 | 149 | Cell::setCalculateDateTimeType(Cell::CALCULATE_DATE_TIME_ASIS); |
150 | 150 | $this->spreadsheet = new Spreadsheet(); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | class RefRangeTest extends TestCase |
12 | 12 | { |
13 | 13 | #[\PHPUnit\Framework\Attributes\DataProvider('providerRefRange')] |
14 | - public function testRefRange(int|string $expectedResult, string $rangeString): void |
|
14 | + public function testRefRange(int | string $expectedResult, string $rangeString): void |
|
15 | 15 | { |
16 | 16 | $spreadsheet = new Spreadsheet(); |
17 | 17 | $sheet = $spreadsheet->getActiveSheet(); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | class FloatsRetainedTest extends TestCase |
14 | 14 | { |
15 | 15 | #[\PHPUnit\Framework\Attributes\DataProvider('providerIntyFloatsRetainedByWriter')] |
16 | - public function testIntyFloatsRetainedByWriter(float|int $value): void |
|
16 | + public function testIntyFloatsRetainedByWriter(float | int $value): void |
|
17 | 17 | { |
18 | 18 | $outputFilename = File::temporaryFilename(); |
19 | 19 | $spreadsheet = new Spreadsheet(); |