Passed
Pull Request — master (#4498)
by Owen
15:04
created
src/PhpSpreadsheet/Calculation/Information/ErrorValue.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array
19 19
      *            with the same dimensions
20 20
      */
21
-    public static function isErr(mixed $value = ''): array|bool
21
+    public static function isErr(mixed $value = ''): array | bool
22 22
     {
23 23
         if (is_array($value)) {
24 24
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @return array<mixed>|bool 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 isError(mixed $value = '', bool $tryNotImplemented = false): array|bool
39
+    public static function isError(mixed $value = '', bool $tryNotImplemented = false): array | bool
40 40
     {
41 41
         if (is_array($value)) {
42 42
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array
62 62
      *            with the same dimensions
63 63
      */
64
-    public static function isNa(mixed $value = ''): array|bool
64
+    public static function isNa(mixed $value = ''): array | bool
65 65
     {
66 66
         if (is_array($value)) {
67 67
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Information/Value.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array
25 25
      *            with the same dimensions
26 26
      */
27
-    public static function isBlank(mixed $value = null): array|bool
27
+    public static function isBlank(mixed $value = null): array | bool
28 28
     {
29 29
         if (is_array($value)) {
30 30
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      * @return array<mixed>|bool|string If an array of numbers is passed as an argument, then the returned result will also be an array
74 74
      *            with the same dimensions
75 75
      */
76
-    public static function isEven(mixed $value = null): array|string|bool
76
+    public static function isEven(mixed $value = null): array | string | bool
77 77
     {
78 78
         if (is_array($value)) {
79 79
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      * @return array<mixed>|bool|string If an array of numbers is passed as an argument, then the returned result will also be an array
99 99
      *            with the same dimensions
100 100
      */
101
-    public static function isOdd(mixed $value = null): array|string|bool
101
+    public static function isOdd(mixed $value = null): array | string | bool
102 102
     {
103 103
         if (is_array($value)) {
104 104
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array
124 124
      *            with the same dimensions
125 125
      */
126
-    public static function isNumber(mixed $value = null): array|bool
126
+    public static function isNumber(mixed $value = null): array | bool
127 127
     {
128 128
         if (is_array($value)) {
129 129
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array
146 146
      *            with the same dimensions
147 147
      */
148
-    public static function isLogical(mixed $value = null): array|bool
148
+    public static function isLogical(mixed $value = null): array | bool
149 149
     {
150 150
         if (is_array($value)) {
151 151
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array
164 164
      *            with the same dimensions
165 165
      */
166
-    public static function isText(mixed $value = null): array|bool
166
+    public static function isText(mixed $value = null): array | bool
167 167
     {
168 168
         if (is_array($value)) {
169 169
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
      * @return array<mixed>|bool If an array of numbers is passed as an argument, then the returned result will also be an array
182 182
      *            with the same dimensions
183 183
      */
184
-    public static function isNonText(mixed $value = null): array|bool
184
+    public static function isNonText(mixed $value = null): array | bool
185 185
     {
186 186
         if (is_array($value)) {
187 187
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
      *
199 199
      * @return array<mixed>|bool|string
200 200
      */
201
-    public static function isFormula(mixed $cellReference = '', ?Cell $cell = null): array|bool|string
201
+    public static function isFormula(mixed $cellReference = '', ?Cell $cell = null): array | bool | string
202 202
     {
203 203
         if ($cell === null) {
204 204
             return ExcelError::REF();
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Information/ExcelError.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      *
43 43
      * @return array<mixed>|int|string
44 44
      */
45
-    public static function type(mixed $value = ''): array|int|string
45
+    public static function type(mixed $value = ''): array | int | string
46 46
     {
47 47
         if (is_array($value)) {
48 48
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTimeExcel/Helpers.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      *
18 18
      * @return bool TRUE if the year is a leap year, otherwise FALSE
19 19
      */
20
-    public static function isLeapYear(int|string $year): bool
20
+    public static function isLeapYear(int | string $year): bool
21 21
     {
22 22
         $year = (int) $year;
23 23
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      *
65 65
      * @return float|string Excel date/time serial value, or string if error
66 66
      */
67
-    public static function getTimeValue(string $timeValue): string|float
67
+    public static function getTimeValue(string $timeValue): string | float
68 68
     {
69 69
         $saveReturnDateType = Functions::getReturnDateType();
70 70
         Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      *
135 135
      * @param array{year: int, month: int, day: int, hour: int, minute: int, second: int} $dateArray
136 136
      */
137
-    public static function returnIn3FormatsArray(array $dateArray, bool $noFrac = false): DateTime|float|int
137
+    public static function returnIn3FormatsArray(array $dateArray, bool $noFrac = false): DateTime | float | int
138 138
     {
139 139
         $retType = Functions::getReturnDateType();
140 140
         if ($retType === Functions::RETURNDATE_PHP_DATETIME_OBJECT) {
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     /**
168 168
      * Return result in one of three formats.
169 169
      */
170
-    public static function returnIn3FormatsFloat(float $excelDateValue): float|int|DateTime
170
+    public static function returnIn3FormatsFloat(float $excelDateValue): float | int | DateTime
171 171
     {
172 172
         $retType = Functions::getReturnDateType();
173 173
         if ($retType === Functions::RETURNDATE_EXCEL) {
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     /**
185 185
      * Return result in one of three formats.
186 186
      */
187
-    public static function returnIn3FormatsObject(DateTime $PHPDateObject): DateTime|float|int
187
+    public static function returnIn3FormatsObject(DateTime $PHPDateObject): DateTime | float | int
188 188
     {
189 189
         $retType = Functions::getReturnDateType();
190 190
         if ($retType === Functions::RETURNDATE_PHP_DATETIME_OBJECT) {
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
     /**
230 230
      * Many functions accept null argument treated as 0.
231 231
      */
232
-    public static function validateNumericNull(mixed $number): int|float
232
+    public static function validateNumericNull(mixed $number): int | float
233 233
     {
234 234
         $number = Functions::flattenSingleValue($number);
235 235
         if ($number === null) {
@@ -293,12 +293,12 @@  discard block
 block discarded – undo
293 293
      *
294 294
      * @return mixed[]
295 295
      */
296
-    private static function forceArray(array|bool $dateArray): array
296
+    private static function forceArray(array | bool $dateArray): array
297 297
     {
298 298
         return is_array($dateArray) ? $dateArray : ['error_count' => 1];
299 299
     }
300 300
 
301
-    public static function floatOrInt(mixed $value): float|int
301
+    public static function floatOrInt(mixed $value): float | int
302 302
     {
303 303
         $result = Functions::scalar($value);
304 304
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      *         If an array of values is passed for the $startDate or $endDays,arguments, then the returned result
37 37
      *            will also be an array with matching dimensions
38 38
      */
39
-    public static function date(mixed $startDate, array|int|string $endDays, mixed ...$dateArgs): array|float|int|DateTime|string
39
+    public static function date(mixed $startDate, array | int | string $endDays, mixed ...$dateArgs): array | float | int | DateTime | string
40 40
     {
41 41
         if (is_array($startDate) || is_array($endDays)) {
42 42
             return self::evaluateArrayArgumentsSubset(
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      *
76 76
      * @param array<mixed> $holidayArray
77 77
      */
78
-    private static function incrementing(float $startDate, int $endDays, array $holidayArray): float|int|DateTime
78
+    private static function incrementing(float $startDate, int $endDays, array $holidayArray): float | int | DateTime
79 79
     {
80 80
         //    Adjust the start date if it falls over a weekend
81 81
         $startDoW = self::getWeekDay($startDate, 3);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      *
139 139
      * @param array<mixed> $holidayArray
140 140
      */
141
-    private static function decrementing(float $startDate, int $endDays, array $holidayArray): float|int|DateTime
141
+    private static function decrementing(float $startDate, int $endDays, array $holidayArray): float | int | DateTime
142 142
     {
143 143
         //    Adjust the start date if it falls over a weekend
144 144
         $startDoW = self::getWeekDay($startDate, 3);
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MdeTermTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 {
11 11
     /** @param array<mixed>|float|int|string $matrix */
12 12
     #[DataProvider('providerMDETERM')]
13
-    public function testMDETERM2(float|int|string $expectedResult, array|int|float|string $matrix): void
13
+    public function testMDETERM2(float | int | string $expectedResult, array | int | float | string $matrix): void
14 14
     {
15 15
         $this->mightHaveException($expectedResult);
16 16
         $sheet = $this->getSheet();
Please login to merge, or discard this patch.
PhpSpreadsheetTests/Calculation/Functions/Engineering/ImaginaryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     }
24 24
 
25 25
     #[DataProvider('providerIMAGINARY')]
26
-    public function testDirectCallToIMAGINARY(float|int|string $expectedResult, float|int|string $arg): void
26
+    public function testDirectCallToIMAGINARY(float | int | string $expectedResult, float | int | string $arg): void
27 27
     {
28 28
         $result = Complex::IMAGINARY((string) $arg);
29 29
         self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitOrTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@  discard block
 block discarded – undo
15 15
 class BitOrTest extends TestCase
16 16
 {
17 17
     #[DataProvider('providerBITOR')]
18
-    public function testDirectCallToBITOR(float|int|string $expectedResult, null|bool|int|float|string $arg1, null|bool|int|float|string $arg2): void
18
+    public function testDirectCallToBITOR(float | int | string $expectedResult, null | bool | int | float | string $arg1, null | bool | int | float | string $arg2): void
19 19
     {
20 20
         $result = BitWise::BITOR($arg1, $arg2);
21 21
         self::assertSame($expectedResult, $result);
22 22
     }
23 23
 
24 24
     #[DataProvider('providerBITOR')]
25
-    public function testBITORAsFormula(float|int|string $expectedResult, mixed ...$args): void
25
+    public function testBITORAsFormula(float | int | string $expectedResult, mixed ...$args): void
26 26
     {
27 27
         $arguments = new FormulaArguments(...$args);
28 28
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     }
35 35
 
36 36
     #[DataProvider('providerBITOR')]
37
-    public function testBITORInWorksheet(float|int|string $expectedResult, mixed ...$args): void
37
+    public function testBITORInWorksheet(float | int | string $expectedResult, mixed ...$args): void
38 38
     {
39 39
         $arguments = new FormulaArguments(...$args);
40 40
 
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2OctTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     }
29 29
 
30 30
     #[DataProvider('providerDEC2OCT')]
31
-    public function testDirectCallToDEC2OCT(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void
31
+    public function testDirectCallToDEC2OCT(mixed $expectedResult, bool | float | int | string $value, ?int $digits = null): void
32 32
     {
33 33
         $result = ($digits === null) ? ConvertDecimal::toOctal($value) : ConvertDecimal::toOctal($value, $digits);
34 34
         self::assertSame($expectedResult, $result);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     }
103 103
 
104 104
     #[DataProvider('providerDEC2OCTOds')]
105
-    public function testDEC2OCTOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void
105
+    public function testDEC2OCTOds(mixed $expectedResult, bool | float | int | string $value, ?int $digits = null): void
106 106
     {
107 107
         Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
108 108
 
Please login to merge, or discard this patch.