@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * |
19 | 19 | * @param mixed ...$args Data values |
20 | 20 | */ |
21 | - public static function max(mixed ...$args): float|int|string |
|
21 | + public static function max(mixed ...$args): float | int | string |
|
22 | 22 | { |
23 | 23 | $returnValue = null; |
24 | 24 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * |
56 | 56 | * @param mixed ...$args Data values |
57 | 57 | */ |
58 | - public static function maxA(mixed ...$args): float|int|string |
|
58 | + public static function maxA(mixed ...$args): float | int | string |
|
59 | 59 | { |
60 | 60 | $returnValue = null; |
61 | 61 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @param mixed ...$args Data values |
25 | 25 | */ |
26 | - public static function geometric(mixed ...$args): float|int|string |
|
26 | + public static function geometric(mixed ...$args): float | int | string |
|
27 | 27 | { |
28 | 28 | $aArgs = Functions::flattenArray($args); |
29 | 29 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * |
50 | 50 | * @param mixed ...$args Data values |
51 | 51 | */ |
52 | - public static function harmonic(mixed ...$args): string|float|int |
|
52 | + public static function harmonic(mixed ...$args): string | float | int |
|
53 | 53 | { |
54 | 54 | // Loop through arguments |
55 | 55 | $aArgs = Functions::flattenArray($args); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * |
91 | 91 | * @param mixed $args Data values |
92 | 92 | */ |
93 | - public static function trim(mixed ...$args): float|string |
|
93 | + public static function trim(mixed ...$args): float | string |
|
94 | 94 | { |
95 | 95 | $aArgs = Functions::flattenArray($args); |
96 | 96 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @param null|array|string $condition the criteria that defines which cells will be checked |
29 | 29 | * @param mixed $averageRange Data values |
30 | 30 | */ |
31 | - public static function AVERAGEIF(mixed $range, null|array|string $condition, mixed $averageRange = []): null|int|float|string |
|
31 | + public static function AVERAGEIF(mixed $range, null | array | string $condition, mixed $averageRange = []): null | int | float | string |
|
32 | 32 | { |
33 | 33 | if (!is_array($range) || !is_array($averageRange) || array_key_exists(0, $range) || array_key_exists(0, $averageRange)) { |
34 | 34 | throw new CalcException('Must specify range of cells, not any kind of literal'); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * |
50 | 50 | * @param mixed $args Pairs of Ranges and Criteria |
51 | 51 | */ |
52 | - public static function AVERAGEIFS(mixed ...$args): null|int|float|string |
|
52 | + public static function AVERAGEIFS(mixed ...$args): null | int | float | string |
|
53 | 53 | { |
54 | 54 | if (empty($args)) { |
55 | 55 | return 0.0; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * @param mixed[] $range Data values |
80 | 80 | * @param null|array|string $condition the criteria that defines which cells will be counted |
81 | 81 | */ |
82 | - public static function COUNTIF(array $range, null|array|string $condition): string|int |
|
82 | + public static function COUNTIF(array $range, null | array | string $condition): string | int |
|
83 | 83 | { |
84 | 84 | // Filter out any empty values that shouldn't be included in a COUNT |
85 | 85 | $range = array_filter( |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * |
104 | 104 | * @param mixed $args Pairs of Ranges and Criteria |
105 | 105 | */ |
106 | - public static function COUNTIFS(mixed ...$args): int|string |
|
106 | + public static function COUNTIFS(mixed ...$args): int | string |
|
107 | 107 | { |
108 | 108 | if (empty($args)) { |
109 | 109 | return 0; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | * |
128 | 128 | * @param mixed $args Pairs of Ranges and Criteria |
129 | 129 | */ |
130 | - public static function MAXIFS(mixed ...$args): null|float|string |
|
130 | + public static function MAXIFS(mixed ...$args): null | float | string |
|
131 | 131 | { |
132 | 132 | if (empty($args)) { |
133 | 133 | return 0.0; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * |
150 | 150 | * @param mixed $args Pairs of Ranges and Criteria |
151 | 151 | */ |
152 | - public static function MINIFS(mixed ...$args): null|float|string |
|
152 | + public static function MINIFS(mixed ...$args): null | float | string |
|
153 | 153 | { |
154 | 154 | if (empty($args)) { |
155 | 155 | return 0.0; |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | * |
172 | 172 | * @param array $range Data values |
173 | 173 | */ |
174 | - public static function SUMIF(array $range, mixed $condition, array $sumRange = []): null|float|string |
|
174 | + public static function SUMIF(array $range, mixed $condition, array $sumRange = []): null | float | string |
|
175 | 175 | { |
176 | 176 | $database = self::databaseFromRangeAndValue($range, $sumRange); |
177 | 177 | $condition = [[self::CONDITION_COLUMN_NAME, self::VALUE_COLUMN_NAME], [$condition, null]]; |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | * |
190 | 190 | * @param mixed $args Pairs of Ranges and Criteria |
191 | 191 | */ |
192 | - public static function SUMIFS(mixed ...$args): null|float|string |
|
192 | + public static function SUMIFS(mixed ...$args): null | float | string |
|
193 | 193 | { |
194 | 194 | if (empty($args)) { |
195 | 195 | return 0.0; |
@@ -20,7 +20,7 @@ discard block |
||
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 |
||
69 | 69 | * |
70 | 70 | * @return float|int|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 |
||
108 | 108 | * |
109 | 109 | * @return float|int|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 | |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * |
148 | 148 | * @return float|string The result, or a string containing an error |
149 | 149 | */ |
150 | - public static function median(mixed ...$args): float|string |
|
150 | + public static function median(mixed ...$args): float | string |
|
151 | 151 | { |
152 | 152 | $aArgs = Functions::flattenArray($args); |
153 | 153 | |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | * |
182 | 182 | * @return float|string The result, or a string containing an error |
183 | 183 | */ |
184 | - public static function mode(mixed ...$args): float|string |
|
184 | + public static function mode(mixed ...$args): float | string |
|
185 | 185 | { |
186 | 186 | $returnValue = ExcelError::NA(); |
187 | 187 | |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | * Special variant of array_count_values that isn't limited to strings and integers, |
212 | 212 | * but can work with floating point numbers as values. |
213 | 213 | */ |
214 | - private static function modeCalc(array $data): float|string |
|
214 | + private static function modeCalc(array $data): float | string |
|
215 | 215 | { |
216 | 216 | $frequencyArray = []; |
217 | 217 | $index = 0; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * @return array|float|string If an array of numbers is passed as an argument, then the returned result will also be an array |
28 | 28 | * with the same dimensions |
29 | 29 | */ |
30 | - public static function distribution(mixed $value, mixed $lambda, mixed $cumulative): array|string|float |
|
30 | + public static function distribution(mixed $value, mixed $lambda, mixed $cumulative): array | string | float |
|
31 | 31 | { |
32 | 32 | if (is_array($value) || is_array($lambda) || is_array($cumulative)) { |
33 | 33 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $lambda, $cumulative); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | * @return array|float|int|string If an array of numbers is passed as an argument, then the returned result will also be an array |
82 | 82 | * with the same dimensions |
83 | 83 | */ |
84 | - public static function range(mixed $trials, mixed $probability, mixed $successes, mixed $limit = null): array|string|float|int |
|
84 | + public static function range(mixed $trials, mixed $probability, mixed $successes, mixed $limit = null): array | string | float | int |
|
85 | 85 | { |
86 | 86 | if (is_array($trials) || is_array($probability) || is_array($successes) || is_array($limit)) { |
87 | 87 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $trials, $probability, $successes, $limit); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | * TODO Add support for the cumulative flag not present for NEGBINOMDIST, but introduced for NEGBINOM.DIST |
140 | 140 | * The cumulative default should be false to reflect the behaviour of NEGBINOMDIST |
141 | 141 | */ |
142 | - public static function negative(mixed $failures, mixed $successes, mixed $probability): array|string|float |
|
142 | + public static function negative(mixed $failures, mixed $successes, mixed $probability): array | string | float |
|
143 | 143 | { |
144 | 144 | if (is_array($failures) || is_array($successes) || is_array($probability)) { |
145 | 145 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $failures, $successes, $probability); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | * @return array|int|string 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 inverse(mixed $trials, mixed $probability, mixed $alpha): array|string|int |
|
187 | + public static function inverse(mixed $trials, mixed $probability, mixed $alpha): array | string | int |
|
188 | 188 | { |
189 | 189 | if (is_array($trials) || is_array($probability) || is_array($alpha)) { |
190 | 190 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $trials, $probability, $alpha); |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | return $successes; |
217 | 217 | } |
218 | 218 | |
219 | - private static function calculateCumulativeBinomial(int $value, int $trials, float $probability): float|int |
|
219 | + private static function calculateCumulativeBinomial(int $value, int $trials, float $probability): float | int |
|
220 | 220 | { |
221 | 221 | $summer = 0; |
222 | 222 | for ($i = 0; $i <= $value; ++$i) { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * @return array|float|int|string If an array of numbers is passed as an argument, then the returned result will also be an array |
27 | 27 | * with the same dimensions |
28 | 28 | */ |
29 | - public static function distributionRightTail(mixed $value, mixed $degrees): array|string|int|float |
|
29 | + public static function distributionRightTail(mixed $value, mixed $degrees): array | string | int | float |
|
30 | 30 | { |
31 | 31 | if (is_array($value) || is_array($degrees)) { |
32 | 32 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $degrees); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @return array|float|int|string If an array of numbers is passed as an argument, then the returned result will also be an array |
69 | 69 | * with the same dimensions |
70 | 70 | */ |
71 | - public static function distributionLeftTail(mixed $value, mixed $degrees, mixed $cumulative): array|string|int|float |
|
71 | + public static function distributionLeftTail(mixed $value, mixed $degrees, mixed $cumulative): array | string | int | float |
|
72 | 72 | { |
73 | 73 | if (is_array($value) || is_array($degrees) || is_array($cumulative)) { |
74 | 74 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $degrees, $cumulative); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | * @return array|float|string If an array of numbers is passed as an argument, then the returned result will also be an array |
157 | 157 | * with the same dimensions |
158 | 158 | */ |
159 | - public static function inverseLeftTail(mixed $probability, mixed $degrees): array|string|float |
|
159 | + public static function inverseLeftTail(mixed $probability, mixed $degrees): array | string | float |
|
160 | 160 | { |
161 | 161 | if (is_array($probability) || is_array($degrees)) { |
162 | 162 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $probability, $degrees); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | * @param mixed $actual an array of observed frequencies |
187 | 187 | * @param mixed $expected an array of expected frequencies |
188 | 188 | */ |
189 | - public static function test(mixed $actual, mixed $expected): float|string |
|
189 | + public static function test(mixed $actual, mixed $expected): float | string |
|
190 | 190 | { |
191 | 191 | $rows = count($actual); |
192 | 192 | $actual = Functions::flattenArray($actual); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | * @return array|float|string If an array of numbers is passed as an argument, then the returned result will also be an array |
31 | 31 | * with the same dimensions |
32 | 32 | */ |
33 | - public static function distribution(mixed $value, mixed $u, mixed $v, mixed $cumulative): array|string|float |
|
33 | + public static function distribution(mixed $value, mixed $u, mixed $v, mixed $cumulative): array | string | float |
|
34 | 34 | { |
35 | 35 | if (is_array($value) || is_array($u) || is_array($v) || is_array($cumulative)) { |
36 | 36 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $u, $v, $cumulative); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * If an array of numbers is passed as an argument, then the returned result will also be an array |
23 | 23 | * with the same dimensions |
24 | 24 | */ |
25 | - public static function gamma(mixed $value): array|string|float |
|
25 | + public static function gamma(mixed $value): array | string | float |
|
26 | 26 | { |
27 | 27 | if (is_array($value)) { |
28 | 28 | return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | * @return array|float|string If an array of numbers is passed as an argument, then the returned result will also be an array |
128 | 128 | * with the same dimensions |
129 | 129 | */ |
130 | - public static function ln(mixed $value): array|string|float |
|
130 | + public static function ln(mixed $value): array | string | float |
|
131 | 131 | { |
132 | 132 | if (is_array($value)) { |
133 | 133 | return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value); |