Passed
Pull Request — master (#3936)
by Mark
21:20
created
src/PhpSpreadsheet/Worksheet/Worksheet.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1110,7 +1110,7 @@  discard block
 block discarded – undo
1110 1110
      *
1111 1111
      * @return $this
1112 1112
      */
1113
-    public function setCellValue(CellAddress|string|array $coordinate, mixed $value, ?IValueBinder $binder = null): static
1113
+    public function setCellValue(CellAddress | string | array $coordinate, mixed $value, ?IValueBinder $binder = null): static
1114 1114
     {
1115 1115
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));
1116 1116
         $this->getCell($cellAddress)->setValue($value, $binder);
@@ -1135,7 +1135,7 @@  discard block
 block discarded – undo
1135 1135
      *
1136 1136
      * @return $this
1137 1137
      */
1138
-    public function setCellValueExplicit(CellAddress|string|array $coordinate, mixed $value, string $dataType): static
1138
+    public function setCellValueExplicit(CellAddress | string | array $coordinate, mixed $value, string $dataType): static
1139 1139
     {
1140 1140
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));
1141 1141
         $this->getCell($cellAddress)->setValueExplicit($value, $dataType);
@@ -1156,7 +1156,7 @@  discard block
 block discarded – undo
1156 1156
      *              the "active" cell, and any previous assignment becomes a disconnected reference because
1157 1157
      *              the active cell has changed.
1158 1158
      */
1159
-    public function getCell(CellAddress|string|array $coordinate): Cell
1159
+    public function getCell(CellAddress | string | array $coordinate): Cell
1160 1160
     {
1161 1161
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));
1162 1162
 
@@ -1302,7 +1302,7 @@  discard block
 block discarded – undo
1302 1302
      * @param array{0: int, 1: int}|CellAddress|string $coordinate Coordinate of the cell as a string, eg: 'C5';
1303 1303
      *               or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.
1304 1304
      */
1305
-    public function cellExists(CellAddress|string|array $coordinate): bool
1305
+    public function cellExists(CellAddress | string | array $coordinate): bool
1306 1306
     {
1307 1307
         $cellAddress = Validations::validateCellAddress($coordinate);
1308 1308
         [$sheet, $finalCoordinate] = $this->getWorksheetAndCoordinate($cellAddress);
@@ -1388,7 +1388,7 @@  discard block
 block discarded – undo
1388 1388
      *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),
1389 1389
      *              or a CellAddress or AddressRange object.
1390 1390
      */
1391
-    public function getStyle(AddressRange|CellAddress|int|string|array $cellCoordinate): Style
1391
+    public function getStyle(AddressRange | CellAddress | int | string | array $cellCoordinate): Style
1392 1392
     {
1393 1393
         $cellCoordinate = Validations::validateCellOrCellRange($cellCoordinate);
1394 1394
 
@@ -1595,7 +1595,7 @@  discard block
 block discarded – undo
1595 1595
      *
1596 1596
      * @return $this
1597 1597
      */
1598
-    public function setBreak(CellAddress|string|array $coordinate, int $break, int $max = -1): static
1598
+    public function setBreak(CellAddress | string | array $coordinate, int $break, int $max = -1): static
1599 1599
     {
1600 1600
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));
1601 1601
 
@@ -1692,7 +1692,7 @@  discard block
 block discarded – undo
1692 1692
      *
1693 1693
      * @return $this
1694 1694
      */
1695
-    public function mergeCells(AddressRange|string|array $range, string $behaviour = self::MERGE_CELL_CONTENT_EMPTY): static
1695
+    public function mergeCells(AddressRange | string | array $range, string $behaviour = self::MERGE_CELL_CONTENT_EMPTY): static
1696 1696
     {
1697 1697
         $range = Functions::trimSheetFromCellReference(Validations::validateCellRange($range));
1698 1698
 
@@ -1812,7 +1812,7 @@  discard block
 block discarded – undo
1812 1812
      *
1813 1813
      * @return $this
1814 1814
      */
1815
-    public function unmergeCells(AddressRange|string|array $range): static
1815
+    public function unmergeCells(AddressRange | string | array $range): static
1816 1816
     {
1817 1817
         $range = Functions::trimSheetFromCellReference(Validations::validateCellRange($range));
1818 1818
 
@@ -1865,7 +1865,7 @@  discard block
 block discarded – undo
1865 1865
      *
1866 1866
      * @return $this
1867 1867
      */
1868
-    public function protectCells(AddressRange|CellAddress|int|string|array $range, string $password, bool $alreadyHashed = false): static
1868
+    public function protectCells(AddressRange | CellAddress | int | string | array $range, string $password, bool $alreadyHashed = false): static
1869 1869
     {
1870 1870
         $range = Functions::trimSheetFromCellReference(Validations::validateCellOrCellRange($range));
1871 1871
 
@@ -1886,7 +1886,7 @@  discard block
 block discarded – undo
1886 1886
      *
1887 1887
      * @return $this
1888 1888
      */
1889
-    public function unprotectCells(AddressRange|CellAddress|int|string|array $range): static
1889
+    public function unprotectCells(AddressRange | CellAddress | int | string | array $range): static
1890 1890
     {
1891 1891
         $range = Functions::trimSheetFromCellReference(Validations::validateCellOrCellRange($range));
1892 1892
 
@@ -1927,7 +1927,7 @@  discard block
 block discarded – undo
1927 1927
      *
1928 1928
      * @return $this
1929 1929
      */
1930
-    public function setAutoFilter(AddressRange|string|array|AutoFilter $autoFilterOrRange): static
1930
+    public function setAutoFilter(AddressRange | string | array | AutoFilter $autoFilterOrRange): static
1931 1931
     {
1932 1932
         if (is_object($autoFilterOrRange) && ($autoFilterOrRange instanceof AutoFilter)) {
1933 1933
             $this->autoFilter = $autoFilterOrRange;
@@ -2072,7 +2072,7 @@  discard block
 block discarded – undo
2072 2072
      *
2073 2073
      * @return $this
2074 2074
      */
2075
-    public function freezePane(null|CellAddress|string|array $coordinate, null|CellAddress|string|array $topLeftCell = null, bool $frozenSplit = false): static
2075
+    public function freezePane(null | CellAddress | string | array $coordinate, null | CellAddress | string | array $topLeftCell = null, bool $frozenSplit = false): static
2076 2076
     {
2077 2077
         $this->panes = [
2078 2078
             'bottomRight' => null,
@@ -2582,7 +2582,7 @@  discard block
 block discarded – undo
2582 2582
      *
2583 2583
      * @return $this
2584 2584
      */
2585
-    public function removeComment(CellAddress|string|array $cellCoordinate): self
2585
+    public function removeComment(CellAddress | string | array $cellCoordinate): self
2586 2586
     {
2587 2587
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($cellCoordinate));
2588 2588
 
@@ -2607,7 +2607,7 @@  discard block
 block discarded – undo
2607 2607
      * @param array{0: int, 1: int}|CellAddress|string $cellCoordinate Coordinate of the cell as a string, eg: 'C5';
2608 2608
      *               or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.
2609 2609
      */
2610
-    public function getComment(CellAddress|string|array $cellCoordinate): Comment
2610
+    public function getComment(CellAddress | string | array $cellCoordinate): Comment
2611 2611
     {
2612 2612
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($cellCoordinate));
2613 2613
 
@@ -2670,7 +2670,7 @@  discard block
 block discarded – undo
2670 2670
      *
2671 2671
      * @return $this
2672 2672
      */
2673
-    public function setSelectedCells(AddressRange|CellAddress|int|string|array $coordinate): static
2673
+    public function setSelectedCells(AddressRange | CellAddress | int | string | array $coordinate): static
2674 2674
     {
2675 2675
         if (is_string($coordinate)) {
2676 2676
             $coordinate = Validations::definedNameToCoordinate($coordinate, $this);
@@ -3100,7 +3100,7 @@  discard block
 block discarded – undo
3100 3100
      *
3101 3101
      * @return ($range is non-empty-string ? ($returnRange is true ? array{0: string, 1: string} : string) : ($returnRange is true ? array{0: null, 1: null} : null))
3102 3102
      */
3103
-    public static function extractSheetTitle(?string $range, bool $returnRange = false): array|null|string
3103
+    public static function extractSheetTitle(?string $range, bool $returnRange = false): array | null | string
3104 3104
     {
3105 3105
         if (empty($range)) {
3106 3106
             return $returnRange ? [null, null] : null;
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.
src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@
 block discarded – undo
282 282
         return $dataBar;
283 283
     }
284 284
 
285
-    private function readColorScale(SimpleXMLElement|stdClass $cfRule): ConditionalColorScale
285
+    private function readColorScale(SimpleXMLElement | stdClass $cfRule): ConditionalColorScale
286 286
     {
287 287
         $colorScale = new ConditionalColorScale();
288 288
         $types = [];
Please login to merge, or discard this patch.
samples/Chart33a/33_Chart_create_line_dateaxis.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     true, // plotVisibleOnly
182 182
     DataSeries::EMPTY_AS_GAP, // displayBlanksAs
183 183
     null, // xAxisLabel
184
-    $yAxisLabel,  // yAxisLabel
184
+    $yAxisLabel, // yAxisLabel
185 185
     // added xAxis for correct date display
186 186
     $xAxis, // xAxis
187 187
     $yAxis, // yAxis
@@ -291,13 +291,13 @@  discard block
 block discarded – undo
291 291
     null, // minor_tick_mark
292 292
     $dateMinMax['min'], // minimum calculate this from the earliest data: 'Data!$A$2'
293 293
     $dateMinMax['max'], // maximum calculate this from the last data:     'Data!$A$'.($nrows+1)
294
-    $tickMarkInterval,  // majorUnit determines tickmarks & Gridlines ?
294
+    $tickMarkInterval, // majorUnit determines tickmarks & Gridlines ?
295 295
     null, // minorUnit
296 296
     null, // textRotation
297 297
     null, // hidden
298 298
     'days', // baseTimeUnit
299 299
     'months', // majorTimeUnit,
300
-    'months',   // minorTimeUnit
300
+    'months', // minorTimeUnit
301 301
 );
302 302
 
303 303
 $yAxisLabel = new Title('Value ($k)');
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
     true, // plotVisibleOnly
318 318
     DataSeries::EMPTY_AS_GAP, // displayBlanksAs
319 319
     null, // xAxisLabel
320
-    $yAxisLabel,  // yAxisLabel
320
+    $yAxisLabel, // yAxisLabel
321 321
     // added xAxis for correct date display
322 322
     $xAxis, // xAxis
323 323
     $yAxis, // yAxis
Please login to merge, or discard this patch.
samples/Chart33b/33_Chart_create_scatter5_trendlines.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     true, // plotVisibleOnly
156 156
     DataSeries::EMPTY_AS_GAP, // displayBlanksAs
157 157
     null, // xAxisLabel
158
-    $yAxisLabel,  // yAxisLabel
158
+    $yAxisLabel, // yAxisLabel
159 159
     // added xAxis for correct date display
160 160
     $xAxis, // xAxis
161 161
     //  $yAxis, // yAxis
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
     true, // plotVisibleOnly
252 252
     DataSeries::EMPTY_AS_GAP, // displayBlanksAs
253 253
     null, // xAxisLabel
254
-    $yAxisLabel,  // yAxisLabel
254
+    $yAxisLabel, // yAxisLabel
255 255
     // added xAxis for correct date display
256 256
     $xAxis, // xAxis
257 257
     //  $yAxis, // yAxis
Please login to merge, or discard this patch.
samples/Chart33b/33_Chart_create_scatter3.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
 
130 130
 $yAxis = new ChartAxis();
131 131
 $yAxis->setLineStyleProperties(
132
-    2.5,     // width in points
132
+    2.5, // width in points
133 133
     Properties::LINE_STYLE_COMPOUND_SIMPLE,
134 134
     Properties::LINE_STYLE_DASH_DASH_DOT,
135 135
     Properties::LINE_STYLE_CAP_FLAT,
Please login to merge, or discard this patch.