Passed
Pull Request — master (#4468)
by Owen
21:21 queued 14:00
created
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/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.
src/PhpSpreadsheet/Shared/Date.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      *                         serialized timestamp.
161 161
      *                     See https://en.wikipedia.org/wiki/ISO_8601 for details of the ISO-8601 standard format.
162 162
      */
163
-    public static function convertIsoDate(mixed $value): float|int
163
+    public static function convertIsoDate(mixed $value): float | int
164 164
     {
165 165
         if (!is_string($value)) {
166 166
             throw new Exception('Non-string value supplied for Iso Date conversion');
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      *
196 196
      * @return DateTime PHP date/time object
197 197
      */
198
-    public static function excelToDateTimeObject(float|int $excelTimestamp, null|DateTimeZone|string $timeZone = null): DateTime
198
+    public static function excelToDateTimeObject(float | int $excelTimestamp, null | DateTimeZone | string $timeZone = null): DateTime
199 199
     {
200 200
         $timeZone = ($timeZone === null) ? self::getDefaultTimezone() : self::validateTimeZone($timeZone);
201 201
         if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) {
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      *
307 307
      * @return false|float MS Excel serialized date/time value
308 308
      */
309
-    public static function timestampToExcel($unixTimestamp): bool|float
309
+    public static function timestampToExcel($unixTimestamp): bool | float
310 310
     {
311 311
         if (!is_numeric($unixTimestamp)) {
312 312
             return false;
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
      *
321 321
      * @return float Excel date/time value
322 322
      */
323
-    public static function formattedPHPToExcel(int $year, int $month, int $day, int $hours = 0, int $minutes = 0, float|int $seconds = 0): float
323
+    public static function formattedPHPToExcel(int $year, int $month, int $day, int $hours = 0, int $minutes = 0, float | int $seconds = 0): float
324 324
     {
325 325
         if (self::$excelCalendar == self::CALENDAR_WINDOWS_1900) {
326 326
             //
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
      *
460 460
      * @return false|float Excel date/time serial value
461 461
      */
462
-    public static function stringToExcel(string $dateValue): bool|float
462
+    public static function stringToExcel(string $dateValue): bool | float
463 463
     {
464 464
         if (strlen($dateValue) < 2) {
465 465
             return false;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet/AutoFilter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),
54 54
      *              or an AddressRange object.
55 55
      */
56
-    public function __construct(AddressRange|string|array $range = '', ?Worksheet $worksheet = null)
56
+    public function __construct(AddressRange | string | array $range = '', ?Worksheet $worksheet = null)
57 57
     {
58 58
         if ($range !== '') {
59 59
             [, $range] = Worksheet::extractSheetTitle(Validations::validateCellRange($range), true);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     /**
72 72
      * Get AutoFilter Parent Worksheet.
73 73
      */
74
-    public function getParent(): null|Worksheet
74
+    public function getParent(): null | Worksheet
75 75
     {
76 76
         return $this->workSheet;
77 77
     }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),
106 106
      *              or an AddressRange object.
107 107
      */
108
-    public function setRange(AddressRange|string|array $range = ''): self
108
+    public function setRange(AddressRange | string | array $range = ''): self
109 109
     {
110 110
         $this->evaluated = false;
111 111
         // extract coordinate
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      *
234 234
      * @return $this
235 235
      */
236
-    public function setColumn(AutoFilter\Column|string $columnObjectOrString): static
236
+    public function setColumn(AutoFilter\Column | string $columnObjectOrString): static
237 237
     {
238 238
         $this->evaluated = false;
239 239
         if ((is_string($columnObjectOrString)) && (!empty($columnObjectOrString))) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet/Table.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      *              or an AddressRange object.
70 70
      * @param string $name (e.g. Table1)
71 71
      */
72
-    public function __construct(AddressRange|string|array $range = '', string $name = '')
72
+    public function __construct(AddressRange | string | array $range = '', string $name = '')
73 73
     {
74 74
         $this->style = new TableStyle();
75 75
         $this->autoFilter = new AutoFilter($range);
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
      *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),
273 273
      *              or an AddressRange object.
274 274
      */
275
-    public function setRange(AddressRange|string|array $range = ''): self
275
+    public function setRange(AddressRange | string | array $range = ''): self
276 276
     {
277 277
         // extract coordinate
278 278
         if ($range !== '') {
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
      * @param string|Table\Column $columnObjectOrString
438 438
      *            A simple string containing a Column ID like 'A' is permitted
439 439
      */
440
-    public function setColumn(string|Table\Column $columnObjectOrString): self
440
+    public function setColumn(string | Table\Column $columnObjectOrString): self
441 441
     {
442 442
         if ((is_string($columnObjectOrString)) && (!empty($columnObjectOrString))) {
443 443
             $column = $columnObjectOrString;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet/PageBreak.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     /**
18 18
      * @param array{0: int, 1: int}|CellAddress|string $coordinate
19 19
      */
20
-    public function __construct(int $breakType, CellAddress|string|array $coordinate, int $maxColOrRow = -1)
20
+    public function __construct(int $breakType, CellAddress | string | array $coordinate, int $maxColOrRow = -1)
21 21
     {
22 22
         $coordinate = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));
23 23
         $this->breakType = $breakType;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet/Validations.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      * @param null|array{0: int, 1: int}|CellAddress|string $cellAddress Coordinate of the cell as a string, eg: 'C5';
16 16
      *               or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.
17 17
      */
18
-    public static function validateCellAddress(null|CellAddress|string|array $cellAddress): string
18
+    public static function validateCellAddress(null | CellAddress | string | array $cellAddress): string
19 19
     {
20 20
         if (is_string($cellAddress)) {
21 21
             [$worksheet, $address] = Worksheet::extractSheetTitle($cellAddress, true);
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      *               or as an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 12]),
41 41
      *               or as a CellAddress or AddressRange object.
42 42
      */
43
-    public static function validateCellOrCellRange(AddressRange|CellAddress|int|string|array $cellRange): string
43
+    public static function validateCellOrCellRange(AddressRange | CellAddress | int | string | array $cellRange): string
44 44
     {
45 45
         if (is_string($cellRange) || is_numeric($cellRange)) {
46 46
             // Convert a single column reference like 'A' to 'A:A',
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      *               or as an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 12]),
64 64
      *               or as an AddressRange object.
65 65
      */
66
-    public static function validateCellRange(AddressRange|string|array $cellRange): string
66
+    public static function validateCellRange(AddressRange | string | array $cellRange): string
67 67
     {
68 68
         if (is_string($cellRange)) {
69 69
             [$worksheet, $addressRange] = Worksheet::extractSheetTitle($cellRange, true);
Please login to merge, or discard this patch.