Passed
Pull Request — master (#3860)
by Adrien
19:40 queued 09:20
created
src/PhpSpreadsheet/Style/NumberFormat/Wizard/DateTime.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
         $this->formatBlocks = array_map([$this, 'mapFormatBlocks'], $formatBlocks);
29 29
     }
30 30
 
31
-    private function mapFormatBlocks(DateTimeWizard|string $value): string
31
+    private function mapFormatBlocks(DateTimeWizard | string $value): string
32 32
     {
33 33
         // Any date masking codes are returned as lower case values
34 34
         if (is_object($value)) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart/PlotArea.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
     /**
66 66
      * Get Number of Plot Series.
67 67
      */
68
-    public function getPlotSeriesCount(): int|float
68
+    public function getPlotSeriesCount(): int | float
69 69
     {
70 70
         $seriesCount = 0;
71 71
         foreach ($this->plotSeries as $plot) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart/Title.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      *
19 19
      * @var array<RichText|string>|RichText|string
20 20
      */
21
-    private array|RichText|string $caption;
21
+    private array | RichText | string $caption;
22 22
 
23 23
     /**
24 24
      * Allow overlay of other elements?
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     /**
38 38
      * Create a new Title.
39 39
      */
40
-    public function __construct(array|RichText|string $caption = '', ?Layout $layout = null, bool $overlay = false)
40
+    public function __construct(array | RichText | string $caption = '', ?Layout $layout = null, bool $overlay = false)
41 41
     {
42 42
         $this->caption = $caption;
43 43
         $this->layout = $layout;
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     /**
48 48
      * Get caption.
49 49
      */
50
-    public function getCaption(): array|RichText|string
50
+    public function getCaption(): array | RichText | string
51 51
     {
52 52
         return $this->caption;
53 53
     }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      *
87 87
      * @return $this
88 88
      */
89
-    public function setCaption(array|RichText|string $caption): static
89
+    public function setCaption(array | RichText | string $caption): static
90 90
     {
91 91
         $this->caption = $caption;
92 92
 
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
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
         int $pointCount = 0,
87 87
         ?array $dataValues = [],
88 88
         ?string $marker = null,
89
-        null|ChartColor|array|string $fillColor = null,
90
-        int|string $pointSize = 3
89
+        null | ChartColor | array | string $fillColor = null,
90
+        int | string $pointSize = 3
91 91
     ) {
92 92
         parent::__construct();
93 93
         $this->markerFillColor = new ChartColor();
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
      *
285 285
      * @return string|string[] HEX color or array with HEX colors
286 286
      */
287
-    public function getFillColor(): string|array
287
+    public function getFillColor(): string | array
288 288
     {
289 289
         if ($this->fillColor === null) {
290 290
             return '';
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
     /**
348 348
      * Get line width for series.
349 349
      */
350
-    public function getLineWidth(): null|float|int
350
+    public function getLineWidth(): null | float | int
351 351
     {
352 352
         return $this->lineStyleProperties['width'];
353 353
     }
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
      *
358 358
      * @return $this
359 359
      */
360
-    public function setLineWidth(null|float|int $width): static
360
+    public function setLineWidth(null | float | int $width): static
361 361
     {
362 362
         $this->lineStyleProperties['width'] = $width;
363 363
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart/Properties.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         return ((float) $value) / self::PERCENTAGE_MULTIPLIER;
179 179
     }
180 180
 
181
-    protected function setColorProperties(?string $color, null|float|int|string $alpha, ?string $colorType): array
181
+    protected function setColorProperties(?string $color, null | float | int | string $alpha, ?string $colorType): array
182 182
     {
183 183
         return [
184 184
             'type' => $colorType,
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
     /**
438 438
      * Get Glow Property.
439 439
      */
440
-    public function getGlowProperty(array|string $property): null|array|float|int|string
440
+    public function getGlowProperty(array | string $property): null | array | float | int | string
441 441
     {
442 442
         $retVal = null;
443 443
         if ($property === 'size') {
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
     /**
459 459
      * Get Glow Color Property.
460 460
      */
461
-    public function getGlowColor(string $propertyName): null|int|string
461
+    public function getGlowColor(string $propertyName): null | int | string
462 462
     {
463 463
         return $this->glowColor->getColorProperty($propertyName);
464 464
     }
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
     /**
523 523
      * Set Shadow Properties.
524 524
      */
525
-    public function setShadowProperties(int $presets, ?string $colorValue = null, ?string $colorType = null, null|float|int|string $colorAlpha = null, ?float $blur = null, ?int $angle = null, ?float $distance = null): void
525
+    public function setShadowProperties(int $presets, ?string $colorValue = null, ?string $colorType = null, null | float | int | string $colorAlpha = null, ?float $blur = null, ?int $angle = null, ?float $distance = null): void
526 526
     {
527 527
         $this->activateObject()->setShadowPresetsProperties((int) $presets);
528 528
         if ($presets === 0) {
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
      *
606 606
      * @return $this
607 607
      */
608
-    protected function setShadowAngle(null|float|int|string $angle)
608
+    protected function setShadowAngle(null | float | int | string $angle)
609 609
     {
610 610
         if (is_numeric($angle)) {
611 611
             $this->shadowProperties['direction'] = $angle;
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
      *
639 639
      * @param string|string[] $elements
640 640
      */
641
-    public function getShadowProperty($elements): array|string|null
641
+    public function getShadowProperty($elements): array | string | null
642 642
     {
643 643
         if ($elements === 'color') {
644 644
             return [
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
     /**
719 719
      * Get Line Color Property.
720 720
      */
721
-    public function getLineColorProperty(string $propertyName): null|int|string
721
+    public function getLineColorProperty(string $propertyName): null | int | string
722 722
     {
723 723
         return $this->lineColor->getColorProperty($propertyName);
724 724
     }
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
      * Set Line Style Properties.
728 728
      */
729 729
     public function setLineStyleProperties(
730
-        null|float|int|string $lineWidth = null,
730
+        null | float | int | string $lineWidth = null,
731 731
         ?string $compoundType = '',
732 732
         ?string $dashType = '',
733 733
         ?string $capType = '',
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
     /**
824 824
      * Get Line Style Property.
825 825
      */
826
-    public function getLineStyleProperty(array|string $elements): ?string
826
+    public function getLineStyleProperty(array | string $elements): ?string
827 827
     {
828 828
         return $this->getArrayElementsValue($this->lineStyleProperties, $elements);
829 829
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart/DataSeries.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
      * @param DataSeriesValues[] $plotValues
114 114
      */
115 115
     public function __construct(
116
-        null|string $plotType = null,
117
-        null|string $plotGrouping = null,
116
+        null | string $plotType = null,
117
+        null | string $plotGrouping = null,
118 118
         array $plotOrder = [],
119 119
         array $plotLabel = [],
120 120
         array $plotCategory = [],
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      *
233 233
      * @return DataSeriesValues|false
234 234
      */
235
-    public function getPlotLabelByIndex(mixed $index): bool|DataSeriesValues
235
+    public function getPlotLabelByIndex(mixed $index): bool | DataSeriesValues
236 236
     {
237 237
         $keys = array_keys($this->plotLabel);
238 238
         if (in_array($index, $keys)) {
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
      *
258 258
      * @return DataSeriesValues|false
259 259
      */
260
-    public function getPlotCategoryByIndex(mixed $index): bool|DataSeriesValues
260
+    public function getPlotCategoryByIndex(mixed $index): bool | DataSeriesValues
261 261
     {
262 262
         $keys = array_keys($this->plotCategory);
263 263
         if (in_array($index, $keys)) {
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
      *
305 305
      * @return DataSeriesValues|false
306 306
      */
307
-    public function getPlotValuesByIndex(mixed $index): bool|DataSeriesValues
307
+    public function getPlotValuesByIndex(mixed $index): bool | DataSeriesValues
308 308
     {
309 309
         $keys = array_keys($this->plotValues);
310 310
         if (in_array($index, $keys)) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart/ChartColor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         return $this;
82 82
     }
83 83
 
84
-    public function setColorProperties(?string $color, null|float|int|string $alpha = null, ?string $type = null, null|float|int|string $brightness = null): self
84
+    public function setColorProperties(?string $color, null | float | int | string $alpha = null, ?string $type = null, null | float | int | string $brightness = null): self
85 85
     {
86 86
         if (empty($type) && !empty($color)) {
87 87
             if (str_starts_with($color, '*')) {
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     /**
133 133
      * Get Color Property.
134 134
      */
135
-    public function getColorProperty(string $propertyName): null|int|string
135
+    public function getColorProperty(string $propertyName): null | int | string
136 136
     {
137 137
         $retVal = null;
138 138
         if ($propertyName === 'value') {
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         return (string) (100 - $alpha) . '000';
154 154
     }
155 155
 
156
-    public static function alphaFromXml(float|int|string $alpha): int
156
+    public static function alphaFromXml(float | int | string $alpha): int
157 157
     {
158 158
         return 100 - ((int) $alpha / 1000);
159 159
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart/Layout.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@
 block discarded – undo
232 232
     /**
233 233
      * Get X-Position.
234 234
      */
235
-    public function getXPosition(): null|float|int
235
+    public function getXPosition(): null | float | int
236 236
     {
237 237
         return $this->xPos;
238 238
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xlsx.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1955,12 +1955,12 @@
 block discarded – undo
1955 1955
         }
1956 1956
     }
1957 1957
 
1958
-    private static function getArrayItem(null|array|bool|SimpleXMLElement $array, int|string $key = 0): mixed
1958
+    private static function getArrayItem(null | array | bool | SimpleXMLElement $array, int | string $key = 0): mixed
1959 1959
     {
1960 1960
         return ($array === null || is_bool($array)) ? null : ($array[$key] ?? null);
1961 1961
     }
1962 1962
 
1963
-    private static function dirAdd(null|SimpleXMLElement|string $base, null|SimpleXMLElement|string $add): string
1963
+    private static function dirAdd(null | SimpleXMLElement | string $base, null | SimpleXMLElement | string $add): string
1964 1964
     {
1965 1965
         $base = (string) $base;
1966 1966
         $add = (string) $add;
Please login to merge, or discard this patch.