Passed
Push — master ( dbed77...896806 )
by Adrien
12:38
created
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, array|int|string|null $method = Constants::STARTWEEK_SUNDAY): array|int|string
48
+    public static function number(mixed $dateValue, array | int | string | null $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(null|array|float|int|string|bool $dateValue, mixed $style = 1): array|string|int
153
+    public static function day(null | array | float | int | string | bool $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/MathTrig/Helpers.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      *
14 14
      * @return float|string quotient or DIV0 if denominator is too small
15 15
      */
16
-    public static function verySmallDenominator(float $numerator, float $denominator): string|float
16
+    public static function verySmallDenominator(float $numerator, float $denominator): string | float
17 17
     {
18 18
         return (abs($denominator) < 1.0E-12) ? ExcelError::DIV0() : ($numerator / $denominator);
19 19
     }
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     /**
22 22
      * Many functions accept null/false/true argument treated as 0/0/1.
23 23
      */
24
-    public static function validateNumericNullBool(mixed $number): int|float
24
+    public static function validateNumericNullBool(mixed $number): int | float
25 25
     {
26 26
         $number = Functions::flattenSingleValue($number);
27 27
         if ($number === null) {
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     /**
41 41
      * Validate numeric, but allow substitute for null.
42 42
      */
43
-    public static function validateNumericNullSubstitution(mixed $number, null|float|int $substitute): float|int
43
+    public static function validateNumericNullSubstitution(mixed $number, null | float | int $substitute): float | int
44 44
     {
45 45
         $number = Functions::flattenSingleValue($number);
46 46
         if ($number === null && $substitute !== null) {
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     /**
57 57
      * Confirm number >= 0.
58 58
      */
59
-    public static function validateNotNegative(float|int $number, ?string $except = null): void
59
+    public static function validateNotNegative(float | int $number, ?string $except = null): void
60 60
     {
61 61
         if ($number >= 0) {
62 62
             return;
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     /**
69 69
      * Confirm number > 0.
70 70
      */
71
-    public static function validatePositive(float|int $number, ?string $except = null): void
71
+    public static function validatePositive(float | int $number, ?string $except = null): void
72 72
     {
73 73
         if ($number > 0) {
74 74
             return;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     /**
81 81
      * Confirm number != 0.
82 82
      */
83
-    public static function validateNotZero(float|int $number): void
83
+    public static function validateNotZero(float | int $number): void
84 84
     {
85 85
         if ($number) {
86 86
             return;
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     /**
105 105
      * Return NAN or value depending on argument.
106 106
      */
107
-    public static function numberOrNan(float $result): float|string
107
+    public static function numberOrNan(float $result): float | string
108 108
     {
109 109
         return is_nan($result) ? ExcelError::NAN() : $result;
110 110
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Gcd.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      * Excel Function:
19 19
      *        GCD(number1[,number2[, ...]])
20 20
      */
21
-    private static function evaluateGCD(float|int $a, float|int $b): float|int
21
+    private static function evaluateGCD(float | int $a, float | int $b): float | int
22 22
     {
23 23
         return $b ? self::evaluateGCD($b, $a % $b) : $a;
24 24
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      *
19 19
      * @param mixed ...$args Data values
20 20
      */
21
-    public static function sumSquare(mixed ...$args): string|int|float
21
+    public static function sumSquare(mixed ...$args): string | int | float
22 22
     {
23 23
         try {
24 24
             $returnValue = 0;
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * @param mixed[] $matrixData1 Matrix #1
60 60
      * @param mixed[] $matrixData2 Matrix #2
61 61
      */
62
-    public static function sumXSquaredMinusYSquared(array $matrixData1, array $matrixData2): string|int|float
62
+    public static function sumXSquaredMinusYSquared(array $matrixData1, array $matrixData2): string | int | float
63 63
     {
64 64
         try {
65 65
             $array1 = Functions::flattenArray($matrixData1);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      * @param mixed[] $matrixData1 Matrix #1
86 86
      * @param mixed[] $matrixData2 Matrix #2
87 87
      */
88
-    public static function sumXSquaredPlusYSquared(array $matrixData1, array $matrixData2): string|int|float
88
+    public static function sumXSquaredPlusYSquared(array $matrixData1, array $matrixData2): string | int | float
89 89
     {
90 90
         try {
91 91
             $array1 = Functions::flattenArray($matrixData1);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @param mixed[] $matrixData1 Matrix #1
112 112
      * @param mixed[] $matrixData2 Matrix #2
113 113
      */
114
-    public static function sumXMinusYSquared(array $matrixData1, array $matrixData2): string|int|float
114
+    public static function sumXMinusYSquared(array $matrixData1, array $matrixData2): string | int | float
115 115
     {
116 116
         try {
117 117
             $array1 = Functions::flattenArray($matrixData1);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
      *                    in hidden rows
84 84
      * @param mixed[] $args A mixed data series of values
85 85
      */
86
-    public static function evaluate(mixed $functionType, ...$args): float|int|string
86
+    public static function evaluate(mixed $functionType, ...$args): float | int | string
87 87
     {
88 88
         $cellReference = array_pop($args);
89 89
         $bArgs = Functions::flattenArrayIndexed($args);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/SeriesSum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      *
23 23
      * @return array|float|int|string The result, or a string containing an error
24 24
      */
25
-    public static function evaluate(mixed $x, mixed $n, mixed $m, ...$args): array|string|float|int
25
+    public static function evaluate(mixed $x, mixed $n, mixed $m, ...$args): array | string | float | int
26 26
     {
27 27
         if (is_array($x) || is_array($n) || is_array($m)) {
28 28
             return self::evaluateArrayArgumentsSubset([self::class, __FUNCTION__], 3, $x, $n, $m, ...$args);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Factorial.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
28 28
      *            with the same dimensions
29 29
      */
30
-    public static function fact($factVal): array|string|float|int
30
+    public static function fact($factVal): array | string | float | int
31 31
     {
32 32
         if (is_array($factVal)) {
33 33
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $factVal);
@@ -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 factDouble($factVal): array|string|float|int
72
+    public static function factDouble($factVal): array | string | float | int
73 73
     {
74 74
         if (is_array($factVal)) {
75 75
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $factVal);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      *
102 102
      * @return float|int|string The result, or a string containing an error
103 103
      */
104
-    public static function multinomial(...$args): string|int|float
104
+    public static function multinomial(...$args): string | int | float
105 105
     {
106 106
         $summer = 0;
107 107
         $divisor = 1;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Operations.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
24 24
      *            with the same dimensions
25 25
      */
26
-    public static function mod(mixed $dividend, mixed $divisor): array|string|float
26
+    public static function mod(mixed $dividend, mixed $divisor): array | string | float
27 27
     {
28 28
         if (is_array($dividend) || is_array($divisor)) {
29 29
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $dividend, $divisor);
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
60 60
      *            with the same dimensions
61 61
      */
62
-    public static function power(array|float|int|string $x, array|float|int|string $y): array|float|int|string
62
+    public static function power(array | float | int | string $x, array | float | int | string $y): array | float | int | string
63 63
     {
64 64
         if (is_array($x) || is_array($y)) {
65 65
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $x, $y);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      *
97 97
      * @param mixed ...$args Data values
98 98
      */
99
-    public static function product(mixed ...$args): string|float
99
+    public static function product(mixed ...$args): string | float
100 100
     {
101 101
         $args = array_filter(
102 102
             Functions::flattenArray($args),
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      * @return array|int|string If an array of numbers is passed as an argument, then the returned result will also be an array
137 137
      *            with the same dimensions
138 138
      */
139
-    public static function quotient(mixed $numerator, mixed $denominator): array|string|int
139
+    public static function quotient(mixed $numerator, mixed $denominator): array | string | int
140 140
     {
141 141
         if (is_array($numerator) || is_array($denominator)) {
142 142
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $numerator, $denominator);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Sum.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
      *
19 19
      * @param mixed ...$args Data values
20 20
      */
21
-    public static function sumIgnoringStrings(mixed ...$args): float|int|string
21
+    public static function sumIgnoringStrings(mixed ...$args): float | int | string
22 22
     {
23 23
         $returnValue = 0;
24 24
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      *
46 46
      * @param mixed ...$args Data values
47 47
      */
48
-    public static function sumErroringStrings(mixed ...$args): float|int|string|array
48
+    public static function sumErroringStrings(mixed ...$args): float | int | string | array
49 49
     {
50 50
         $returnValue = 0;
51 51
         // Loop through the arguments
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      *
78 78
      * @return float|int|string The result, or a string containing an error
79 79
      */
80
-    public static function product(mixed ...$args): string|int|float
80
+    public static function product(mixed ...$args): string | int | float
81 81
     {
82 82
         $arrayList = $args;
83 83
 
Please login to merge, or discard this patch.