Failed Conditions
Pull Request — master (#3962)
by Owen
11:35
created
src/PhpSpreadsheet/Style/ConditionalFormatting/CellMatcher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         };
115 115
     }
116 116
 
117
-    protected function wrapValue(mixed $value): float|int|string
117
+    protected function wrapValue(mixed $value): float | int | string
118 118
     {
119 119
         if (!is_numeric($value)) {
120 120
             if (is_bool($value)) {
@@ -129,14 +129,14 @@  discard block
 block discarded – undo
129 129
         return $value;
130 130
     }
131 131
 
132
-    protected function wrapCellValue(): float|int|string
132
+    protected function wrapCellValue(): float | int | string
133 133
     {
134 134
         $this->cell = $this->worksheet->getCell([$this->cellColumn, $this->cellRow]);
135 135
 
136 136
         return $this->wrapValue($this->cell->getCalculatedValue());
137 137
     }
138 138
 
139
-    protected function conditionCellAdjustment(array $matches): float|int|string
139
+    protected function conditionCellAdjustment(array $matches): float | int | string
140 140
     {
141 141
         $column = $matches[6];
142 142
         $row = $matches[7];
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
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      *
50 50
      * @param array $args data to be concatenated
51 51
      */
52
-    public static function actualCONCATENATE(...$args): array|string
52
+    public static function actualCONCATENATE(...$args): array | string
53 53
     {
54 54
         if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_GNUMERIC) {
55 55
             return self::CONCATENATE(...$args);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         return $result;
66 66
     }
67 67
 
68
-    private static function concatenate2Args(array|string $operand1, null|array|bool|float|int|string $operand2): array|string
68
+    private static function concatenate2Args(array | string $operand1, null | array | bool | float | int | string $operand2): array | string
69 69
     {
70 70
         if (is_array($operand1) || is_array($operand2)) {
71 71
             $operand1 = Calculation::boolToString($operand1);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      *         If an array of values is passed for the $delimiter or $ignoreEmpty arguments, then the returned result
112 112
      *            will also be an array with matching dimensions
113 113
      */
114
-    public static function TEXTJOIN(mixed $delimiter = '', mixed $ignoreEmpty = true, mixed ...$args): array|string
114
+    public static function TEXTJOIN(mixed $delimiter = '', mixed $ignoreEmpty = true, mixed ...$args): array | string
115 115
     {
116 116
         if (is_array($delimiter) || is_array($ignoreEmpty)) {
117 117
             return self::evaluateArrayArgumentsSubset(
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      *         If an array of values is passed for the $stringValue or $repeatCount arguments, then the returned result
169 169
      *            will also be an array with matching dimensions
170 170
      */
171
-    public static function builtinREPT(mixed $stringValue, mixed $repeatCount): array|string
171
+    public static function builtinREPT(mixed $stringValue, mixed $repeatCount): array | string
172 172
     {
173 173
         if (is_array($stringValue) || is_array($repeatCount)) {
174 174
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $stringValue, $repeatCount);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Internal/ExcelArrayPseudoFunctions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         return $result;
40 40
     }
41 41
 
42
-    public static function anchorArray(string $cellReference, Cell $cell): array|string
42
+    public static function anchorArray(string $cellReference, Cell $cell): array | string
43 43
     {
44 44
         //$coordinate = $cell->getCoordinate();
45 45
         $worksheet = $cell->getWorksheet();
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Reader/Gnumeric/ArrayFormulaTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         string $cellAddress,
29 29
         string $expectedRange,
30 30
         string $expectedFormula,
31
-        array|float $expectedValue
31
+        array | float $expectedValue
32 32
     ): void {
33 33
         $filename = 'tests/data/Reader/Gnumeric/ArrayFormulaTest.gnumeric';
34 34
         $reader = new Gnumeric();
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Reader/Ods/ArrayFormulaTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         string $cellAddress,
29 29
         string $expectedRange,
30 30
         string $expectedFormula,
31
-        array|float $expectedValue
31
+        array | float $expectedValue
32 32
     ): void {
33 33
         $filename = 'tests/data/Reader/Ods/ArrayFormulaTest.ods';
34 34
         $reader = new Ods();
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Calculation.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         return array_key_exists($key, self::$excelConstants);
215 215
     }
216 216
 
217
-    public static function getExcelConstants(string $key): bool|null
217
+    public static function getExcelConstants(string $key): bool | null
218 218
     {
219 219
         return self::$excelConstants[$key];
220 220
     }
@@ -3314,9 +3314,9 @@  discard block
 block discarded – undo
3314 3314
         return $formula;
3315 3315
     }
3316 3316
 
3317
-    private static ?array $functionReplaceFromExcel;
3317
+    private static ? array $functionReplaceFromExcel;
3318 3318
 
3319
-    private static ?array $functionReplaceToLocale;
3319
+    private static ? array $functionReplaceToLocale;
3320 3320
 
3321 3321
     /**
3322 3322
      * @deprecated 1.30.0 use translateFormulaToLocale() instead
@@ -3361,9 +3361,9 @@  discard block
 block discarded – undo
3361 3361
         );
3362 3362
     }
3363 3363
 
3364
-    private static ?array $functionReplaceFromLocale;
3364
+    private static ? array $functionReplaceFromLocale;
3365 3365
 
3366
-    private static ?array $functionReplaceToExcel;
3366
+    private static ? array $functionReplaceToExcel;
3367 3367
 
3368 3368
     /**
3369 3369
      * @deprecated 1.30.0 use translateFormulaToEnglish() instead
@@ -3558,7 +3558,7 @@  discard block
 block discarded – undo
3558 3558
      *
3559 3559
      * @param string $formula Formula to parse
3560 3560
      */
3561
-    public function parseFormula(string $formula): array|bool
3561
+    public function parseFormula(string $formula): array | bool
3562 3562
     {
3563 3563
         $formula = preg_replace_callback(
3564 3564
             self::CALCULATION_REGEXP_CELLREF_SPILL,
@@ -3961,7 +3961,7 @@  discard block
 block discarded – undo
3961 3961
     /**
3962 3962
      * @return false|string False indicates an error
3963 3963
      */
3964
-    private function convertMatrixReferences(string $formula): false|string
3964
+    private function convertMatrixReferences(string $formula): false | string
3965 3965
     {
3966 3966
         static $matrixReplaceFrom = [self::FORMULA_OPEN_MATRIX_BRACE, ';', self::FORMULA_CLOSE_MATRIX_BRACE];
3967 3967
         static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))'];
@@ -4056,7 +4056,7 @@  discard block
 block discarded – undo
4056 4056
     /**
4057 4057
      * @return array<int, mixed>|false
4058 4058
      */
4059
-    private function internalParseFormula(string $formula, ?Cell $cell = null): bool|array
4059
+    private function internalParseFormula(string $formula, ?Cell $cell = null): bool | array
4060 4060
     {
4061 4061
         if (($formula = $this->convertMatrixReferences(trim($formula))) === false) {
4062 4062
             return false;
@@ -5230,7 +5230,7 @@  discard block
 block discarded – undo
5230 5230
         return true;
5231 5231
     }
5232 5232
 
5233
-    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays): array
5233
+    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays): array
5234 5234
     {
5235 5235
         $result = [];
5236 5236
         if (!is_array($operand2)) {
@@ -5269,7 +5269,7 @@  discard block
 block discarded – undo
5269 5269
         return $result;
5270 5270
     }
5271 5271
 
5272
-    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool
5272
+    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays = false): array | bool
5273 5273
     {
5274 5274
         //    If we're dealing with matrix operations, we want a matrix result
5275 5275
         if ((is_array($operand1)) || (is_array($operand2))) {
@@ -5286,7 +5286,7 @@  discard block
 block discarded – undo
5286 5286
         return $result;
5287 5287
     }
5288 5288
 
5289
-    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack): mixed
5289
+    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack): mixed
5290 5290
     {
5291 5291
         //    Validate the two operands
5292 5292
         if (
@@ -5503,7 +5503,7 @@  discard block
 block discarded – undo
5503 5503
      *
5504 5504
      * @return array|string Array of values in range if range contains more than one element. Otherwise, a single value is returned.
5505 5505
      */
5506
-    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array
5506
+    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string | array
5507 5507
     {
5508 5508
         // Return value
5509 5509
         $returnValue = [];
@@ -5644,7 +5644,7 @@  discard block
 block discarded – undo
5644 5644
     /**
5645 5645
      * Add cell reference if needed while making sure that it is the last argument.
5646 5646
      */
5647
-    private function addCellReference(array $args, bool $passCellReference, array|string $functionCall, ?Cell $cell = null): array
5647
+    private function addCellReference(array $args, bool $passCellReference, array | string $functionCall, ?Cell $cell = null): array
5648 5648
     {
5649 5649
         if ($passCellReference) {
5650 5650
             if (is_array($functionCall)) {
Please login to merge, or discard this patch.