Passed
Pull Request — master (#4468)
by Owen
21:21 queued 14:00
created
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/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/StandardDeviations.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      *
38 38
      * @param mixed ...$args Data values
39 39
      */
40
-    public static function STDEVA(mixed ...$args): float|string
40
+    public static function STDEVA(mixed ...$args): float | string
41 41
     {
42 42
         $result = Variances::VARA(...$args);
43 43
         if (!is_numeric($result)) {
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      *
58 58
      * @param mixed ...$args Data values
59 59
      */
60
-    public static function STDEVP(mixed ...$args): float|string
60
+    public static function STDEVP(mixed ...$args): float | string
61 61
     {
62 62
         $result = Variances::VARP(...$args);
63 63
         if (!is_numeric($result)) {
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      *
78 78
      * @param mixed ...$args Data values
79 79
      */
80
-    public static function STDEVPA(mixed ...$args): float|string
80
+    public static function STDEVPA(mixed ...$args): float | string
81 81
     {
82 82
         $result = Variances::VARPA(...$args);
83 83
         if (!is_numeric($result)) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/Maximum.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 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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/Averages/Mean.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
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
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
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|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.