Passed
Pull Request — master (#3718)
by Adrien
12:54
created
Category
src/PhpSpreadsheet/Calculation/TextData/Replace.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      *         If an array of values is passed for either of the arguments, then the returned result
30 30
      *            will also be an array with matching dimensions
31 31
      */
32
-    public static function replace($oldText, $start, $chars, $newText): array|string
32
+    public static function replace($oldText, $start, $chars, $newText): array | string
33 33
     {
34 34
         if (is_array($oldText) || is_array($start) || is_array($chars) || is_array($newText)) {
35 35
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $oldText, $start, $chars, $newText);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      *         If an array of values is passed for either of the arguments, then the returned result
71 71
      *            will also be an array with matching dimensions
72 72
      */
73
-    public static function substitute($text = '', $fromText = '', $toText = '', $instance = null): array|string
73
+    public static function substitute($text = '', $fromText = '', $toText = '', $instance = null): array | string
74 74
     {
75 75
         if (is_array($text) || is_array($fromText) || is_array($toText) || is_array($instance)) {
76 76
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $text, $fromText, $toText, $instance);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/TextData/Text.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      *         If an array of values is passed for the argument, then the returned result
22 22
      *            will also be an array with matching dimensions
23 23
      */
24
-    public static function length($value = ''): array|int
24
+    public static function length($value = ''): array | int
25 25
     {
26 26
         if (is_array($value)) {
27 27
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      *         If an array of values is passed for either of the arguments, then the returned result
47 47
      *            will also be an array with matching dimensions
48 48
      */
49
-    public static function exact($value1, $value2): array|bool
49
+    public static function exact($value1, $value2): array | bool
50 50
     {
51 51
         if (is_array($value1) || is_array($value2)) {
52 52
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $value1, $value2);
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      *         If an array of values is passed for the argument, then the returned result
69 69
      *            will also be an array with matching dimensions
70 70
      */
71
-    public static function test($testValue = ''): array|string
71
+    public static function test($testValue = ''): array | string
72 72
     {
73 73
         if (is_array($testValue)) {
74 74
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $testValue);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      *         If an array of values is passed as the argument, then the returned result will also be an array
21 21
      *            with the same dimensions
22 22
      */
23
-    public static function character($character): array|string
23
+    public static function character($character): array | string
24 24
     {
25 25
         if (is_array($character)) {
26 26
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $character);
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      *         If an array of values is passed as the argument, then the returned result will also be an array
47 47
      *            with the same dimensions
48 48
      */
49
-    public static function code($characters): array|string|int
49
+    public static function code($characters): array | string | int
50 50
     {
51 51
         if (is_array($characters)) {
52 52
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $characters);
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
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
      *
55 55
      * @param mixed $value Value to check
56 56
      */
57
-    public static function type($value = ''): array|int|string
57
+    public static function type($value = ''): array | int | string
58 58
     {
59 59
         if (is_array($value)) {
60 60
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Information/Value.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      *         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($value = null): array|bool
27
+    public static function isBlank($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
      *         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($value = null): array|string|bool
76
+    public static function isEven($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
      *         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($value = null): array|string|bool
101
+    public static function isOdd($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
      *         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($value = null): array|bool
126
+    public static function isNumber($value = null): array | bool
127 127
     {
128 128
         if (is_array($value)) {
129 129
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      *         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 isLogical($value = null): array|bool
149
+    public static function isLogical($value = null): array | bool
150 150
     {
151 151
         if (is_array($value)) {
152 152
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
166 166
      *            with the same dimensions
167 167
      */
168
-    public static function isText($value = null): array|bool
168
+    public static function isText($value = null): array | bool
169 169
     {
170 170
         if (is_array($value)) {
171 171
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
185 185
      *            with the same dimensions
186 186
      */
187
-    public static function isNonText($value = null): array|bool
187
+    public static function isNonText($value = null): array | bool
188 188
     {
189 189
         if (is_array($value)) {
190 190
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
Please login to merge, or discard this patch.
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
      *         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($value = ''): array|bool
21
+    public static function isErr($value = ''): array | bool
22 22
     {
23 23
         if (is_array($value)) {
24 24
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
38 38
      *            with the same dimensions
39 39
      */
40
-    public static function isError($value = ''): array|bool
40
+    public static function isError($value = ''): array | bool
41 41
     {
42 42
         if (is_array($value)) {
43 43
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
61 61
      *            with the same dimensions
62 62
      */
63
-    public static function isNa($value = ''): array|bool
63
+    public static function isNa($value = ''): array | bool
64 64
     {
65 65
         if (is_array($value)) {
66 66
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Logical.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
      *
160 160
      * @return array|bool|string the boolean inverse of the argument
161 161
      */
162
-    public static function NOT($logical = false): bool|string|array
162
+    public static function NOT($logical = false): bool | string | array
163 163
     {
164 164
         return Logical\Operations::NOT($logical);
165 165
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Engineering.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      *                                If places is nonnumeric, DEC2BIN returns the #VALUE! error value.
242 242
      *                                If places is zero or negative, DEC2BIN returns the #NUM! error value.
243 243
      */
244
-    public static function DECTOBIN($x, $places = null): string|array
244
+    public static function DECTOBIN($x, $places = null): string | array
245 245
     {
246 246
         return Engineering\ConvertDecimal::toBinary($x, $places);
247 247
     }
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      *                                If places is nonnumeric, DEC2HEX returns the #VALUE! error value.
276 276
      *                                If places is zero or negative, DEC2HEX returns the #NUM! error value.
277 277
      */
278
-    public static function DECTOHEX($x, $places = null): string|array
278
+    public static function DECTOHEX($x, $places = null): string | array
279 279
     {
280 280
         return Engineering\ConvertDecimal::toHex($x, $places);
281 281
     }
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      *                                If places is nonnumeric, DEC2OCT returns the #VALUE! error value.
310 310
      *                                If places is zero or negative, DEC2OCT returns the #NUM! error value.
311 311
      */
312
-    public static function DECTOOCT($x, $places = null): string|array
312
+    public static function DECTOOCT($x, $places = null): string | array
313 313
     {
314 314
         return Engineering\ConvertDecimal::toOctal($x, $places);
315 315
     }
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
      *                                    If places is nonnumeric, OCT2HEX returns the #VALUE! error value.
517 517
      *                                    If places is negative, OCT2HEX returns the #NUM! error value.
518 518
      */
519
-    public static function OCTTOHEX($x, $places = null): string|array
519
+    public static function OCTTOHEX($x, $places = null): string | array
520 520
     {
521 521
         return Engineering\ConvertOctal::toHex($x, $places);
522 522
     }
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
      * @param string $complexNumber the complex number for which you want the imaginary
561 561
      *                                         coefficient
562 562
      */
563
-    public static function IMAGINARY($complexNumber): string|float|array
563
+    public static function IMAGINARY($complexNumber): string | float | array
564 564
     {
565 565
         return Engineering\Complex::IMAGINARY($complexNumber);
566 566
     }
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
      *
580 580
      * @param string $complexNumber the complex number for which you want the real coefficient
581 581
      */
582
-    public static function IMREAL($complexNumber): string|float|array
582
+    public static function IMREAL($complexNumber): string | float | array
583 583
     {
584 584
         return Engineering\Complex::IMREAL($complexNumber);
585 585
     }
@@ -1247,7 +1247,7 @@  discard block
 block discarded – undo
1247 1247
      * @param float $upper upper bound for integrating ERF.
1248 1248
      *                                If omitted, ERF integrates between zero and lower_limit
1249 1249
      */
1250
-    public static function ERF($lower, $upper = null): float|string|array
1250
+    public static function ERF($lower, $upper = null): float | string | array
1251 1251
     {
1252 1252
         return Engineering\Erf::ERF($lower, $upper);
1253 1253
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTime.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      *
37 37
      * @return float|string Excel date/time serial value, or string if error
38 38
      */
39
-    public static function getDateValue($dateValue): float|string
39
+    public static function getDateValue($dateValue): float | string
40 40
     {
41 41
         try {
42 42
             return DateTimeExcel\Helpers::getDateValue($dateValue);
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      * @return array|\DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,
187 187
      *                        depending on the value of the ReturnDateType flag
188 188
      */
189
-    public static function TIME($hour = 0, $minute = 0, $second = 0): string|float|int|\DateTime|array
189
+    public static function TIME($hour = 0, $minute = 0, $second = 0): string | float | int | \DateTime | array
190 190
     {
191 191
         return DateTimeExcel\Time::fromHMS($hour, $minute, $second);
192 192
     }
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
      * @return array|\Datetime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,
251 251
      *                        depending on the value of the ReturnDateType flag
252 252
      */
253
-    public static function TIMEVALUE($timeValue): string|\Datetime|int|float|array
253
+    public static function TIMEVALUE($timeValue): string | \Datetime | int | float | array
254 254
     {
255 255
         return DateTimeExcel\TimeValue::fromString($timeValue);
256 256
     }
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
      *
335 335
      * @return array|int|string Number of days between start date and end date
336 336
      */
337
-    public static function DAYS360($startDate = 0, $endDate = 0, $method = false): string|int|array
337
+    public static function DAYS360($startDate = 0, $endDate = 0, $method = false): string | int | array
338 338
     {
339 339
         return DateTimeExcel\Days360::between($startDate, $endDate, $method);
340 340
     }
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
      *
371 371
      * @return array|float|string fraction of the year, or a string containing an error
372 372
      */
373
-    public static function YEARFRAC($startDate = 0, $endDate = 0, $method = 0): string|int|float|array
373
+    public static function YEARFRAC($startDate = 0, $endDate = 0, $method = 0): string | int | float | array
374 374
     {
375 375
         return DateTimeExcel\YearFrac::fraction($startDate, $endDate, $method);
376 376
     }
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
      *
399 399
      * @return array|int|string Interval between the dates
400 400
      */
401
-    public static function NETWORKDAYS($startDate, $endDate, ...$dateArgs): string|int|array
401
+    public static function NETWORKDAYS($startDate, $endDate, ...$dateArgs): string | int | array
402 402
     {
403 403
         return DateTimeExcel\NetworkDays::count($startDate, $endDate, ...$dateArgs);
404 404
     }
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
      *
452 452
      * @return array|int|string Day of the month
453 453
      */
454
-    public static function DAYOFMONTH($dateValue = 1): int|string|array
454
+    public static function DAYOFMONTH($dateValue = 1): int | string | array
455 455
     {
456 456
         return DateTimeExcel\DateParts::day($dateValue);
457 457
     }
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
      *
479 479
      * @return array|int|string Day of the week value
480 480
      */
481
-    public static function WEEKDAY($dateValue = 1, $style = 1): string|int|array
481
+    public static function WEEKDAY($dateValue = 1, $style = 1): string | int | array
482 482
     {
483 483
         return DateTimeExcel\Week::day($dateValue, $style);
484 484
     }
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
      *
690 690
      * @return array|int|string Week Number
691 691
      */
692
-    public static function WEEKNUM($dateValue = 1, $method = /** @scrutinizer ignore-deprecated */ self::STARTWEEK_SUNDAY): int|string|array
692
+    public static function WEEKNUM($dateValue = 1, $method = /** @scrutinizer ignore-deprecated */ self::STARTWEEK_SUNDAY): int | string | array
693 693
     {
694 694
         return DateTimeExcel\Week::number($dateValue, $method);
695 695
     }
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
      *
712 712
      * @return array|int|string Week Number
713 713
      */
714
-    public static function ISOWEEKNUM($dateValue = 1): int|string|array
714
+    public static function ISOWEEKNUM($dateValue = 1): int | string | array
715 715
     {
716 716
         return DateTimeExcel\Week::isoWeekNumber($dateValue);
717 717
     }
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
      *
735 735
      * @return array|int|string Month of the year
736 736
      */
737
-    public static function MONTHOFYEAR($dateValue = 1): string|int|array
737
+    public static function MONTHOFYEAR($dateValue = 1): string | int | array
738 738
     {
739 739
         return DateTimeExcel\DateParts::month($dateValue);
740 740
     }
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
      *
758 758
      * @return array|int|string Year
759 759
      */
760
-    public static function YEAR($dateValue = 1): string|int|array
760
+    public static function YEAR($dateValue = 1): string | int | array
761 761
     {
762 762
         return DateTimeExcel\DateParts::year($dateValue);
763 763
     }
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
      *
781 781
      * @return array|int|string Hour
782 782
      */
783
-    public static function HOUROFDAY($timeValue = 0): string|int|array
783
+    public static function HOUROFDAY($timeValue = 0): string | int | array
784 784
     {
785 785
         return DateTimeExcel\TimeParts::hour($timeValue);
786 786
     }
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
      *
804 804
      * @return array|int|string Minute
805 805
      */
806
-    public static function MINUTE($timeValue = 0): string|int|array
806
+    public static function MINUTE($timeValue = 0): string | int | array
807 807
     {
808 808
         return DateTimeExcel\TimeParts::minute($timeValue);
809 809
     }
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
      *
827 827
      * @return array|int|string Second
828 828
      */
829
-    public static function SECOND($timeValue = 0): string|int|array
829
+    public static function SECOND($timeValue = 0): string | int | array
830 830
     {
831 831
         return DateTimeExcel\TimeParts::second($timeValue);
832 832
     }
Please login to merge, or discard this patch.