@@ -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(); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | #[\PHPUnit\Framework\Attributes\DataProvider('providerCreationTime')] |
48 | - public function testSetCreated(null|int $expectedCreationTime, null|int|string $created): void |
|
48 | + public function testSetCreated(null | int $expectedCreationTime, null | int | string $created): void |
|
49 | 49 | { |
50 | 50 | $expectedCreationTime = $expectedCreationTime ?? $this->startTime; |
51 | 51 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | #[\PHPUnit\Framework\Attributes\DataProvider('providerModifiedTime')] |
75 | - public function testSetModified(mixed $expectedModifiedTime, null|int|string $modified): void |
|
75 | + public function testSetModified(mixed $expectedModifiedTime, null | int | string $modified): void |
|
76 | 76 | { |
77 | 77 | $expectedModifiedTime = $expectedModifiedTime ?? $this->startTime; |
78 | 78 | |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | } |
148 | 148 | |
149 | 149 | #[\PHPUnit\Framework\Attributes\DataProvider('providerCustomProperties')] |
150 | - public function testSetCustomProperties(mixed $expectedType, mixed $expectedValue, string $propertyName, null|bool|float|int|string $propertyValue, ?string $propertyType = null): void |
|
150 | + public function testSetCustomProperties(mixed $expectedType, mixed $expectedValue, string $propertyName, null | bool | float | int | string $propertyValue, ?string $propertyType = null): void |
|
151 | 151 | { |
152 | 152 | if ($propertyType === null) { |
153 | 153 | $this->properties->setCustomProperty($propertyName, $propertyValue); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | class DefaultValueBinderTest extends TestCase |
17 | 17 | { |
18 | 18 | #[\PHPUnit\Framework\Attributes\DataProvider('binderProvider')] |
19 | - public function testBindValue(null|string|bool|int|float|DateTime|DateTimeImmutable $value): void |
|
19 | + public function testBindValue(null | string | bool | int | float | DateTime | DateTimeImmutable $value): void |
|
20 | 20 | { |
21 | 21 | $spreadsheet = new Spreadsheet(); |
22 | 22 | $sheet = $spreadsheet->getActiveSheet(); |
@@ -76,7 +76,7 @@ |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | #[\PHPUnit\Framework\Attributes\DataProvider('providerCreateFromColumnRowException')] |
79 | - public function testCreateFromColumnRowException(int|string $columnId, int|string $rowId): void |
|
79 | + public function testCreateFromColumnRowException(int | string $columnId, int | string $rowId): void |
|
80 | 80 | { |
81 | 81 | $this->expectException(Exception::class); |
82 | 82 | $this->expectExceptionMessage('Row and Column Ids must be positive integer values'); |
@@ -168,7 +168,7 @@ |
||
168 | 168 | } |
169 | 169 | |
170 | 170 | #[\PHPUnit\Framework\Attributes\DataProvider('providerAbsoluteReferences')] |
171 | - public function testAbsoluteReferenceFromString(mixed $expectedResult, int|string $rangeSet): void |
|
171 | + public function testAbsoluteReferenceFromString(mixed $expectedResult, int | string $rangeSet): void |
|
172 | 172 | { |
173 | 173 | $result = Coordinate::absoluteReference((string) $rangeSet); |
174 | 174 | self::assertEquals($expectedResult, $result); |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | /** |
253 | 253 | * Flush cell. |
254 | 254 | */ |
255 | - protected function flushCell(Worksheet $sheet, string $column, int|string $row, mixed &$cellContent, array $attributeArray): void |
|
255 | + protected function flushCell(Worksheet $sheet, string $column, int | string $row, mixed &$cellContent, array $attributeArray): void |
|
256 | 256 | { |
257 | 257 | if (is_string($cellContent)) { |
258 | 258 | // Simple String content |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | /** @var array<int, array<int, string>> */ |
302 | 302 | private static array $falseTrueArray = []; |
303 | 303 | |
304 | - private static function convertBoolean(?string $cellContent): bool|string |
|
304 | + private static function convertBoolean(?string $cellContent): bool | string |
|
305 | 305 | { |
306 | 306 | if ($cellContent === '1') { |
307 | 307 | return true; |
@@ -887,7 +887,7 @@ discard block |
||
887 | 887 | * TODO : |
888 | 888 | * - Implement to other propertie, such as border |
889 | 889 | */ |
890 | - private function applyInlineStyle(Worksheet &$sheet, int $row, string $column, array $attributeArray): void |
|
890 | + private function applyInlineStyle(Worksheet & $sheet, int $row, string $column, array $attributeArray): void |
|
891 | 891 | { |
892 | 892 | if (!isset($attributeArray['style'])) { |
893 | 893 | return; |