Failed Conditions
Pull Request — master (#3693)
by Franck
13:36
created
src/PhpSpreadsheet/Calculation/Engineering.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      *                                If places is nonnumeric, DEC2BIN returns the #VALUE! error value.
242 242
      *                                If places is zero or negative, DEC2BIN returns the #NUM! error value.
243 243
      */
244
-    public static function DECTOBIN(mixed $x, mixed $places = null): string|array
244
+    public static function DECTOBIN(mixed $x, mixed $places = null): string | array
245 245
     {
246 246
         return Engineering\ConvertDecimal::toBinary($x, $places);
247 247
     }
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      *                                If places is nonnumeric, DEC2HEX returns the #VALUE! error value.
276 276
      *                                If places is zero or negative, DEC2HEX returns the #NUM! error value.
277 277
      */
278
-    public static function DECTOHEX(mixed $x, mixed $places = null): string|array
278
+    public static function DECTOHEX(mixed $x, mixed $places = null): string | array
279 279
     {
280 280
         return Engineering\ConvertDecimal::toHex($x, $places);
281 281
     }
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      *                                If places is nonnumeric, DEC2OCT returns the #VALUE! error value.
310 310
      *                                If places is zero or negative, DEC2OCT returns the #NUM! error value.
311 311
      */
312
-    public static function DECTOOCT(mixed $x, mixed $places = null): string|array
312
+    public static function DECTOOCT(mixed $x, mixed $places = null): string | array
313 313
     {
314 314
         return Engineering\ConvertDecimal::toOctal($x, $places);
315 315
     }
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
      *                                    If places is nonnumeric, OCT2HEX returns the #VALUE! error value.
517 517
      *                                    If places is negative, OCT2HEX returns the #NUM! error value.
518 518
      */
519
-    public static function OCTTOHEX(mixed $x, mixed $places = null): string|array
519
+    public static function OCTTOHEX(mixed $x, mixed $places = null): string | array
520 520
     {
521 521
         return Engineering\ConvertOctal::toHex($x, $places);
522 522
     }
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
      * @param string $complexNumber the complex number for which you want the imaginary
561 561
      *                                         coefficient
562 562
      */
563
-    public static function IMAGINARY($complexNumber): string|float|array
563
+    public static function IMAGINARY($complexNumber): string | float | array
564 564
     {
565 565
         return Engineering\Complex::IMAGINARY($complexNumber);
566 566
     }
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
      *
580 580
      * @param string $complexNumber the complex number for which you want the real coefficient
581 581
      */
582
-    public static function IMREAL($complexNumber): string|float|array
582
+    public static function IMREAL($complexNumber): string | float | array
583 583
     {
584 584
         return Engineering\Complex::IMREAL($complexNumber);
585 585
     }
@@ -1247,7 +1247,7 @@  discard block
 block discarded – undo
1247 1247
      * @param float $upper upper bound for integrating ERF.
1248 1248
      *                                If omitted, ERF integrates between zero and lower_limit
1249 1249
      */
1250
-    public static function ERF($lower, $upper = null): float|string|array
1250
+    public static function ERF($lower, $upper = null): float | string | array
1251 1251
     {
1252 1252
         return Engineering\Erf::ERF($lower, $upper);
1253 1253
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      *
21 21
      * @return float|string
22 22
      */
23
-    public static function sumSquare(mixed ...$args): string|int|float
23
+    public static function sumSquare(mixed ...$args): string | int | float
24 24
     {
25 25
         try {
26 26
             $returnValue = 0;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      *
64 64
      * @return float|string
65 65
      */
66
-    public static function sumXSquaredMinusYSquared($matrixData1, $matrixData2): string|int|float
66
+    public static function sumXSquaredMinusYSquared($matrixData1, $matrixData2): string | int | float
67 67
     {
68 68
         try {
69 69
             $array1 = Functions::flattenArray($matrixData1);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      *
92 92
      * @return float|string
93 93
      */
94
-    public static function sumXSquaredPlusYSquared($matrixData1, $matrixData2): string|int|float
94
+    public static function sumXSquaredPlusYSquared($matrixData1, $matrixData2): string | int | float
95 95
     {
96 96
         try {
97 97
             $array1 = Functions::flattenArray($matrixData1);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      *
120 120
      * @return float|string
121 121
      */
122
-    public static function sumXMinusYSquared($matrixData1, $matrixData2): string|int|float
122
+    public static function sumXMinusYSquared($matrixData1, $matrixData2): string | int | float
123 123
     {
124 124
         try {
125 125
             $array1 = Functions::flattenArray($matrixData1);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/SeriesSum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      *
23 23
      * @return array|float|string The result, or a string containing an error
24 24
      */
25
-    public static function evaluate(mixed $x, mixed $n, mixed $m, ...$args): array|string|float|int
25
+    public static function evaluate(mixed $x, mixed $n, mixed $m, ...$args): array | string | float | int
26 26
     {
27 27
         if (is_array($x) || is_array($n) || is_array($m)) {
28 28
             return self::evaluateArrayArgumentsSubset([self::class, __FUNCTION__], 3, $x, $n, $m, ...$args);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Lcm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      *
50 50
      * @return int|string Lowest Common Multiplier, or a string containing an error
51 51
      */
52
-    public static function evaluate(mixed ...$args): int|string
52
+    public static function evaluate(mixed ...$args): int | string
53 53
     {
54 54
         try {
55 55
             $arrayArgs = [];
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Absolute.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
21 21
      *            with the same dimensions
22 22
      */
23
-    public static function evaluate(mixed $number): array|string|int|float
23
+    public static function evaluate(mixed $number): array | string | int | float
24 24
     {
25 25
         if (is_array($number)) {
26 26
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Random.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      *
16 16
      * @return float Random number
17 17
      */
18
-    public static function rand(): int|float
18
+    public static function rand(): int | float
19 19
     {
20 20
         return mt_rand(0, 10000000) / 10000000;
21 21
     }
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
33 33
      *            with the same dimensions
34 34
      */
35
-    public static function randBetween(mixed $min, mixed $max): array|string|int
35
+    public static function randBetween(mixed $min, mixed $max): array | string | int
36 36
     {
37 37
         if (is_array($min) || is_array($max)) {
38 38
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $min, $max);
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      *
68 68
      * @return array|string The resulting array, or a string containing an error
69 69
      */
70
-    public static function randArray(mixed $rows = 1, mixed $columns = 1, mixed $min = 0, mixed $max = 1, $wholeNumber = false): string|array
70
+    public static function randArray(mixed $rows = 1, mixed $columns = 1, mixed $min = 0, mixed $max = 1, $wholeNumber = false): string | array
71 71
     {
72 72
         try {
73 73
             $rows = (int) Helpers::validateNumericNullSubstitution($rows, 1);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
         return array_chunk(
88 88
             array_map(
89
-                function () use ($min, $max, $wholeNumber): int|float {
89
+                function () use ($min, $max, $wholeNumber): int | float {
90 90
                     return $wholeNumber
91 91
                         ? mt_rand((int) $min, (int) $max)
92 92
                         : (mt_rand() / mt_getrandmax()) * ($max - $min) + $min;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
71 71
      *            with the same dimensions
72 72
      */
73
-    public static function math(mixed $number, mixed $significance = null, $mode = 0): array|string|float
73
+    public static function math(mixed $number, mixed $significance = null, $mode = 0): array | string | float
74 74
     {
75 75
         if (is_array($number) || is_array($significance) || is_array($mode)) {
76 76
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $significance, $mode);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
112 112
      *            with the same dimensions
113 113
      */
114
-    public static function precise(mixed $number, $significance = 1): array|string|float
114
+    public static function precise(mixed $number, $significance = 1): array | string | float
115 115
     {
116 116
         if (is_array($number) || is_array($significance)) {
117 117
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $significance);
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     /**
144 144
      * Avoid Scrutinizer problems concerning complexity.
145 145
      */
146
-    private static function argumentsOk(float $number, float $significance): float|string
146
+    private static function argumentsOk(float $number, float $significance): float | string
147 147
     {
148 148
         if (empty($number * $significance)) {
149 149
             return 0.0;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Angle.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
21 21
      *            with the same dimensions
22 22
      */
23
-    public static function toDegrees(mixed $number): array|string|float
23
+    public static function toDegrees(mixed $number): array | string | float
24 24
     {
25 25
         if (is_array($number)) {
26 26
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
47 47
      *            with the same dimensions
48 48
      */
49
-    public static function toRadians(mixed $number): array|string|float
49
+    public static function toRadians(mixed $number): array | string | float
50 50
     {
51 51
         if (is_array($number)) {
52 52
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      *
58 58
      * @return array|string The resulting array, or a string containing an error
59 59
      */
60
-    public static function sequence(mixed $rows = 1, mixed $columns = 1, mixed $start = 1, mixed $step = 1): string|array
60
+    public static function sequence(mixed $rows = 1, mixed $columns = 1, mixed $start = 1, mixed $step = 1): string | array
61 61
     {
62 62
         try {
63 63
             $rows = (int) Helpers::validateNumericNullSubstitution($rows, 1);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      *
121 121
      * @return array|string The result, or a string containing an error
122 122
      */
123
-    public static function inverse(mixed $matrixValues): array|string
123
+    public static function inverse(mixed $matrixValues): array | string
124 124
     {
125 125
         try {
126 126
             $matrix = self::getMatrix($matrixValues);
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      *
144 144
      * @return array|string The result, or a string containing an error
145 145
      */
146
-    public static function multiply(mixed $matrixData1, mixed $matrixData2): array|string
146
+    public static function multiply(mixed $matrixData1, mixed $matrixData2): array | string
147 147
     {
148 148
         try {
149 149
             $matrixA = self::getMatrix($matrixData1);
Please login to merge, or discard this patch.