Passed
Pull Request — master (#4465)
by Owen
14:25
created
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/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.
src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/Periodic.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      *                                    calculate the internal rate of return.
30 30
      * @param mixed $guess A number that you guess is close to the result of IRR
31 31
      */
32
-    public static function rate(mixed $values, mixed $guess = 0.1): string|float
32
+    public static function rate(mixed $values, mixed $guess = 0.1): string | float
33 33
     {
34 34
         if (!is_array($values)) {
35 35
             return ExcelError::VALUE();
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      *
98 98
      * @return float|string Result, or a string containing an error
99 99
      */
100
-    public static function modifiedRate(mixed $values, mixed $financeRate, mixed $reinvestmentRate): string|float
100
+    public static function modifiedRate(mixed $values, mixed $financeRate, mixed $reinvestmentRate): string | float
101 101
     {
102 102
         if (!is_array($values)) {
103 103
             return ExcelError::DIV0();
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      *
137 137
      * @param array $args
138 138
      */
139
-    public static function presentValue(mixed $rate, ...$args): int|float
139
+    public static function presentValue(mixed $rate, ...$args): int | float
140 140
     {
141 141
         $returnValue = 0;
142 142
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial/Depreciation.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * @param mixed $month Number of months in the first year. If month is omitted,
34 34
      *                         it defaults to 12.
35 35
      */
36
-    public static function DB(mixed $cost, mixed $salvage, mixed $life, mixed $period, mixed $month = 12): string|float|int
36
+    public static function DB(mixed $cost, mixed $salvage, mixed $life, mixed $period, mixed $month = 12): string | float | int
37 37
     {
38 38
         $cost = Functions::flattenSingleValue($cost);
39 39
         $salvage = Functions::flattenSingleValue($salvage);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      *                                If factor is omitted, it is assumed to be 2 (the
98 98
      *                                double-declining balance method).
99 99
      */
100
-    public static function DDB(mixed $cost, mixed $salvage, mixed $life, mixed $period, mixed $factor = 2.0): float|string
100
+    public static function DDB(mixed $cost, mixed $salvage, mixed $life, mixed $period, mixed $factor = 2.0): float | string
101 101
     {
102 102
         $cost = Functions::flattenSingleValue($cost);
103 103
         $salvage = Functions::flattenSingleValue($salvage);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      *
146 146
      * @return float|string Result, or a string containing an error
147 147
      */
148
-    public static function SLN(mixed $cost, mixed $salvage, mixed $life): string|float
148
+    public static function SLN(mixed $cost, mixed $salvage, mixed $life): string | float
149 149
     {
150 150
         $cost = Functions::flattenSingleValue($cost);
151 151
         $salvage = Functions::flattenSingleValue($salvage);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      *
179 179
      * @return float|string Result, or a string containing an error
180 180
      */
181
-    public static function SYD(mixed $cost, mixed $salvage, mixed $life, mixed $period): string|float
181
+    public static function SYD(mixed $cost, mixed $salvage, mixed $life, mixed $period): string | float
182 182
     {
183 183
         $cost = Functions::flattenSingleValue($cost);
184 184
         $salvage = Functions::flattenSingleValue($salvage);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         mixed $price,
39 39
         mixed $redemption,
40 40
         mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
41
-    ): float|string {
41
+    ): float | string {
42 42
         $settlement = Functions::flattenSingleValue($settlement);
43 43
         $maturity = Functions::flattenSingleValue($maturity);
44 44
         $price = Functions::flattenSingleValue($price);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         mixed $investment,
100 100
         mixed $redemption,
101 101
         mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
102
-    ): float|string {
102
+    ): float | string {
103 103
         $settlement = Functions::flattenSingleValue($settlement);
104 104
         $maturity = Functions::flattenSingleValue($maturity);
105 105
         $investment = Functions::flattenSingleValue($investment);
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
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @return array|bool 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 isBlank(mixed $value = null): array|bool
26
+    public static function isBlank(mixed $value = null): array | bool
27 27
     {
28 28
         if (is_array($value)) {
29 29
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      * @return array|bool|string If an array of numbers is passed as an argument, then the returned result will also be an array
72 72
      *            with the same dimensions
73 73
      */
74
-    public static function isEven(mixed $value = null): array|string|bool
74
+    public static function isEven(mixed $value = null): array | string | bool
75 75
     {
76 76
         if (is_array($value)) {
77 77
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      * @return array|bool|string If an array of numbers is passed as an argument, then the returned result will also be an array
96 96
      *            with the same dimensions
97 97
      */
98
-    public static function isOdd(mixed $value = null): array|string|bool
98
+    public static function isOdd(mixed $value = null): array | string | bool
99 99
     {
100 100
         if (is_array($value)) {
101 101
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      * @return array|bool If an array of numbers is passed as an argument, then the returned result will also be an array
120 120
      *            with the same dimensions
121 121
      */
122
-    public static function isNumber(mixed $value = null): array|bool
122
+    public static function isNumber(mixed $value = null): array | bool
123 123
     {
124 124
         if (is_array($value)) {
125 125
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      * @return array|bool If an array of numbers is passed as an argument, then the returned result will also be an array
142 142
      *            with the same dimensions
143 143
      */
144
-    public static function isLogical(mixed $value = null): array|bool
144
+    public static function isLogical(mixed $value = null): array | bool
145 145
     {
146 146
         if (is_array($value)) {
147 147
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      * @return array|bool If an array of numbers is passed as an argument, then the returned result will also be an array
160 160
      *            with the same dimensions
161 161
      */
162
-    public static function isText(mixed $value = null): array|bool
162
+    public static function isText(mixed $value = null): array | bool
163 163
     {
164 164
         if (is_array($value)) {
165 165
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
      * @return array|bool If an array of numbers is passed as an argument, then the returned result will also be an array
178 178
      *            with the same dimensions
179 179
      */
180
-    public static function isNonText(mixed $value = null): array|bool
180
+    public static function isNonText(mixed $value = null): array | bool
181 181
     {
182 182
         if (is_array($value)) {
183 183
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      * @param mixed $cellReference The cell to check
193 193
      * @param ?Cell $cell The current cell (containing this formula)
194 194
      */
195
-    public static function isFormula(mixed $cellReference = '', ?Cell $cell = null): array|bool|string
195
+    public static function isFormula(mixed $cellReference = '', ?Cell $cell = null): array | bool | string
196 196
     {
197 197
         if ($cell === null) {
198 198
             return ExcelError::REF();
Please login to merge, or discard this patch.
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
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      *
58 58
      * @param array ...$args Data Series
59 59
      */
60
-    public static function kurtosis(...$args): string|int|float
60
+    public static function kurtosis(...$args): string | int | float
61 61
     {
62 62
         $aArgs = Functions::flattenArrayIndexed($args);
63 63
         $mean = Averages::average($aArgs);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      *
103 103
      * @return float|int|string The result, or a string containing an error
104 104
      */
105
-    public static function skew(...$args): string|int|float
105
+    public static function skew(...$args): string | int | float
106 106
     {
107 107
         $aArgs = Functions::flattenArrayIndexed($args);
108 108
         $mean = Averages::average($aArgs);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/Minimum.php 1 patch
Spacing   +2 added lines, -2 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 min(mixed ...$args): float|int|string
21
+    public static function min(mixed ...$args): float | int | string
22 22
     {
23 23
         $returnValue = null;
24 24
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      *
56 56
      * @param mixed ...$args Data values
57 57
      */
58
-    public static function minA(mixed ...$args): float|int|string
58
+    public static function minA(mixed ...$args): float | int | string
59 59
     {
60 60
         $returnValue = null;
61 61
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/Trends.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * @param mixed $yValues array of mixed Data Series Y
66 66
      * @param null|mixed $xValues array of mixed Data Series X
67 67
      */
68
-    public static function CORREL(mixed $yValues, $xValues = null): float|string
68
+    public static function CORREL(mixed $yValues, $xValues = null): float | string
69 69
     {
70 70
         if (($xValues === null) || (!is_array($yValues)) || (!is_array($xValues))) {
71 71
             return ExcelError::VALUE();
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      * @param mixed[] $yValues array of mixed Data Series Y
92 92
      * @param mixed[] $xValues array of mixed Data Series X
93 93
      */
94
-    public static function COVAR(array $yValues, array $xValues): float|string
94
+    public static function COVAR(array $yValues, array $xValues): float | string
95 95
     {
96 96
         try {
97 97
             self::checkTrendArrays($yValues, $xValues);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      * @param mixed[] $yValues Data Series Y
179 179
      * @param mixed[] $xValues Data Series X
180 180
      */
181
-    public static function INTERCEPT(array $yValues, array $xValues): float|string
181
+    public static function INTERCEPT(array $yValues, array $xValues): float | string
182 182
     {
183 183
         try {
184 184
             self::checkTrendArrays($yValues, $xValues);
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
      *
206 206
      * @return array|string The result, or a string containing an error
207 207
      */
208
-    public static function LINEST(array $yValues, ?array $xValues = null, mixed $const = true, mixed $stats = false): string|array
208
+    public static function LINEST(array $yValues, ?array $xValues = null, mixed $const = true, mixed $stats = false): string | array
209 209
     {
210 210
         $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
211 211
         $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats);
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
      *
267 267
      * @return array|string The result, or a string containing an error
268 268
      */
269
-    public static function LOGEST(array $yValues, ?array $xValues = null, mixed $const = true, mixed $stats = false): string|array
269
+    public static function LOGEST(array $yValues, ?array $xValues = null, mixed $const = true, mixed $stats = false): string | array
270 270
     {
271 271
         $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
272 272
         $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats);
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
      * @param mixed[] $yValues Data Series Y
378 378
      * @param mixed[] $xValues Data Series X
379 379
      */
380
-    public static function STEYX(array $yValues, array $xValues): float|string
380
+    public static function STEYX(array $yValues, array $xValues): float | string
381 381
     {
382 382
         try {
383 383
             self::checkTrendArrays($yValues, $xValues);
Please login to merge, or discard this patch.