@@ -62,7 +62,7 @@ |
||
62 | 62 | * |
63 | 63 | * @return string the url encoded output |
64 | 64 | */ |
65 | - public static function urlEncode(mixed $text): string|array |
|
65 | + public static function urlEncode(mixed $text): string | array |
|
66 | 66 | { |
67 | 67 | if (!is_string($text)) { |
68 | 68 | return ExcelError::VALUE(); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @return float|string |
27 | 27 | */ |
28 | - public static function geometric(mixed ...$args): float|int|string |
|
28 | + public static function geometric(mixed ...$args): float | int | string |
|
29 | 29 | { |
30 | 30 | $aArgs = Functions::flattenArray($args); |
31 | 31 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return float|string |
55 | 55 | */ |
56 | - public static function harmonic(mixed ...$args): string|float|int |
|
56 | + public static function harmonic(mixed ...$args): string | float | int |
|
57 | 57 | { |
58 | 58 | // Loop through arguments |
59 | 59 | $aArgs = Functions::flattenArray($args); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | * If an array of numbers is passed as an argument, then the returned result will also be an array |
29 | 29 | * with the same dimensions |
30 | 30 | */ |
31 | - public static function distribution(mixed $value, mixed $lambda, mixed $cumulative): array|string|float |
|
31 | + public static function distribution(mixed $value, mixed $lambda, mixed $cumulative): array | string | float |
|
32 | 32 | { |
33 | 33 | if (is_array($value) || is_array($lambda) || is_array($cumulative)) { |
34 | 34 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $lambda, $cumulative); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * If an array of numbers is passed as an argument, then the returned result will also be an array |
84 | 84 | * with the same dimensions |
85 | 85 | */ |
86 | - public static function range(mixed $trials, mixed $probability, mixed $successes, mixed $limit = null): array|string|float|int |
|
86 | + public static function range(mixed $trials, mixed $probability, mixed $successes, mixed $limit = null): array | string | float | int |
|
87 | 87 | { |
88 | 88 | if (is_array($trials) || is_array($probability) || is_array($successes) || is_array($limit)) { |
89 | 89 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $trials, $probability, $successes, $limit); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | * TODO Add support for the cumulative flag not present for NEGBINOMDIST, but introduced for NEGBINOM.DIST |
142 | 142 | * The cumulative default should be false to reflect the behaviour of NEGBINOMDIST |
143 | 143 | */ |
144 | - public static function negative(mixed $failures, mixed $successes, mixed $probability): array|string|float |
|
144 | + public static function negative(mixed $failures, mixed $successes, mixed $probability): array | string | float |
|
145 | 145 | { |
146 | 146 | if (is_array($failures) || is_array($successes) || is_array($probability)) { |
147 | 147 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $failures, $successes, $probability); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | * If an array of numbers is passed as an argument, then the returned result will also be an array |
188 | 188 | * with the same dimensions |
189 | 189 | */ |
190 | - public static function inverse(mixed $trials, mixed $probability, mixed $alpha): array|string|int |
|
190 | + public static function inverse(mixed $trials, mixed $probability, mixed $alpha): array | string | int |
|
191 | 191 | { |
192 | 192 | if (is_array($trials) || is_array($probability) || is_array($alpha)) { |
193 | 193 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $trials, $probability, $alpha); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | return $successes; |
220 | 220 | } |
221 | 221 | |
222 | - private static function calculateCumulativeBinomial(int $value, int $trials, float $probability): float|int |
|
222 | + private static function calculateCumulativeBinomial(int $value, int $trials, float $probability): float | int |
|
223 | 223 | { |
224 | 224 | $summer = 0; |
225 | 225 | for ($i = 0; $i <= $value; ++$i) { |
@@ -114,7 +114,7 @@ |
||
114 | 114 | * accuracy if I can get my head round the mathematics |
115 | 115 | * (as described at) http://home.online.no/~pjacklam/notes/invnorm/ |
116 | 116 | */ |
117 | - public static function inverse(mixed $probability, mixed $mean, mixed $stdDev): array|string|float |
|
117 | + public static function inverse(mixed $probability, mixed $mean, mixed $stdDev): array | string | float |
|
118 | 118 | { |
119 | 119 | if (is_array($probability) || is_array($mean) || is_array($stdDev)) { |
120 | 120 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $probability, $mean, $stdDev); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | * If an array of numbers is passed as an argument, then the returned result will also be an array |
30 | 30 | * with the same dimensions |
31 | 31 | */ |
32 | - public static function distribution(mixed $value, mixed $mean, mixed $cumulative): array|string|float |
|
32 | + public static function distribution(mixed $value, mixed $mean, mixed $cumulative): array | string | float |
|
33 | 33 | { |
34 | 34 | if (is_array($value) || is_array($mean) || is_array($cumulative)) { |
35 | 35 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $mean, $cumulative); |
@@ -24,7 +24,7 @@ discard block |
||
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 distribution(mixed $value): array|string|float |
|
27 | + public static function distribution(mixed $value): array | string | float |
|
28 | 28 | { |
29 | 29 | if (is_array($value)) { |
30 | 30 | return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * If an array of numbers is passed as an argument, then the returned result will also be an array |
58 | 58 | * with the same dimensions |
59 | 59 | */ |
60 | - public static function inverse(mixed $probability): array|string|float |
|
60 | + public static function inverse(mixed $probability): array | string | float |
|
61 | 61 | { |
62 | 62 | if (is_array($probability)) { |
63 | 63 | return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $probability); |
@@ -94,7 +94,7 @@ |
||
94 | 94 | * If an array of numbers is passed as an argument, then the returned result will also be an array |
95 | 95 | * with the same dimensions |
96 | 96 | */ |
97 | - public static function gauss(mixed $value): array|string|float |
|
97 | + public static function gauss(mixed $value): array | string | float |
|
98 | 98 | { |
99 | 99 | if (is_array($value)) { |
100 | 100 | return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value); |
@@ -37,7 +37,7 @@ discard block |
||
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 distribution(mixed $value, mixed $alpha, mixed $beta, mixed $rMin = 0.0, mixed $rMax = 1.0): array|string|float |
|
40 | + public static function distribution(mixed $value, mixed $alpha, mixed $beta, mixed $rMin = 0.0, mixed $rMax = 1.0): array | string | float |
|
41 | 41 | { |
42 | 42 | if (is_array($value) || is_array($alpha) || is_array($beta) || is_array($rMin) || is_array($rMax)) { |
43 | 43 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $alpha, $beta, $rMin, $rMax); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * If an array of numbers is passed as an argument, then the returned result will also be an array |
92 | 92 | * with the same dimensions |
93 | 93 | */ |
94 | - public static function inverse(mixed $probability, mixed $alpha, mixed $beta, mixed $rMin = 0.0, mixed $rMax = 1.0): array|string|float |
|
94 | + public static function inverse(mixed $probability, mixed $alpha, mixed $beta, mixed $rMin = 0.0, mixed $rMax = 1.0): array | string | float |
|
95 | 95 | { |
96 | 96 | if (is_array($probability) || is_array($alpha) || is_array($beta) || is_array($rMin) || is_array($rMax)) { |
97 | 97 | return self::evaluateArrayArguments([self::class, __FUNCTION__], $probability, $alpha, $beta, $rMin, $rMax); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | return self::calculateInverse($probability, $alpha, $beta, $rMin, $rMax); |
123 | 123 | } |
124 | 124 | |
125 | - private static function calculateInverse(float $probability, float $alpha, float $beta, float $rMin, float $rMax): string|float |
|
125 | + private static function calculateInverse(float $probability, float $alpha, float $beta, float $rMin, float $rMax): string | float |
|
126 | 126 | { |
127 | 127 | $a = 0; |
128 | 128 | $b = 2; |