Passed
Pull Request — master (#4445)
by Owen
20:58
created
src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      *         If an array of values is passed for the $startDate or $endDays,arguments, then the returned result
37 37
      *            will also be an array with matching dimensions
38 38
      */
39
-    public static function date(mixed $startDate, array|int|string $endDays, mixed ...$dateArgs): array|float|int|DateTime|string
39
+    public static function date(mixed $startDate, array | int | string $endDays, mixed ...$dateArgs): array | float | int | DateTime | string
40 40
     {
41 41
         if (is_array($startDate) || is_array($endDays)) {
42 42
             return self::evaluateArrayArgumentsSubset(
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     /**
74 74
      * Use incrementing logic to determine Workday.
75 75
      */
76
-    private static function incrementing(float $startDate, int $endDays, array $holidayArray): float|int|DateTime
76
+    private static function incrementing(float $startDate, int $endDays, array $holidayArray): float | int | DateTime
77 77
     {
78 78
         //    Adjust the start date if it falls over a weekend
79 79
         $startDoW = self::getWeekDay($startDate, 3);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     /**
133 133
      * Use decrementing logic to determine Workday.
134 134
      */
135
-    private static function decrementing(float $startDate, int $endDays, array $holidayArray): float|int|DateTime
135
+    private static function decrementing(float $startDate, int $endDays, array $holidayArray): float | int | DateTime
136 136
     {
137 137
         //    Adjust the start date if it falls over a weekend
138 138
         $startDoW = self::getWeekDay($startDate, 3);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/MaxMinBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 abstract class MaxMinBase
6 6
 {
7
-    protected static function datatypeAdjustmentAllowStrings(int|float|string|bool $value): int|float
7
+    protected static function datatypeAdjustmentAllowStrings(int | float | string | bool $value): int | float
8 8
     {
9 9
         if (is_bool($value)) {
10 10
             return (int) $value;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 abstract class VarianceBase
8 8
 {
9
-    protected static function datatypeAdjustmentAllowStrings(int|float|string|bool $value): int|float
9
+    protected static function datatypeAdjustmentAllowStrings(int | float | string | bool $value): int | float
10 10
     {
11 11
         if (is_bool($value)) {
12 12
             return (int) $value;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/StringHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
      * Formats a numeric value as a string for output in various output writers forcing
330 330
      * point as decimal separator in case locale is other than English.
331 331
      */
332
-    public static function formatNumber(float|int|string|null $numericValue): string
332
+    public static function formatNumber(float | int | string | null $numericValue): string
333 333
     {
334 334
         if (is_float($numericValue)) {
335 335
             return str_replace(',', '.', (string) $numericValue);
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
     {
385 385
         // characters
386 386
         $chars = self::convertEncoding($textValue, 'UTF-16LE', 'UTF-8');
387
-        $ln = (int) (strlen($chars) / 2);  // N.B. - strlen, not mb_strlen issue #642
387
+        $ln = (int) (strlen($chars) / 2); // N.B. - strlen, not mb_strlen issue #642
388 388
 
389 389
         return pack('vC', $ln, 0x0001) . $chars;
390 390
     }
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
      *
639 639
      * @return float|string string or only the leading numeric part of the string
640 640
      */
641
-    public static function testStringAsNumeric(string $textValue): float|string
641
+    public static function testStringAsNumeric(string $textValue): float | string
642 642
     {
643 643
         if (is_numeric($textValue)) {
644 644
             return $textValue;
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(int $index): bool|DataSeriesValues
235
+    public function getPlotLabelByIndex(int $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(int $index): bool|DataSeriesValues
260
+    public function getPlotCategoryByIndex(int $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(int $index): bool|DataSeriesValues
307
+    public function getPlotValuesByIndex(int $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/Reader/Xls/Escher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
     /**
52 52
      * The object to be returned by the reader. Modified during load.
53 53
      */
54
-    private BSE|BstoreContainer|DgContainer|DggContainer|\PhpOffice\PhpSpreadsheet\Shared\Escher|SpContainer|SpgrContainer $object;
54
+    private BSE | BstoreContainer | DgContainer | DggContainer | \PhpOffice\PhpSpreadsheet\Shared\Escher | SpContainer | SpgrContainer $object;
55 55
 
56 56
     /**
57 57
      * Create a new Escher instance.
58 58
      */
59
-    public function __construct(BSE|BstoreContainer|DgContainer|DggContainer|\PhpOffice\PhpSpreadsheet\Shared\Escher|SpContainer|SpgrContainer $object)
59
+    public function __construct(BSE | BstoreContainer | DgContainer | DggContainer | \PhpOffice\PhpSpreadsheet\Shared\Escher | SpContainer | SpgrContainer $object)
60 60
     {
61 61
         $this->object = $object;
62 62
     }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     /**
86 86
      * Load Escher stream data. May be a partial Escher stream.
87 87
      */
88
-    public function load(string $data): BSE|BstoreContainer|DgContainer|DggContainer|\PhpOffice\PhpSpreadsheet\Shared\Escher|SpContainer|SpgrContainer
88
+    public function load(string $data): BSE | BstoreContainer | DgContainer | DggContainer | \PhpOffice\PhpSpreadsheet\Shared\Escher | SpContainer | SpgrContainer
89 89
     {
90 90
         $this->data = $data;
91 91
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Xls/Escher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     /**
18 18
      * The object we are writing.
19 19
      */
20
-    private Blip|BSE|BstoreContainer|DgContainer|DggContainer|Escher|SpContainer|SpgrContainer|SharedEscher $object;
20
+    private Blip | BSE | BstoreContainer | DgContainer | DggContainer | Escher | SpContainer | SpgrContainer | SharedEscher $object;
21 21
 
22 22
     /**
23 23
      * The written binary data.
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     /**
38 38
      * Constructor.
39 39
      */
40
-    public function __construct(Blip|BSE|BstoreContainer|DgContainer|DggContainer|self|SpContainer|SpgrContainer|SharedEscher $object)
40
+    public function __construct(Blip | BSE | BstoreContainer | DgContainer | DggContainer | self | SpContainer | SpgrContainer | SharedEscher $object)
41 41
     {
42 42
         $this->object = $object;
43 43
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Helper/Dimension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      *                If this is a height, then size is measured in pixels ()
49 49
      *                   or in points () if $unit is null.
50 50
      */
51
-    protected float|int $size;
51
+    protected float | int $size;
52 52
 
53 53
     protected ?string $unit = null;
54 54
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      * Phpstan bug has been fixed; this function allows us to
57 57
      * pass Phpstan whether fixed or not.
58 58
      */
59
-    private static function stanBugFixed(array|int|null $value): array
59
+    private static function stanBugFixed(array | int | null $value): array
60 60
     {
61 61
         return is_array($value) ? $value : [null, null];
62 62
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Cell/CellAddress.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@
 block discarded – undo
34 34
      * @phpstan-assert int|numeric-string $columnId
35 35
      * @phpstan-assert int|numeric-string $rowId
36 36
      */
37
-    private static function validateColumnAndRow(int|string $columnId, int|string $rowId): void
37
+    private static function validateColumnAndRow(int | string $columnId, int | string $rowId): void
38 38
     {
39 39
         if (!is_numeric($columnId) || $columnId <= 0 || !is_numeric($rowId) || $rowId <= 0) {
40 40
             throw new Exception('Row and Column Ids must be positive integer values');
41 41
         }
42 42
     }
43 43
 
44
-    public static function fromColumnAndRow(int|string $columnId, int|string $rowId, ?Worksheet $worksheet = null): self
44
+    public static function fromColumnAndRow(int | string $columnId, int | string $rowId, ?Worksheet $worksheet = null): self
45 45
     {
46 46
         self::validateColumnAndRow($columnId, $rowId);
47 47
 
Please login to merge, or discard this patch.