Passed
Push — master ( 68fd71...055281 )
by
unknown
16:29 queued 06:03
created
src/PhpSpreadsheet/Calculation/Statistical/Averages.php 1 patch
Spacing   +6 added lines, -6 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
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      *
72 72
      * @return float|int|string (string if result is an error)
73 73
      */
74
-    public static function average(mixed ...$args): string|int|float
74
+    public static function average(mixed ...$args): string | int | float
75 75
     {
76 76
         $returnValue = $aCount = 0;
77 77
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      *
112 112
      * @return float|int|string (string if result is an error)
113 113
      */
114
-    public static function averageA(mixed ...$args): string|int|float
114
+    public static function averageA(mixed ...$args): string | int | float
115 115
     {
116 116
         $returnValue = null;
117 117
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      *
151 151
      * @return float|string The result, or a string containing an error
152 152
      */
153
-    public static function median(mixed ...$args): float|string
153
+    public static function median(mixed ...$args): float | string
154 154
     {
155 155
         $aArgs = Functions::flattenArray($args);
156 156
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
      *
186 186
      * @return float|string The result, or a string containing an error
187 187
      */
188
-    public static function mode(mixed ...$args): float|string
188
+    public static function mode(mixed ...$args): float | string
189 189
     {
190 190
         $returnValue = ExcelError::NA();
191 191
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
      *
223 223
      * @param mixed[] $data
224 224
      */
225
-    private static function modeCalc(array $data): float|string
225
+    private static function modeCalc(array $data): float | string
226 226
     {
227 227
         $frequencyArray = [];
228 228
         $index = 0;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/Conditional.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param null|mixed[]|string $condition the criteria that defines which cells will be checked
30 30
      * @param mixed $averageRange Data values
31 31
      */
32
-    public static function AVERAGEIF(mixed $range, null|array|string $condition, mixed $averageRange = []): null|int|float|string
32
+    public static function AVERAGEIF(mixed $range, null | array | string $condition, mixed $averageRange = []): null | int | float | string
33 33
     {
34 34
         if (!is_array($range) || !is_array($averageRange) || array_key_exists(0, $range) || array_key_exists(0, $averageRange)) {
35 35
             $refError = ExcelError::REF();
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      *
56 56
      * @param mixed $args Pairs of Ranges and Criteria
57 57
      */
58
-    public static function AVERAGEIFS(mixed ...$args): null|int|float|string
58
+    public static function AVERAGEIFS(mixed ...$args): null | int | float | string
59 59
     {
60 60
         if (empty($args)) {
61 61
             return 0.0;
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      * @param mixed $range Data values, expect array
87 87
      * @param null|mixed[]|string $condition the criteria that defines which cells will be counted
88 88
      */
89
-    public static function COUNTIF(mixed $range, null|array|string $condition): string|int
89
+    public static function COUNTIF(mixed $range, null | array | string $condition): string | int
90 90
     {
91 91
         if (
92 92
             !is_array($range)
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      *
121 121
      * @param mixed $args Pairs of Ranges and Criteria
122 122
      */
123
-    public static function COUNTIFS(mixed ...$args): int|string
123
+    public static function COUNTIFS(mixed ...$args): int | string
124 124
     {
125 125
         if (empty($args)) {
126 126
             return 0;
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      *
145 145
      * @param mixed $args Pairs of Ranges and Criteria
146 146
      */
147
-    public static function MAXIFS(mixed ...$args): null|float|string
147
+    public static function MAXIFS(mixed ...$args): null | float | string
148 148
     {
149 149
         if (empty($args)) {
150 150
             return 0.0;
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      *
167 167
      * @param mixed $args Pairs of Ranges and Criteria
168 168
      */
169
-    public static function MINIFS(mixed ...$args): null|float|string
169
+    public static function MINIFS(mixed ...$args): null | float | string
170 170
     {
171 171
         if (empty($args)) {
172 172
             return 0.0;
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      * @param mixed $range Data values, expecting array
190 190
      * @param mixed $sumRange Data values, expecting array
191 191
      */
192
-    public static function SUMIF(mixed $range, mixed $condition, mixed $sumRange = []): null|float|string
192
+    public static function SUMIF(mixed $range, mixed $condition, mixed $sumRange = []): null | float | string
193 193
     {
194 194
         if (
195 195
             !is_array($range)
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
      *
221 221
      * @param mixed $args Pairs of Ranges and Criteria
222 222
      */
223
-    public static function SUMIFS(mixed ...$args): null|float|string
223
+    public static function SUMIFS(mixed ...$args): null | float | string
224 224
     {
225 225
         if (empty($args)) {
226 226
             return 0.0;
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 mixed[] ...$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/Distributions/ChiSquared.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @return array<mixed>|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
 block discarded – undo
68 68
      * @return array<mixed>|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);
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array
155 155
      *            with the same dimensions
156 156
      */
157
-    public static function inverseLeftTail(mixed $probability, mixed $degrees): array|string|float
157
+    public static function inverseLeftTail(mixed $probability, mixed $degrees): array | string | float
158 158
     {
159 159
         if (is_array($probability) || is_array($degrees)) {
160 160
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $probability, $degrees);
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      * @param float[] $actual an array of observed frequencies
185 185
      * @param float[] $expected an array of expected frequencies
186 186
      */
187
-    public static function test($actual, $expected): float|string
187
+    public static function test($actual, $expected): float | string
188 188
     {
189 189
         $rows = count($actual);
190 190
         /** @var float[] */
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
127 127
      * @return array<mixed>|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);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      * @return array<mixed>|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
 block discarded – undo
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
 block discarded – undo
184 184
      * @return array<mixed>|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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      * @return array<mixed>|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);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/Distributions/Fisher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @return array<mixed>|float|string 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 distribution(mixed $value): array|string|float
26
+    public static function distribution(mixed $value): array | string | float
27 27
     {
28 28
         if (is_array($value)) {
29 29
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      * @return array<mixed>|float|string If an array of numbers is passed as an argument, then the returned result will also be an array
56 56
      *            with the same dimensions
57 57
      */
58
-    public static function inverse(mixed $probability): array|string|float
58
+    public static function inverse(mixed $probability): array | string | float
59 59
     {
60 60
         if (is_array($probability)) {
61 61
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $probability);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/Distributions/HyperGeometric.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      * @return array<mixed>|float|string 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 $sampleSuccesses, mixed $sampleNumber, mixed $populationSuccesses, mixed $populationNumber): array|string|float
32
+    public static function distribution(mixed $sampleSuccesses, mixed $sampleNumber, mixed $populationSuccesses, mixed $populationNumber): array | string | float
33 33
     {
34 34
         if (
35 35
             is_array($sampleSuccesses) || is_array($sampleNumber)
Please login to merge, or discard this patch.