Passed
Pull Request — master (#4463)
by Owen
14:30
created
src/PhpSpreadsheet/Calculation/TextData/Trim.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array
38 38
      *            with the same dimensions
39 39
      */
40
-    public static function spaces(mixed $stringValue = ''): array|string
40
+    public static function spaces(mixed $stringValue = ''): array | string
41 41
     {
42 42
         if (is_array($stringValue)) {
43 43
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $stringValue);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/TextData/Concatenate.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      *
52 52
      * @return array<string>|string
53 53
      */
54
-    public static function actualCONCATENATE(...$args): array|string
54
+    public static function actualCONCATENATE(...$args): array | string
55 55
     {
56 56
         if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_GNUMERIC) {
57 57
             return self::CONCATENATE(...$args);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      *
74 74
      * @return array<string>|string
75 75
      */
76
-    private static function concatenate2Args(array|string $operand1, null|array|bool|float|int|string $operand2): array|string
76
+    private static function concatenate2Args(array | string $operand1, null | array | bool | float | int | string $operand2): array | string
77 77
     {
78 78
         if (is_array($operand1) || is_array($operand2)) {
79 79
             $operand1 = Calculation::boolToString($operand1);
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      *         If an array of values is passed for the $delimiter or $ignoreEmpty arguments, then the returned result
125 125
      *            will also be an array with matching dimensions
126 126
      */
127
-    public static function TEXTJOIN($delimiter = '', $ignoreEmpty = true, mixed ...$args): array|string
127
+    public static function TEXTJOIN($delimiter = '', $ignoreEmpty = true, mixed ...$args): array | string
128 128
     {
129 129
         if (is_array($delimiter) || is_array($ignoreEmpty)) {
130 130
             return self::evaluateArrayArgumentsSubset(
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
      *         If an array of values is passed for the $stringValue or $repeatCount arguments, then the returned result
184 184
      *            will also be an array with matching dimensions
185 185
      */
186
-    public static function builtinREPT(mixed $stringValue, mixed $repeatCount): array|string
186
+    public static function builtinREPT(mixed $stringValue, mixed $repeatCount): array | string
187 187
     {
188 188
         if (is_array($stringValue) || is_array($repeatCount)) {
189 189
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $stringValue, $repeatCount);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/TextData/CaseConvert.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array
22 22
      *            with the same dimensions
23 23
      */
24
-    public static function lower(mixed $mixedCaseValue): array|string
24
+    public static function lower(mixed $mixedCaseValue): array | string
25 25
     {
26 26
         if (is_array($mixedCaseValue)) {
27 27
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array
48 48
      *            with the same dimensions
49 49
      */
50
-    public static function upper(mixed $mixedCaseValue): array|string
50
+    public static function upper(mixed $mixedCaseValue): array | string
51 51
     {
52 52
         if (is_array($mixedCaseValue)) {
53 53
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array
74 74
      *            with the same dimensions
75 75
      */
76
-    public static function proper(mixed $mixedCaseValue): array|string
76
+    public static function proper(mixed $mixedCaseValue): array | string
77 77
     {
78 78
         if (is_array($mixedCaseValue)) {
79 79
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/TextData/Extract.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      *         If an array of values is passed for the $value or $chars arguments, then the returned result
25 25
      *            will also be an array with matching dimensions
26 26
      */
27
-    public static function left(mixed $value, mixed $chars = 1): array|string
27
+    public static function left(mixed $value, mixed $chars = 1): array | string
28 28
     {
29 29
         if (is_array($value) || is_array($chars)) {
30 30
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $chars);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      *         If an array of values is passed for the $value, $start or $chars arguments, then the returned result
55 55
      *            will also be an array with matching dimensions
56 56
      */
57
-    public static function mid(mixed $value, mixed $start, mixed $chars): array|string
57
+    public static function mid(mixed $value, mixed $start, mixed $chars): array | string
58 58
     {
59 59
         if (is_array($value) || is_array($start) || is_array($chars)) {
60 60
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $start, $chars);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      *         If an array of values is passed for the $value or $chars arguments, then the returned result
84 84
      *            will also be an array with matching dimensions
85 85
      */
86
-    public static function right(mixed $value, mixed $chars = 1): array|string
86
+    public static function right(mixed $value, mixed $chars = 1): array | string
87 87
     {
88 88
         if (is_array($value) || is_array($chars)) {
89 89
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $chars);
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      *         If an array of values is passed for any of the arguments, then the returned result
127 127
      *            will also be an array with matching dimensions
128 128
      */
129
-    public static function before(mixed $text, $delimiter, mixed $instance = 1, mixed $matchMode = 0, mixed $matchEnd = 0, mixed $ifNotFound = '#N/A'): array|string
129
+    public static function before(mixed $text, $delimiter, mixed $instance = 1, mixed $matchMode = 0, mixed $matchEnd = 0, mixed $ifNotFound = '#N/A'): array | string
130 130
     {
131 131
         if (is_array($text) || is_array($instance) || is_array($matchMode) || is_array($matchEnd) || is_array($ifNotFound)) {
132 132
             return self::evaluateArrayArgumentsIgnore([self::class, __FUNCTION__], 1, $text, $delimiter, $instance, $matchMode, $matchEnd, $ifNotFound);
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
      *         If an array of values is passed for any of the arguments, then the returned result
191 191
      *            will also be an array with matching dimensions
192 192
      */
193
-    public static function after(mixed $text, $delimiter, mixed $instance = 1, mixed $matchMode = 0, mixed $matchEnd = 0, mixed $ifNotFound = '#N/A'): array|string
193
+    public static function after(mixed $text, $delimiter, mixed $instance = 1, mixed $matchMode = 0, mixed $matchEnd = 0, mixed $ifNotFound = '#N/A'): array | string
194 194
     {
195 195
         if (is_array($text) || is_array($instance) || is_array($matchMode) || is_array($matchEnd) || is_array($ifNotFound)) {
196 196
             return self::evaluateArrayArgumentsIgnore([self::class, __FUNCTION__], 1, $text, $delimiter, $instance, $matchMode, $matchEnd, $ifNotFound);
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      *
235 235
      * @return array<string>|string
236 236
      */
237
-    private static function validateTextBeforeAfter(string $text, null|array|string $delimiter, int $instance, int $matchMode, int $matchEnd, mixed $ifNotFound): array|string
237
+    private static function validateTextBeforeAfter(string $text, null | array | string $delimiter, int $instance, int $matchMode, int $matchEnd, mixed $ifNotFound): array | string
238 238
     {
239 239
         $flags = self::matchFlags($matchMode);
240 240
         $delimiter = self::buildDelimiter($delimiter);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Calculation.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         return array_key_exists($key, self::EXCEL_CONSTANTS);
165 165
     }
166 166
 
167
-    public static function getExcelConstants(string $key): bool|null
167
+    public static function getExcelConstants(string $key): bool | null
168 168
     {
169 169
         return self::EXCEL_CONSTANTS[$key];
170 170
     }
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
      *
544 544
      * @return array<mixed>|bool
545 545
      */
546
-    public function parseFormula(string $formula): array|bool
546
+    public function parseFormula(string $formula): array | bool
547 547
     {
548 548
         $formula = preg_replace_callback(
549 549
             self::CALCULATION_REGEXP_CELLREF_SPILL,
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
     /**
968 968
      * @return false|string False indicates an error
969 969
      */
970
-    private function convertMatrixReferences(string $formula): false|string
970
+    private function convertMatrixReferences(string $formula): false | string
971 971
     {
972 972
         //    Convert any Excel matrix references to the MKMATRIX() function
973 973
         if (str_contains($formula, self::FORMULA_OPEN_MATRIX_BRACE)) {
@@ -1043,7 +1043,7 @@  discard block
 block discarded – undo
1043 1043
     /**
1044 1044
      * @return array<int, mixed>|false
1045 1045
      */
1046
-    private function internalParseFormula(string $formula, ?Cell $cell = null): bool|array
1046
+    private function internalParseFormula(string $formula, ?Cell $cell = null): bool | array
1047 1047
     {
1048 1048
         if (($formula = $this->convertMatrixReferences(trim($formula))) === false) {
1049 1049
             return false;
@@ -1563,7 +1563,7 @@  discard block
 block discarded – undo
1563 1563
      *
1564 1564
      * @return array<int, mixed>|false|string
1565 1565
      */
1566
-    private function processTokenStack(false|array $tokens, ?string $cellID = null, ?Cell $cell = null)
1566
+    private function processTokenStack(false | array $tokens, ?string $cellID = null, ?Cell $cell = null)
1567 1567
     {
1568 1568
         if ($tokens === false) {
1569 1569
             return false;
@@ -2234,7 +2234,7 @@  discard block
 block discarded – undo
2234 2234
         return $output;
2235 2235
     }
2236 2236
 
2237
-    private function validateBinaryOperand(mixed &$operand, Stack &$stack): bool
2237
+    private function validateBinaryOperand(mixed &$operand, Stack & $stack): bool
2238 2238
     {
2239 2239
         if (is_array($operand)) {
2240 2240
             if ((count($operand, COUNT_RECURSIVE) - count($operand)) == 1) {
@@ -2273,7 +2273,7 @@  discard block
 block discarded – undo
2273 2273
     }
2274 2274
 
2275 2275
     /** @return mixed[] */
2276
-    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays): array
2276
+    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays): array
2277 2277
     {
2278 2278
         $result = [];
2279 2279
         if (!is_array($operand2) && is_array($operand1)) {
@@ -2318,7 +2318,7 @@  discard block
 block discarded – undo
2318 2318
     }
2319 2319
 
2320 2320
     /** @return bool|mixed[] */
2321
-    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool
2321
+    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays = false): array | bool
2322 2322
     {
2323 2323
         //    If we're dealing with matrix operations, we want a matrix result
2324 2324
         if ((is_array($operand1)) || (is_array($operand2))) {
@@ -2335,7 +2335,7 @@  discard block
 block discarded – undo
2335 2335
         return $result;
2336 2336
     }
2337 2337
 
2338
-    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack): mixed
2338
+    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack): mixed
2339 2339
     {
2340 2340
         //    Validate the two operands
2341 2341
         if (
@@ -2561,7 +2561,7 @@  discard block
 block discarded – undo
2561 2561
      *
2562 2562
      * @return mixed[]|string Array of values in range if range contains more than one element. Otherwise, a single value is returned.
2563 2563
      */
2564
-    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array
2564
+    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string | array
2565 2565
     {
2566 2566
         // Return value
2567 2567
         $returnValue = [];
@@ -2711,7 +2711,7 @@  discard block
 block discarded – undo
2711 2711
      *
2712 2712
      * @return mixed[]
2713 2713
      */
2714
-    private function addCellReference(array $args, bool $passCellReference, array|string $functionCall, ?Cell $cell = null): array
2714
+    private function addCellReference(array $args, bool $passCellReference, array | string $functionCall, ?Cell $cell = null): array
2715 2715
     {
2716 2716
         if ($passCellReference) {
2717 2717
             if (is_array($functionCall)) {
Please login to merge, or discard this patch.