@@ -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(); |
@@ -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'); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | } |
19 | 19 | |
20 | 20 | #[\PHPUnit\Framework\Attributes\DataProvider('providerXORLiteral')] |
21 | - public function testXORLiteral(mixed $expectedResult, float|string $formula): void |
|
21 | + public function testXORLiteral(mixed $expectedResult, float | string $formula): void |
|
22 | 22 | { |
23 | 23 | $sheet = $this->getSheet(); |
24 | 24 | $sheet->getCell('A1')->setValue("=XOR($formula)"); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | * |
35 | 35 | * @return mixed[]|string |
36 | 36 | */ |
37 | - public static function chooseCols(mixed $input, mixed ...$args): array|string |
|
37 | + public static function chooseCols(mixed $input, mixed ...$args): array | string |
|
38 | 38 | { |
39 | 39 | if (!is_array($input)) { |
40 | 40 | $input = [[$input]]; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * |
52 | 52 | * @return mixed[]|string |
53 | 53 | */ |
54 | - public static function chooseRows(mixed $input, mixed ...$args): array|string |
|
54 | + public static function chooseRows(mixed $input, mixed ...$args): array | string |
|
55 | 55 | { |
56 | 56 | if (!is_array($input)) { |
57 | 57 | $input = [[$input]]; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | return $outputArray; |
81 | 81 | } |
82 | 82 | |
83 | - private static function dropRows(array $array, mixed $offset): array|string |
|
83 | + private static function dropRows(array $array, mixed $offset): array | string |
|
84 | 84 | { |
85 | 85 | if ($offset === null) { |
86 | 86 | return $array; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | * |
113 | 113 | * @return mixed[]|string |
114 | 114 | */ |
115 | - public static function drop(mixed $input, mixed $rows = null, mixed $columns = null): array|string |
|
115 | + public static function drop(mixed $input, mixed $rows = null, mixed $columns = null): array | string |
|
116 | 116 | { |
117 | 117 | if (!is_array($input)) { |
118 | 118 | $input = [[$input]]; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | return self::transpose($outputArray3); |
135 | 135 | } |
136 | 136 | |
137 | - private static function takeRows(array $array, mixed $offset): array|string |
|
137 | + private static function takeRows(array $array, mixed $offset): array | string |
|
138 | 138 | { |
139 | 139 | if ($offset === null) { |
140 | 140 | return $array; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | * |
166 | 166 | * @return mixed[]|string |
167 | 167 | */ |
168 | - public static function take(mixed $input, mixed $rows, mixed $columns = null): array|string |
|
168 | + public static function take(mixed $input, mixed $rows, mixed $columns = null): array | string |
|
169 | 169 | { |
170 | 170 | if (!is_array($input)) { |
171 | 171 | $input = [[$input]]; |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | * |
198 | 198 | * @return mixed[]|string |
199 | 199 | */ |
200 | - public static function expand(mixed $input, mixed $rows, mixed $columns = null, mixed $pad = '#N/A'): array|string |
|
200 | + public static function expand(mixed $input, mixed $rows, mixed $columns = null, mixed $pad = '#N/A'): array | string |
|
201 | 201 | { |
202 | 202 | if (!is_array($input)) { |
203 | 203 | $input = [[$input]]; |
@@ -116,7 +116,7 @@ |
||
116 | 116 | * |
117 | 117 | * @return string Formatted string |
118 | 118 | */ |
119 | - public static function toFormattedString($value, string $format, null|array|callable $callBack = null): string |
|
119 | + public static function toFormattedString($value, string $format, null | array | callable $callBack = null): string |
|
120 | 120 | { |
121 | 121 | while (is_array($value)) { |
122 | 122 | $value = array_shift($value); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * |
16 | 16 | * @return float|int Random number |
17 | 17 | */ |
18 | - public static function rand(): int|float |
|
18 | + public static function rand(): int | float |
|
19 | 19 | { |
20 | 20 | return mt_rand(0, 10000000) / 10000000; |
21 | 21 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * If an array of numbers is passed as an argument, then the returned result will also be an array |
33 | 33 | * with the same dimensions |
34 | 34 | */ |
35 | - public static function randBetween(mixed $min, mixed $max): array|string|int |
|
35 | + public static function randBetween(mixed $min, mixed $max): array | string | int |
|
36 | 36 | { |
37 | 37 | if (is_array($min) || is_array($max)) { |
38 | 38 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $min, $max); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * |
68 | 68 | * @return array|string The resulting array, or a string containing an error |
69 | 69 | */ |
70 | - public static function randArray(mixed $rows = 1, mixed $columns = 1, mixed $min = 0, mixed $max = 1, bool $wholeNumber = false): string|array |
|
70 | + public static function randArray(mixed $rows = 1, mixed $columns = 1, mixed $min = 0, mixed $max = 1, bool $wholeNumber = false): string | array |
|
71 | 71 | { |
72 | 72 | try { |
73 | 73 | $rows = (int) Helpers::validateNumericNullSubstitution($rows, 1); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | return array_chunk( |
88 | 88 | array_map( |
89 | - fn (): int|float => $wholeNumber |
|
89 | + fn (): int | float => $wholeNumber |
|
90 | 90 | ? mt_rand((int) $min, (int) $max) |
91 | 91 | : (mt_rand() / mt_getrandmax()) * ($max - $min) + $min, |
92 | 92 | array_fill(0, $rows * $columns, $min) |
@@ -74,7 +74,7 @@ |
||
74 | 74 | return $formula; |
75 | 75 | } |
76 | 76 | |
77 | - private function numericOperator(DataValidation $dataValidation, int|float $cellValue, Cell $cell): bool |
|
77 | + private function numericOperator(DataValidation $dataValidation, int | float $cellValue, Cell $cell): bool |
|
78 | 78 | { |
79 | 79 | $operator = $dataValidation->getOperator(); |
80 | 80 | $formula1 = self::evaluateNumericFormula( |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | #[DataProvider('providerCreationTime')] |
49 | - public function testSetCreated(null|int $expectedCreationTime, null|int|string $created): void |
|
49 | + public function testSetCreated(null | int $expectedCreationTime, null | int | string $created): void |
|
50 | 50 | { |
51 | 51 | if ($expectedCreationTime === null) { |
52 | 52 | do { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | #[DataProvider('providerModifiedTime')] |
83 | - public function testSetModified(mixed $expectedModifiedTime, null|int|string $modified): void |
|
83 | + public function testSetModified(mixed $expectedModifiedTime, null | int | string $modified): void |
|
84 | 84 | { |
85 | 85 | if ($expectedModifiedTime === null) { |
86 | 86 | do { |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | } |
163 | 163 | |
164 | 164 | #[DataProvider('providerCustomProperties')] |
165 | - public function testSetCustomProperties(mixed $expectedType, mixed $expectedValue, string $propertyName, null|bool|float|int|string $propertyValue, ?string $propertyType = null): void |
|
165 | + public function testSetCustomProperties(mixed $expectedType, mixed $expectedValue, string $propertyName, null | bool | float | int | string $propertyValue, ?string $propertyType = null): void |
|
166 | 166 | { |
167 | 167 | if ($propertyType === null) { |
168 | 168 | $this->properties->setCustomProperty($propertyName, $propertyValue); |