Failed Conditions
Pull Request — master (#3723)
by Adrien
13:34
created
src/PhpSpreadsheet/Calculation/Statistical/Deviations.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      *
18 18
      * @param mixed ...$args Data values
19 19
      */
20
-    public static function sumSquares(mixed ...$args): string|float
20
+    public static function sumSquares(mixed ...$args): string | float
21 21
     {
22 22
         $aArgs = Functions::flattenArrayIndexed($args);
23 23
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      *
60 60
      * @return float|string
61 61
      */
62
-    public static function kurtosis(...$args): string|int|float
62
+    public static function kurtosis(...$args): string | int | float
63 63
     {
64 64
         $aArgs = Functions::flattenArrayIndexed($args);
65 65
         $mean = Averages::average($aArgs);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      *
105 105
      * @return float|int|string The result, or a string containing an error
106 106
      */
107
-    public static function skew(...$args): string|int|float
107
+    public static function skew(...$args): string | int | float
108 108
     {
109 109
         $aArgs = Functions::flattenArrayIndexed($args);
110 110
         $mean = Averages::average($aArgs);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/Averages.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      *
21 21
      * @return float|string (string if result is an error)
22 22
      */
23
-    public static function averageDeviations(mixed ...$args): string|float
23
+    public static function averageDeviations(mixed ...$args): string | float
24 24
     {
25 25
         $aArgs = Functions::flattenArrayIndexed($args);
26 26
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      *
70 70
      * @return float|string (string if result is an error)
71 71
      */
72
-    public static function average(mixed ...$args): string|int|float
72
+    public static function average(mixed ...$args): string | int | float
73 73
     {
74 74
         $returnValue = $aCount = 0;
75 75
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      *
109 109
      * @return float|string (string if result is an error)
110 110
      */
111
-    public static function averageA(mixed ...$args): string|int|float
111
+    public static function averageA(mixed ...$args): string | int | float
112 112
     {
113 113
         $returnValue = null;
114 114
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/Trends.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      *
213 213
      * @return array|string The result, or a string containing an error
214 214
      */
215
-    public static function LINEST(array $yValues, $xValues = null, mixed $const = true, mixed $stats = false): string|array
215
+    public static function LINEST(array $yValues, $xValues = null, mixed $const = true, mixed $stats = false): string | array
216 216
     {
217 217
         $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
218 218
         $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats);
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      *
274 274
      * @return array|string The result, or a string containing an error
275 275
      */
276
-    public static function LOGEST(array $yValues, $xValues = null, mixed $const = true, mixed $stats = false): string|array
276
+    public static function LOGEST(array $yValues, $xValues = null, mixed $const = true, mixed $stats = false): string | array
277 277
     {
278 278
         $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
279 279
         $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/Variances.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      *
20 20
      * @return float|string (string if result is an error)
21 21
      */
22
-    public static function VAR(mixed ...$args): float|string
22
+    public static function VAR(mixed ...$args): float | string
23 23
     {
24 24
         $returnValue = ExcelError::DIV0();
25 25
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      *
62 62
      * @return float|string (string if result is an error)
63 63
      */
64
-    public static function VARA(mixed ...$args): string|float
64
+    public static function VARA(mixed ...$args): string | float
65 65
     {
66 66
         $returnValue = ExcelError::DIV0();
67 67
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      *
108 108
      * @return float|string (string if result is an error)
109 109
      */
110
-    public static function VARP(mixed ...$args): float|string
110
+    public static function VARP(mixed ...$args): float | string
111 111
     {
112 112
         // Return value
113 113
         $returnValue = ExcelError::DIV0();
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      *
151 151
      * @return float|string (string if result is an error)
152 152
      */
153
-    public static function VARPA(mixed ...$args): string|float
153
+    public static function VARPA(mixed ...$args): string | float
154 154
     {
155 155
         $returnValue = ExcelError::DIV0();
156 156
 
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
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      *
35 35
      * @return float|string Excel date/time serial value, or string if error
36 36
      */
37
-    public static function getDateValue(mixed $dateValue): float|string
37
+    public static function getDateValue(mixed $dateValue): float | string
38 38
     {
39 39
         try {
40 40
             return DateTimeExcel\Helpers::getDateValue($dateValue);
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      * @return array|\DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,
185 185
      *                        depending on the value of the ReturnDateType flag
186 186
      */
187
-    public static function TIME($hour = 0, $minute = 0, $second = 0): string|float|int|\DateTime|array
187
+    public static function TIME($hour = 0, $minute = 0, $second = 0): string | float | int | \DateTime | array
188 188
     {
189 189
         return DateTimeExcel\Time::fromHMS($hour, $minute, $second);
190 190
     }
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
      * @return array|\Datetime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,
249 249
      *                        depending on the value of the ReturnDateType flag
250 250
      */
251
-    public static function TIMEVALUE($timeValue): string|\Datetime|int|float|array
251
+    public static function TIMEVALUE($timeValue): string | \Datetime | int | float | array
252 252
     {
253 253
         return DateTimeExcel\TimeValue::fromString($timeValue);
254 254
     }
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
      *
333 333
      * @return array|int|string Number of days between start date and end date
334 334
      */
335
-    public static function DAYS360(mixed $startDate = 0, mixed $endDate = 0, $method = false): string|int|array
335
+    public static function DAYS360(mixed $startDate = 0, mixed $endDate = 0, $method = false): string | int | array
336 336
     {
337 337
         return DateTimeExcel\Days360::between($startDate, $endDate, $method);
338 338
     }
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
      *
369 369
      * @return array|float|string fraction of the year, or a string containing an error
370 370
      */
371
-    public static function YEARFRAC(mixed $startDate = 0, mixed $endDate = 0, $method = 0): string|int|float|array
371
+    public static function YEARFRAC(mixed $startDate = 0, mixed $endDate = 0, $method = 0): string | int | float | array
372 372
     {
373 373
         return DateTimeExcel\YearFrac::fraction($startDate, $endDate, $method);
374 374
     }
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
      *
396 396
      * @return array|int|string Interval between the dates
397 397
      */
398
-    public static function NETWORKDAYS(mixed $startDate, mixed $endDate, mixed ...$dateArgs): string|int|array
398
+    public static function NETWORKDAYS(mixed $startDate, mixed $endDate, mixed ...$dateArgs): string | int | array
399 399
     {
400 400
         return DateTimeExcel\NetworkDays::count($startDate, $endDate, ...$dateArgs);
401 401
     }
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
      *
448 448
      * @return array|int|string Day of the month
449 449
      */
450
-    public static function DAYOFMONTH(mixed $dateValue = 1): int|string|array
450
+    public static function DAYOFMONTH(mixed $dateValue = 1): int | string | array
451 451
     {
452 452
         return DateTimeExcel\DateParts::day($dateValue);
453 453
     }
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
      *
475 475
      * @return array|int|string Day of the week value
476 476
      */
477
-    public static function WEEKDAY($dateValue = 1, $style = 1): string|int|array
477
+    public static function WEEKDAY($dateValue = 1, $style = 1): string | int | array
478 478
     {
479 479
         return DateTimeExcel\Week::day($dateValue, $style);
480 480
     }
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
      *
686 686
      * @return array|int|string Week Number
687 687
      */
688
-    public static function WEEKNUM(mixed $dateValue = 1, $method = /** @scrutinizer ignore-deprecated */ self::STARTWEEK_SUNDAY): int|string|array
688
+    public static function WEEKNUM(mixed $dateValue = 1, $method = /** @scrutinizer ignore-deprecated */ self::STARTWEEK_SUNDAY): int | string | array
689 689
     {
690 690
         return DateTimeExcel\Week::number($dateValue, $method);
691 691
     }
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
      *
708 708
      * @return array|int|string Week Number
709 709
      */
710
-    public static function ISOWEEKNUM(mixed $dateValue = 1): int|string|array
710
+    public static function ISOWEEKNUM(mixed $dateValue = 1): int | string | array
711 711
     {
712 712
         return DateTimeExcel\Week::isoWeekNumber($dateValue);
713 713
     }
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
      *
731 731
      * @return array|int|string Month of the year
732 732
      */
733
-    public static function MONTHOFYEAR(mixed $dateValue = 1): string|int|array
733
+    public static function MONTHOFYEAR(mixed $dateValue = 1): string | int | array
734 734
     {
735 735
         return DateTimeExcel\DateParts::month($dateValue);
736 736
     }
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
      *
754 754
      * @return array|int|string Year
755 755
      */
756
-    public static function YEAR(mixed $dateValue = 1): string|int|array
756
+    public static function YEAR(mixed $dateValue = 1): string | int | array
757 757
     {
758 758
         return DateTimeExcel\DateParts::year($dateValue);
759 759
     }
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
      *
777 777
      * @return array|int|string Hour
778 778
      */
779
-    public static function HOUROFDAY(mixed $timeValue = 0): string|int|array
779
+    public static function HOUROFDAY(mixed $timeValue = 0): string | int | array
780 780
     {
781 781
         return DateTimeExcel\TimeParts::hour($timeValue);
782 782
     }
@@ -799,7 +799,7 @@  discard block
 block discarded – undo
799 799
      *
800 800
      * @return array|int|string Minute
801 801
      */
802
-    public static function MINUTE(mixed $timeValue = 0): string|int|array
802
+    public static function MINUTE(mixed $timeValue = 0): string | int | array
803 803
     {
804 804
         return DateTimeExcel\TimeParts::minute($timeValue);
805 805
     }
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
      *
823 823
      * @return array|int|string Second
824 824
      */
825
-    public static function SECOND(mixed $timeValue = 0): string|int|array
825
+    public static function SECOND(mixed $timeValue = 0): string | int | array
826 826
     {
827 827
         return DateTimeExcel\TimeParts::second($timeValue);
828 828
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTimeExcel/NetworkDays.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      *         If an array of values is passed for the $startDate or $endDate arguments, then the returned result
34 34
      *            will also be an array with matching dimensions
35 35
      */
36
-    public static function count(mixed $startDate, mixed $endDate, mixed ...$dateArgs): array|string|int
36
+    public static function count(mixed $startDate, mixed $endDate, mixed ...$dateArgs): array | string | int
37 37
     {
38 38
         if (is_array($startDate) || is_array($endDate)) {
39 39
             return self::evaluateArrayArgumentsSubset(
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTimeExcel/Week.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      *         If an array of values is passed as the argument, then the returned result will also be an array
46 46
      *            with the same dimensions
47 47
      */
48
-    public static function number(mixed $dateValue, $method = Constants::STARTWEEK_SUNDAY): array|int|string
48
+    public static function number(mixed $dateValue, $method = Constants::STARTWEEK_SUNDAY): array | int | string
49 49
     {
50 50
         if (is_array($dateValue) || is_array($method)) {
51 51
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $dateValue, $method);
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
106 106
      *            with the same dimensions
107 107
      */
108
-    public static function isoWeekNumber(mixed $dateValue): array|int|string
108
+    public static function isoWeekNumber(mixed $dateValue): array | int | string
109 109
     {
110 110
         if (is_array($dateValue)) {
111 111
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue);
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      *         If an array of values is passed as the argument, then the returned result will also be an array
151 151
      *            with the same dimensions
152 152
      */
153
-    public static function day($dateValue, mixed $style = 1): array|string|int
153
+    public static function day($dateValue, mixed $style = 1): array | string | int
154 154
     {
155 155
         if (is_array($dateValue) || is_array($style)) {
156 156
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $dateValue, $style);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTimeExcel/YearFrac.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      *         If an array of values is passed for the $startDate or $endDays,arguments, then the returned result
44 44
      *            will also be an array with matching dimensions
45 45
      */
46
-    public static function fraction(mixed $startDate, mixed $endDate, $method = 0): array|string|int|float
46
+    public static function fraction(mixed $startDate, mixed $endDate, $method = 0): array | string | int | float
47 47
     {
48 48
         if (is_array($startDate) || is_array($endDate) || is_array($method)) {
49 49
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $startDate, $endDate, $method);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
29 29
      *            with the same dimensions
30 30
      */
31
-    public static function day(mixed $dateValue): array|int|string
31
+    public static function day(mixed $dateValue): array | int | string
32 32
     {
33 33
         if (is_array($dateValue)) {
34 34
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
70 70
      *            with the same dimensions
71 71
      */
72
-    public static function month(mixed $dateValue): array|string|int
72
+    public static function month(mixed $dateValue): array | string | int
73 73
     {
74 74
         if (is_array($dateValue)) {
75 75
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue);
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
109 109
      *            with the same dimensions
110 110
      */
111
-    public static function year(mixed $dateValue): array|string|int
111
+    public static function year(mixed $dateValue): array | string | int
112 112
     {
113 113
         if (is_array($dateValue)) {
114 114
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue);
Please login to merge, or discard this patch.