Passed
Pull Request — master (#3876)
by Abdul Malik
13:39
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/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|int 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, bool $wholeNumber = false): string|array
70
+    public static function randArray(mixed $rows = 1, mixed $columns = 1, mixed $min = 0, mixed $max = 1, bool $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
-                fn (): int|float => $wholeNumber
89
+                fn (): int | float => $wholeNumber
90 90
                     ? mt_rand((int) $min, (int) $max)
91 91
                     : (mt_rand() / mt_getrandmax()) * ($max - $min) + $min,
92 92
                 array_fill(0, $rows * $columns, $min)
Please login to merge, or discard this patch.