Failed Conditions
Pull Request — master (#3876)
by Abdul Malik
22:45 queued 13:31
created
tests/PhpSpreadsheetTests/Document/PropertiesTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     /**
48 48
      * @dataProvider providerCreationTime
49 49
      */
50
-    public function testSetCreated(null|int $expectedCreationTime, null|int|string $created): void
50
+    public function testSetCreated(null | int $expectedCreationTime, null | int | string $created): void
51 51
     {
52 52
         $expectedCreationTime ??= $this->startTime;
53 53
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     /**
77 77
      * @dataProvider providerModifiedTime
78 78
      */
79
-    public function testSetModified(mixed $expectedModifiedTime, null|int|string $modified): void
79
+    public function testSetModified(mixed $expectedModifiedTime, null | int | string $modified): void
80 80
     {
81 81
         $expectedModifiedTime ??= $this->startTime;
82 82
 
Please login to merge, or discard this patch.
PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormatValueObject.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 class ConditionalFormatValueObject
6 6
 {
7
-    public function __construct(private string $type, private null|float|int|string $value = null, private ?string $cellFormula = null)
7
+    public function __construct(private string $type, private null | float | int | string $value = null, private ?string $cellFormula = null)
8 8
     {
9 9
     }
10 10
 
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
         return $this;
21 21
     }
22 22
 
23
-    public function getValue(): null|float|int|string
23
+    public function getValue(): null | float | int | string
24 24
     {
25 25
         return $this->value;
26 26
     }
27 27
 
28
-    public function setValue(null|float|int|string $value): self
28
+    public function setValue(null | float | int | string $value): self
29 29
     {
30 30
         $this->value = $value;
31 31
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart/Title.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
          *
31 31
          * @var array<RichText|string>|RichText|string
32 32
          */
33
-        private array|RichText|string $caption = '', /**
33
+        private array | RichText | string $caption = '', /**
34 34
          * Title Layout.
35 35
          */
36 36
         private ?Layout $layout = null,
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     /**
43 43
      * Get caption.
44 44
      */
45
-    public function getCaption(): array|RichText|string
45
+    public function getCaption(): array | RichText | string
46 46
     {
47 47
         return $this->caption;
48 48
     }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      *
82 82
      * @return $this
83 83
      */
84
-    public function setCaption(array|RichText|string $caption): static
84
+    public function setCaption(array | RichText | string $caption): static
85 85
     {
86 86
         $this->caption = $caption;
87 87
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart/DataSeriesValues.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
          * Series Point Marker.
75 75
          */
76 76
         private ?string $pointMarker = null,
77
-        null|ChartColor|array|string $fillColor = null,
78
-        int|string $pointSize = 3
77
+        null | ChartColor | array | string $fillColor = null,
78
+        int | string $pointSize = 3
79 79
     ) {
80 80
         parent::__construct();
81 81
         $this->markerFillColor = new ChartColor();
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
      *
268 268
      * @return string|string[] HEX color or array with HEX colors
269 269
      */
270
-    public function getFillColor(): string|array
270
+    public function getFillColor(): string | array
271 271
     {
272 272
         if ($this->fillColor === null) {
273 273
             return '';
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
     /**
331 331
      * Get line width for series.
332 332
      */
333
-    public function getLineWidth(): null|float|int
333
+    public function getLineWidth(): null | float | int
334 334
     {
335 335
         return $this->lineStyleProperties['width'];
336 336
     }
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
      *
341 341
      * @return $this
342 342
      */
343
-    public function setLineWidth(null|float|int $width): static
343
+    public function setLineWidth(null | float | int $width): static
344 344
     {
345 345
         $this->lineStyleProperties['width'] = $width;
346 346
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart/DataSeries.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      *
219 219
      * @return DataSeriesValues|false
220 220
      */
221
-    public function getPlotLabelByIndex(int $index): bool|DataSeriesValues
221
+    public function getPlotLabelByIndex(int $index): bool | DataSeriesValues
222 222
     {
223 223
         $keys = array_keys($this->plotLabel);
224 224
         if (in_array($index, $keys)) {
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      *
244 244
      * @return DataSeriesValues|false
245 245
      */
246
-    public function getPlotCategoryByIndex(int $index): bool|DataSeriesValues
246
+    public function getPlotCategoryByIndex(int $index): bool | DataSeriesValues
247 247
     {
248 248
         $keys = array_keys($this->plotCategory);
249 249
         if (in_array($index, $keys)) {
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
      *
291 291
      * @return DataSeriesValues|false
292 292
      */
293
-    public function getPlotValuesByIndex(int $index): bool|DataSeriesValues
293
+    public function getPlotValuesByIndex(int $index): bool | DataSeriesValues
294 294
     {
295 295
         $keys = array_keys($this->plotValues);
296 296
         if (in_array($index, $keys)) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xlsx/Chart.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
     {
27 27
     }
28 28
 
29
-    private static function getAttributeString(SimpleXMLElement $component, string $name): string|null
29
+    private static function getAttributeString(SimpleXMLElement $component, string $name): string | null
30 30
     {
31 31
         $attributes = $component->attributes();
32 32
         if (@isset($attributes[$name])) {
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         return null;
37 37
     }
38 38
 
39
-    private static function getAttributeInteger(SimpleXMLElement $component, string $name): int|null
39
+    private static function getAttributeInteger(SimpleXMLElement $component, string $name): int | null
40 40
     {
41 41
         $attributes = $component->attributes();
42 42
         if (@isset($attributes[$name])) {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         return null;
47 47
     }
48 48
 
49
-    private static function getAttributeBoolean(SimpleXMLElement $component, string $name): bool|null
49
+    private static function getAttributeBoolean(SimpleXMLElement $component, string $name): bool | null
50 50
     {
51 51
         $attributes = $component->attributes();
52 52
         if (@isset($attributes[$name])) {
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         return null;
59 59
     }
60 60
 
61
-    private static function getAttributeFloat(SimpleXMLElement $component, string $name): float|null
61
+    private static function getAttributeFloat(SimpleXMLElement $component, string $name): float | null
62 62
     {
63 63
         $attributes = $component->attributes();
64 64
         if (@isset($attributes[$name])) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 class AutoFilter
13 13
 {
14
-    public function __construct(private Table|Worksheet $parent, private SimpleXMLElement $worksheetXml)
14
+    public function __construct(private Table | Worksheet $parent, private SimpleXMLElement $worksheetXml)
15 15
     {
16 16
     }
17 17
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xls/Escher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         /**
56 56
          * The object to be returned by the reader. Modified during load.
57 57
          */
58
-        private BSE|BstoreContainer|DgContainer|DggContainer|\PhpOffice\PhpSpreadsheet\Shared\Escher|SpContainer|SpgrContainer $object
58
+        private BSE | BstoreContainer | DgContainer | DggContainer | \PhpOffice\PhpSpreadsheet\Shared\Escher | SpContainer | SpgrContainer $object
59 59
     ) {
60 60
     }
61 61
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     /**
84 84
      * Load Escher stream data. May be a partial Escher stream.
85 85
      */
86
-    public function load(string $data): BSE|BstoreContainer|DgContainer|DggContainer|\PhpOffice\PhpSpreadsheet\Shared\Escher|SpContainer|SpgrContainer
86
+    public function load(string $data): BSE | BstoreContainer | DgContainer | DggContainer | \PhpOffice\PhpSpreadsheet\Shared\Escher | SpContainer | SpgrContainer
87 87
     {
88 88
         $this->data = $data;
89 89
 
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
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         return array_key_exists($key, self::$excelConstants);
204 204
     }
205 205
 
206
-    public static function getExcelConstants(string $key): bool|null
206
+    public static function getExcelConstants(string $key): bool | null
207 207
     {
208 208
         return self::$excelConstants[$key];
209 209
     }
@@ -3270,10 +3270,10 @@  discard block
 block discarded – undo
3270 3270
     }
3271 3271
 
3272 3272
     /** @var ?array */
3273
-    private static ?array $functionReplaceFromExcel = null;
3273
+    private static ? array $functionReplaceFromExcel = null;
3274 3274
 
3275 3275
     /** @var ?array */
3276
-    private static ?array $functionReplaceToLocale = null;
3276
+    private static ? array $functionReplaceToLocale = null;
3277 3277
 
3278 3278
     /**
3279 3279
      * @deprecated 1.30.0 use translateFormulaToLocale() instead
@@ -3319,10 +3319,10 @@  discard block
 block discarded – undo
3319 3319
     }
3320 3320
 
3321 3321
     /** @var ?array */
3322
-    private static ?array $functionReplaceFromLocale = null;
3322
+    private static ? array $functionReplaceFromLocale = null;
3323 3323
 
3324 3324
     /** @var ?array */
3325
-    private static ?array $functionReplaceToExcel = null;
3325
+    private static ? array $functionReplaceToExcel = null;
3326 3326
 
3327 3327
     /**
3328 3328
      * @deprecated 1.30.0 use translateFormulaToEnglish() instead
@@ -3530,7 +3530,7 @@  discard block
 block discarded – undo
3530 3530
      *
3531 3531
      * @param string $formula Formula to parse
3532 3532
      */
3533
-    public function parseFormula(string $formula): array|bool
3533
+    public function parseFormula(string $formula): array | bool
3534 3534
     {
3535 3535
         //    Basic validation that this is indeed a formula
3536 3536
         //    We return an empty array if not
@@ -3924,7 +3924,7 @@  discard block
 block discarded – undo
3924 3924
     /**
3925 3925
      * @return false|string False indicates an error
3926 3926
      */
3927
-    private function convertMatrixReferences(string $formula): false|string
3927
+    private function convertMatrixReferences(string $formula): false | string
3928 3928
     {
3929 3929
         static $matrixReplaceFrom = [self::FORMULA_OPEN_MATRIX_BRACE, ';', self::FORMULA_CLOSE_MATRIX_BRACE];
3930 3930
         static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))'];
@@ -4019,7 +4019,7 @@  discard block
 block discarded – undo
4019 4019
     /**
4020 4020
      * @return array<int, mixed>|false
4021 4021
      */
4022
-    private function internalParseFormula(string $formula, ?Cell $cell = null): bool|array
4022
+    private function internalParseFormula(string $formula, ?Cell $cell = null): bool | array
4023 4023
     {
4024 4024
         if (($formula = $this->convertMatrixReferences(trim($formula))) === false) {
4025 4025
             return false;
@@ -5150,7 +5150,7 @@  discard block
 block discarded – undo
5150 5150
         return true;
5151 5151
     }
5152 5152
 
5153
-    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays): array
5153
+    private function executeArrayComparison(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays): array
5154 5154
     {
5155 5155
         $result = [];
5156 5156
         if (!is_array($operand2)) {
@@ -5189,7 +5189,7 @@  discard block
 block discarded – undo
5189 5189
         return $result;
5190 5190
     }
5191 5191
 
5192
-    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool
5192
+    private function executeBinaryComparisonOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack, bool $recursingArrays = false): array | bool
5193 5193
     {
5194 5194
         //    If we're dealing with matrix operations, we want a matrix result
5195 5195
         if ((is_array($operand1)) || (is_array($operand2))) {
@@ -5206,7 +5206,7 @@  discard block
 block discarded – undo
5206 5206
         return $result;
5207 5207
     }
5208 5208
 
5209
-    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack &$stack): mixed
5209
+    private function executeNumericBinaryOperation(mixed $operand1, mixed $operand2, string $operation, Stack & $stack): mixed
5210 5210
     {
5211 5211
         //    Validate the two operands
5212 5212
         if (
@@ -5411,7 +5411,7 @@  discard block
 block discarded – undo
5411 5411
      *
5412 5412
      * @return array|string Array of values in range if range contains more than one element. Otherwise, a single value is returned.
5413 5413
      */
5414
-    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array
5414
+    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string | array
5415 5415
     {
5416 5416
         // Return value
5417 5417
         $returnValue = [];
@@ -5552,7 +5552,7 @@  discard block
 block discarded – undo
5552 5552
     /**
5553 5553
      * Add cell reference if needed while making sure that it is the last argument.
5554 5554
      */
5555
-    private function addCellReference(array $args, bool $passCellReference, array|string $functionCall, ?Cell $cell = null): array
5555
+    private function addCellReference(array $args, bool $passCellReference, array | string $functionCall, ?Cell $cell = null): array
5556 5556
     {
5557 5557
         if ($passCellReference) {
5558 5558
             if (is_array($functionCall)) {
Please login to merge, or discard this patch.