Passed
Pull Request — master (#4424)
by Owen
14:06
created
src/PhpSpreadsheet/Calculation/Engineering/ErfC.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
     /**
48 48
      * Method to calculate the erfc value.
49 49
      */
50
-    private static function erfcValue(float|int|string $value): float|int
50
+    private static function erfcValue(float | int | string $value): float | int
51 51
     {
52 52
         $value = (float) $value;
53 53
         if (abs($value) < 2.2) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Engineering/Complex.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
32 32
      *            with the same dimensions
33 33
      */
34
-    public static function COMPLEX(mixed $realNumber = 0.0, mixed $imaginary = 0.0, mixed $suffix = 'i'): array|string
34
+    public static function COMPLEX(mixed $realNumber = 0.0, mixed $imaginary = 0.0, mixed $suffix = 'i'): array | string
35 35
     {
36 36
         if (is_array($realNumber) || is_array($imaginary) || is_array($suffix)) {
37 37
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $realNumber, $imaginary, $suffix);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      *         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 IMAGINARY($complexNumber): array|string|float
76
+    public static function IMAGINARY($complexNumber): array | string | float
77 77
     {
78 78
         if (is_array($complexNumber)) {
79 79
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
104 104
      *            with the same dimensions
105 105
      */
106
-    public static function IMREAL($complexNumber): array|string|float
106
+    public static function IMREAL($complexNumber): array | string | float
107 107
     {
108 108
         if (is_array($complexNumber)) {
109 109
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Engineering/Erf.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * @return array|float|string If an array of numbers is passed as an argument, then the returned result will also be an array
35 35
      *            with the same dimensions
36 36
      */
37
-    public static function ERF(mixed $lower, mixed $upper = null): array|float|string
37
+    public static function ERF(mixed $lower, mixed $upper = null): array | float | string
38 38
     {
39 39
         if (is_array($lower) || is_array($upper)) {
40 40
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $lower, $upper);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     /**
84 84
      * Method to calculate the erf value.
85 85
      */
86
-    public static function erfValue(float|int|string $value): float
86
+    public static function erfValue(float | int | string $value): float
87 87
     {
88 88
         $value = (float) $value;
89 89
         if (abs($value) > 2.2) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      * @return array|float|string         If an array of numbers is passed as an argument, then the returned result will also be an array
26 26
      *            with the same dimensions
27 27
      */
28
-    public static function IMABS(array|string $complexNumber): array|float|string
28
+    public static function IMABS(array | string $complexNumber): array | float | string
29 29
     {
30 30
         if (is_array($complexNumber)) {
31 31
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      * @return array|float|string If an array of numbers is passed as an argument, then the returned result will also be an array
56 56
      *            with the same dimensions
57 57
      */
58
-    public static function IMARGUMENT(array|string $complexNumber): array|float|string
58
+    public static function IMARGUMENT(array | string $complexNumber): array | float | string
59 59
     {
60 60
         if (is_array($complexNumber)) {
61 61
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
89 89
      *            with the same dimensions
90 90
      */
91
-    public static function IMCONJUGATE(array|string $complexNumber): array|string
91
+    public static function IMCONJUGATE(array | string $complexNumber): array | string
92 92
     {
93 93
         if (is_array($complexNumber)) {
94 94
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
118 118
      *            with the same dimensions
119 119
      */
120
-    public static function IMCOS(array|string $complexNumber): array|string
120
+    public static function IMCOS(array | string $complexNumber): array | string
121 121
     {
122 122
         if (is_array($complexNumber)) {
123 123
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
147 147
      *            with the same dimensions
148 148
      */
149
-    public static function IMCOSH(array|string $complexNumber): array|string
149
+    public static function IMCOSH(array | string $complexNumber): array | string
150 150
     {
151 151
         if (is_array($complexNumber)) {
152 152
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
176 176
      *            with the same dimensions
177 177
      */
178
-    public static function IMCOT(array|string $complexNumber): array|string
178
+    public static function IMCOT(array | string $complexNumber): array | string
179 179
     {
180 180
         if (is_array($complexNumber)) {
181 181
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
205 205
      *            with the same dimensions
206 206
      */
207
-    public static function IMCSC(array|string $complexNumber): array|string
207
+    public static function IMCSC(array | string $complexNumber): array | string
208 208
     {
209 209
         if (is_array($complexNumber)) {
210 210
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
234 234
      *            with the same dimensions
235 235
      */
236
-    public static function IMCSCH(array|string $complexNumber): array|string
236
+    public static function IMCSCH(array | string $complexNumber): array | string
237 237
     {
238 238
         if (is_array($complexNumber)) {
239 239
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
263 263
      *            with the same dimensions
264 264
      */
265
-    public static function IMSIN(array|string $complexNumber): array|string
265
+    public static function IMSIN(array | string $complexNumber): array | string
266 266
     {
267 267
         if (is_array($complexNumber)) {
268 268
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
292 292
      *            with the same dimensions
293 293
      */
294
-    public static function IMSINH(array|string $complexNumber): array|string
294
+    public static function IMSINH(array | string $complexNumber): array | string
295 295
     {
296 296
         if (is_array($complexNumber)) {
297 297
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
321 321
      *            with the same dimensions
322 322
      */
323
-    public static function IMSEC(array|string $complexNumber): array|string
323
+    public static function IMSEC(array | string $complexNumber): array | string
324 324
     {
325 325
         if (is_array($complexNumber)) {
326 326
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
350 350
      *            with the same dimensions
351 351
      */
352
-    public static function IMSECH(array|string $complexNumber): array|string
352
+    public static function IMSECH(array | string $complexNumber): array | string
353 353
     {
354 354
         if (is_array($complexNumber)) {
355 355
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
379 379
      *            with the same dimensions
380 380
      */
381
-    public static function IMTAN(array|string $complexNumber): array|string
381
+    public static function IMTAN(array | string $complexNumber): array | string
382 382
     {
383 383
         if (is_array($complexNumber)) {
384 384
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
408 408
      *            with the same dimensions
409 409
      */
410
-    public static function IMSQRT(array|string $complexNumber): array|string
410
+    public static function IMSQRT(array | string $complexNumber): array | string
411 411
     {
412 412
         if (is_array($complexNumber)) {
413 413
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
442 442
      *            with the same dimensions
443 443
      */
444
-    public static function IMLN(array|string $complexNumber): array|string
444
+    public static function IMLN(array | string $complexNumber): array | string
445 445
     {
446 446
         if (is_array($complexNumber)) {
447 447
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
475 475
      *            with the same dimensions
476 476
      */
477
-    public static function IMLOG10(array|string $complexNumber): array|string
477
+    public static function IMLOG10(array | string $complexNumber): array | string
478 478
     {
479 479
         if (is_array($complexNumber)) {
480 480
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
508 508
      *            with the same dimensions
509 509
      */
510
-    public static function IMLOG2(array|string $complexNumber): array|string
510
+    public static function IMLOG2(array | string $complexNumber): array | string
511 511
     {
512 512
         if (is_array($complexNumber)) {
513 513
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
541 541
      *            with the same dimensions
542 542
      */
543
-    public static function IMEXP(array|string $complexNumber): array|string
543
+    public static function IMEXP(array | string $complexNumber): array | string
544 544
     {
545 545
         if (is_array($complexNumber)) {
546 546
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $complexNumber);
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
      * @return array|string If an array of numbers is passed as an argument, then the returned result will also be an array
572 572
      *            with the same dimensions
573 573
      */
574
-    public static function IMPOWER(array|string $complexNumber, array|float|int|string $realNumber): array|string
574
+    public static function IMPOWER(array | string $complexNumber, array | float | int | string $realNumber): array | string
575 575
     {
576 576
         if (is_array($complexNumber) || is_array($realNumber)) {
577 577
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $complexNumber, $realNumber);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/LookupRef/Indirect.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     /**
36 36
      * Convert cellAddress to string, verify not null string.
37 37
      */
38
-    private static function validateAddress(array|string|null $cellAddress): string
38
+    private static function validateAddress(array | string | null $cellAddress): string
39 39
     {
40 40
         $cellAddress = Functions::flattenSingleValue($cellAddress);
41 41
         if (!is_string($cellAddress) || !$cellAddress) {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      *
62 62
      * @return array|string An array containing a cell or range of cells, or a string on error
63 63
      */
64
-    public static function INDIRECT($cellAddress, mixed $a1fmt, Cell $cell): string|array
64
+    public static function INDIRECT($cellAddress, mixed $a1fmt, Cell $cell): string | array
65 65
     {
66 66
         [$baseCol, $baseRow] = Coordinate::indexesFromString($cell->getCoordinate());
67 67
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      *
33 33
      * @return array|float|int|string The relative position of the found item
34 34
      */
35
-    public static function MATCH(mixed $lookupValue, mixed $lookupArray, mixed $matchType = self::MATCHTYPE_LARGEST_VALUE): array|string|int|float
35
+    public static function MATCH(mixed $lookupValue, mixed $lookupArray, mixed $matchType = self::MATCHTYPE_LARGEST_VALUE): array | string | int | float
36 36
     {
37 37
         if (is_array($lookupValue)) {
38 38
             return self::evaluateArrayArgumentsIgnore([self::class, __FUNCTION__], 1, $lookupValue, $lookupArray, $matchType);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         return ExcelError::NA();
78 78
     }
79 79
 
80
-    private static function matchFirstValue(array $lookupArray, mixed $lookupValue): int|string|null
80
+    private static function matchFirstValue(array $lookupArray, mixed $lookupValue): int | string | null
81 81
     {
82 82
         if (is_string($lookupValue)) {
83 83
             $valueIsString = true;
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         return null;
148 148
     }
149 149
 
150
-    private static function matchSmallestValue(array $lookupArray, mixed $lookupValue): int|string|null
150
+    private static function matchSmallestValue(array $lookupArray, mixed $lookupValue): int | string | null
151 151
     {
152 152
         $valueKey = null;
153 153
         if (is_string($lookupValue)) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/LookupRef/Address.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
      * @return array|string If an array of values is passed as the $testValue argument, then the returned result will also be
48 48
      *            an array with the same dimensions
49 49
      */
50
-    public static function cell(mixed $row, mixed $column, mixed $relativity = 1, mixed $referenceStyle = true, mixed $sheetName = ''): array|string
50
+    public static function cell(mixed $row, mixed $column, mixed $relativity = 1, mixed $referenceStyle = true, mixed $sheetName = ''): array | string
51 51
     {
52 52
         if (
53 53
             is_array($row) || is_array($column)
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/LookupRef/Offset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      *
42 42
      * @return array|string An array containing a cell or range of cells, or a string on error
43 43
      */
44
-    public static function OFFSET(?string $cellAddress = null, mixed $rows = 0, mixed $columns = 0, mixed $height = null, mixed $width = null, ?Cell $cell = null): string|array
44
+    public static function OFFSET(?string $cellAddress = null, mixed $rows = 0, mixed $columns = 0, mixed $height = null, mixed $width = null, ?Cell $cell = null): string | array
45 45
     {
46 46
         $rows = Functions::flattenSingleValue($rows);
47 47
         $columns = Functions::flattenSingleValue($columns);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTimeExcel/Days.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      *         If an array of values is passed for the $startDate or $endDays,arguments, then the returned result
32 32
      *            will also be an array with matching dimensions
33 33
      */
34
-    public static function between(array|DateTimeInterface|float|int|string $endDate, array|DateTimeInterface|float|int|string $startDate): array|int|string
34
+    public static function between(array | DateTimeInterface | float | int | string $endDate, array | DateTimeInterface | float | int | string $startDate): array | int | string
35 35
     {
36 36
         if (is_array($endDate) || is_array($startDate)) {
37 37
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $endDate, $startDate);
Please login to merge, or discard this patch.