Passed
Pull Request — master (#4263)
by Owen
30:17 queued 17:47
created
src/PhpSpreadsheet/Worksheet/Worksheet.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1111,7 +1111,7 @@  discard block
 block discarded – undo
1111 1111
      *
1112 1112
      * @return $this
1113 1113
      */
1114
-    public function setCellValue(CellAddress|string|array $coordinate, mixed $value, ?IValueBinder $binder = null): static
1114
+    public function setCellValue(CellAddress | string | array $coordinate, mixed $value, ?IValueBinder $binder = null): static
1115 1115
     {
1116 1116
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));
1117 1117
         $this->getCell($cellAddress)->setValue($value, $binder);
@@ -1136,7 +1136,7 @@  discard block
 block discarded – undo
1136 1136
      *
1137 1137
      * @return $this
1138 1138
      */
1139
-    public function setCellValueExplicit(CellAddress|string|array $coordinate, mixed $value, string $dataType): static
1139
+    public function setCellValueExplicit(CellAddress | string | array $coordinate, mixed $value, string $dataType): static
1140 1140
     {
1141 1141
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));
1142 1142
         $this->getCell($cellAddress)->setValueExplicit($value, $dataType);
@@ -1157,7 +1157,7 @@  discard block
 block discarded – undo
1157 1157
      *              the "active" cell, and any previous assignment becomes a disconnected reference because
1158 1158
      *              the active cell has changed.
1159 1159
      */
1160
-    public function getCell(CellAddress|string|array $coordinate): Cell
1160
+    public function getCell(CellAddress | string | array $coordinate): Cell
1161 1161
     {
1162 1162
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));
1163 1163
 
@@ -1303,7 +1303,7 @@  discard block
 block discarded – undo
1303 1303
      * @param array{0: int, 1: int}|CellAddress|string $coordinate Coordinate of the cell as a string, eg: 'C5';
1304 1304
      *               or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.
1305 1305
      */
1306
-    public function cellExists(CellAddress|string|array $coordinate): bool
1306
+    public function cellExists(CellAddress | string | array $coordinate): bool
1307 1307
     {
1308 1308
         $cellAddress = Validations::validateCellAddress($coordinate);
1309 1309
         [$sheet, $finalCoordinate] = $this->getWorksheetAndCoordinate($cellAddress);
@@ -1389,7 +1389,7 @@  discard block
 block discarded – undo
1389 1389
      *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),
1390 1390
      *              or a CellAddress or AddressRange object.
1391 1391
      */
1392
-    public function getStyle(AddressRange|CellAddress|int|string|array $cellCoordinate): Style
1392
+    public function getStyle(AddressRange | CellAddress | int | string | array $cellCoordinate): Style
1393 1393
     {
1394 1394
         $cellCoordinate = Validations::validateCellOrCellRange($cellCoordinate);
1395 1395
 
@@ -1596,7 +1596,7 @@  discard block
 block discarded – undo
1596 1596
      *
1597 1597
      * @return $this
1598 1598
      */
1599
-    public function setBreak(CellAddress|string|array $coordinate, int $break, int $max = -1): static
1599
+    public function setBreak(CellAddress | string | array $coordinate, int $break, int $max = -1): static
1600 1600
     {
1601 1601
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));
1602 1602
 
@@ -1693,7 +1693,7 @@  discard block
 block discarded – undo
1693 1693
      *
1694 1694
      * @return $this
1695 1695
      */
1696
-    public function mergeCells(AddressRange|string|array $range, string $behaviour = self::MERGE_CELL_CONTENT_EMPTY): static
1696
+    public function mergeCells(AddressRange | string | array $range, string $behaviour = self::MERGE_CELL_CONTENT_EMPTY): static
1697 1697
     {
1698 1698
         $range = Functions::trimSheetFromCellReference(Validations::validateCellRange($range));
1699 1699
 
@@ -1813,7 +1813,7 @@  discard block
 block discarded – undo
1813 1813
      *
1814 1814
      * @return $this
1815 1815
      */
1816
-    public function unmergeCells(AddressRange|string|array $range): static
1816
+    public function unmergeCells(AddressRange | string | array $range): static
1817 1817
     {
1818 1818
         $range = Functions::trimSheetFromCellReference(Validations::validateCellRange($range));
1819 1819
 
@@ -1866,7 +1866,7 @@  discard block
 block discarded – undo
1866 1866
      *
1867 1867
      * @return $this
1868 1868
      */
1869
-    public function protectCells(AddressRange|CellAddress|int|string|array $range, string $password = '', bool $alreadyHashed = false, string $name = '', string $securityDescriptor = ''): static
1869
+    public function protectCells(AddressRange | CellAddress | int | string | array $range, string $password = '', bool $alreadyHashed = false, string $name = '', string $securityDescriptor = ''): static
1870 1870
     {
1871 1871
         $range = Functions::trimSheetFromCellReference(Validations::validateCellOrCellRange($range));
1872 1872
 
@@ -1887,7 +1887,7 @@  discard block
 block discarded – undo
1887 1887
      *
1888 1888
      * @return $this
1889 1889
      */
1890
-    public function unprotectCells(AddressRange|CellAddress|int|string|array $range): static
1890
+    public function unprotectCells(AddressRange | CellAddress | int | string | array $range): static
1891 1891
     {
1892 1892
         $range = Functions::trimSheetFromCellReference(Validations::validateCellOrCellRange($range));
1893 1893
 
@@ -1946,7 +1946,7 @@  discard block
 block discarded – undo
1946 1946
      *
1947 1947
      * @return $this
1948 1948
      */
1949
-    public function setAutoFilter(AddressRange|string|array|AutoFilter $autoFilterOrRange): static
1949
+    public function setAutoFilter(AddressRange | string | array | AutoFilter $autoFilterOrRange): static
1950 1950
     {
1951 1951
         if (is_object($autoFilterOrRange) && ($autoFilterOrRange instanceof AutoFilter)) {
1952 1952
             $this->autoFilter = $autoFilterOrRange;
@@ -2091,7 +2091,7 @@  discard block
 block discarded – undo
2091 2091
      *
2092 2092
      * @return $this
2093 2093
      */
2094
-    public function freezePane(null|CellAddress|string|array $coordinate, null|CellAddress|string|array $topLeftCell = null, bool $frozenSplit = false): static
2094
+    public function freezePane(null | CellAddress | string | array $coordinate, null | CellAddress | string | array $topLeftCell = null, bool $frozenSplit = false): static
2095 2095
     {
2096 2096
         $this->panes = [
2097 2097
             'bottomRight' => null,
@@ -2601,7 +2601,7 @@  discard block
 block discarded – undo
2601 2601
      *
2602 2602
      * @return $this
2603 2603
      */
2604
-    public function removeComment(CellAddress|string|array $cellCoordinate): self
2604
+    public function removeComment(CellAddress | string | array $cellCoordinate): self
2605 2605
     {
2606 2606
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($cellCoordinate));
2607 2607
 
@@ -2626,7 +2626,7 @@  discard block
 block discarded – undo
2626 2626
      * @param array{0: int, 1: int}|CellAddress|string $cellCoordinate Coordinate of the cell as a string, eg: 'C5';
2627 2627
      *               or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.
2628 2628
      */
2629
-    public function getComment(CellAddress|string|array $cellCoordinate, bool $attachNew = true): Comment
2629
+    public function getComment(CellAddress | string | array $cellCoordinate, bool $attachNew = true): Comment
2630 2630
     {
2631 2631
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($cellCoordinate));
2632 2632
 
@@ -2691,7 +2691,7 @@  discard block
 block discarded – undo
2691 2691
      *
2692 2692
      * @return $this
2693 2693
      */
2694
-    public function setSelectedCells(AddressRange|CellAddress|int|string|array $coordinate): static
2694
+    public function setSelectedCells(AddressRange | CellAddress | int | string | array $coordinate): static
2695 2695
     {
2696 2696
         if (is_string($coordinate)) {
2697 2697
             $coordinate = Validations::definedNameToCoordinate($coordinate, $this);
@@ -3150,7 +3150,7 @@  discard block
 block discarded – undo
3150 3150
      *
3151 3151
      * @return ($range is non-empty-string ? ($returnRange is true ? array{0: string, 1: string} : string) : ($returnRange is true ? array{0: null, 1: null} : null))
3152 3152
      */
3153
-    public static function extractSheetTitle(?string $range, bool $returnRange = false): array|null|string
3153
+    public static function extractSheetTitle(?string $range, bool $returnRange = false): array | null | string
3154 3154
     {
3155 3155
         if (empty($range)) {
3156 3156
             return $returnRange ? [null, null] : null;
Please login to merge, or discard this patch.
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 ($value instanceof DateTimeWizard) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@
 block discarded – undo
252 252
      *
253 253
      * @param string $name Attribute Name
254 254
      */
255
-    public function getAttribute(string $name): null|float|int|string
255
+    public function getAttribute(string $name): null | float | int | string
256 256
     {
257 257
         if (isset($this->attributes[$name])) {
258 258
             return $this->attributes[$name];
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/CellValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
     }
71 71
 
72 72
     /** @param null|bool|float|int|string $value value to be wrapped */
73
-    protected function wrapValue(mixed $value, string $operandValueType): float|int|string
73
+    protected function wrapValue(mixed $value, string $operandValueType): float | int | string
74 74
     {
75 75
         if (!is_numeric($value) && !is_bool($value) && null !== $value) {
76 76
             if ($operandValueType === Wizard::VALUE_TYPE_LITERAL) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Operations.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
24 24
      *            with the same dimensions
25 25
      */
26
-    public static function mod(mixed $dividend, mixed $divisor): array|string|float
26
+    public static function mod(mixed $dividend, mixed $divisor): array | string | float
27 27
     {
28 28
         if (is_array($dividend) || is_array($divisor)) {
29 29
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $dividend, $divisor);
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
60 60
      *            with the same dimensions
61 61
      */
62
-    public static function power(null|array|bool|float|int|string $x, null|array|bool|float|int|string $y): array|float|int|string
62
+    public static function power(null | array | bool | float | int | string $x, null | array | bool | float | int | string $y): array | float | int | string
63 63
     {
64 64
         if (is_array($x) || is_array($y)) {
65 65
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $x, $y);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      *
97 97
      * @param mixed ...$args Data values
98 98
      */
99
-    public static function product(mixed ...$args): string|float
99
+    public static function product(mixed ...$args): string | float
100 100
     {
101 101
         $args = array_filter(
102 102
             Functions::flattenArray($args),
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      * @return array|int|string If an array of numbers is passed as an argument, then the returned result will also be an array
137 137
      *            with the same dimensions
138 138
      */
139
-    public static function quotient(mixed $numerator, mixed $denominator): array|string|int
139
+    public static function quotient(mixed $numerator, mixed $denominator): array | string | int
140 140
     {
141 141
         if (is_array($numerator) || is_array($denominator)) {
142 142
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $numerator, $denominator);
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
         $count = count($cfRule->colorScale->cfvo);
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Worksheet/Table/TableTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@
 block discarded – undo
158 158
     /**
159 159
      * @param AddressRange<CellAddress>|array{0: int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|string $fullRange
160 160
      */
161
-    public function xtestSetRangeValidRange(string|array|AddressRange $fullRange, string $actualRange): void
161
+    public function xtestSetRangeValidRange(string | array | AddressRange $fullRange, string $actualRange): void
162 162
     {
163 163
         $table = new Table(self::INITIAL_RANGE);
164 164
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart/Properties.php 1 patch
Spacing   +10 added lines, -10 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,
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
     /**
404 404
      * Get value of array element.
405 405
      */
406
-    protected function getArrayElementsValue(array $properties, array|int|string $elements): mixed
406
+    protected function getArrayElementsValue(array $properties, array | int | string $elements): mixed
407 407
     {
408 408
         $reference = &$properties;
409 409
         if (!is_array($elements)) {
@@ -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 [
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
     /**
727 727
      * Get Line Color Property.
728 728
      */
729
-    public function getLineColorProperty(string $propertyName): null|int|string
729
+    public function getLineColorProperty(string $propertyName): null | int | string
730 730
     {
731 731
         return $this->lineColor->getColorProperty($propertyName);
732 732
     }
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
      * Set Line Style Properties.
736 736
      */
737 737
     public function setLineStyleProperties(
738
-        null|float|int|string $lineWidth = null,
738
+        null | float | int | string $lineWidth = null,
739 739
         ?string $compoundType = '',
740 740
         ?string $dashType = '',
741 741
         ?string $capType = '',
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
     /**
832 832
      * Get Line Style Property.
833 833
      */
834
-    public function getLineStyleProperty(array|string $elements): ?string
834
+    public function getLineStyleProperty(array | string $elements): ?string
835 835
     {
836 836
         $retVal = $this->getArrayElementsValue($this->lineStyleProperties, $elements);
837 837
         if (is_scalar($retVal)) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Style/ConditionalFormatting/CellMatcher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         };
115 115
     }
116 116
 
117
-    protected function wrapValue(mixed $value): float|int|string
117
+    protected function wrapValue(mixed $value): float | int | string
118 118
     {
119 119
         if (!is_numeric($value)) {
120 120
             if (is_bool($value)) {
@@ -129,14 +129,14 @@  discard block
 block discarded – undo
129 129
         return $value;
130 130
     }
131 131
 
132
-    protected function wrapCellValue(): float|int|string
132
+    protected function wrapCellValue(): float | int | string
133 133
     {
134 134
         $this->cell = $this->worksheet->getCell([$this->cellColumn, $this->cellRow]);
135 135
 
136 136
         return $this->wrapValue($this->cell->getCalculatedValue());
137 137
     }
138 138
 
139
-    protected function conditionCellAdjustment(array $matches): float|int|string
139
+    protected function conditionCellAdjustment(array $matches): float | int | string
140 140
     {
141 141
         $column = $matches[6];
142 142
         $row = $matches[7];
Please login to merge, or discard this patch.