Passed
Pull Request — master (#4468)
by Owen
21:21 queued 14:00
created
tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/OffsetTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 class OffsetTest extends AllSetupTeardown
12 12
 {
13 13
     #[DataProvider('providerOFFSET')]
14
-    public function testOFFSET(mixed $expectedResult, null|string $cellReference = null): void
14
+    public function testOFFSET(mixed $expectedResult, null | string $cellReference = null): void
15 15
     {
16 16
         $result = LookupRef\Offset::OFFSET($cellReference);
17 17
         self::assertSame($expectedResult, $result);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet/Worksheet.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1112,7 +1112,7 @@  discard block
 block discarded – undo
1112 1112
      *
1113 1113
      * @return $this
1114 1114
      */
1115
-    public function setCellValue(CellAddress|string|array $coordinate, mixed $value, ?IValueBinder $binder = null): static
1115
+    public function setCellValue(CellAddress | string | array $coordinate, mixed $value, ?IValueBinder $binder = null): static
1116 1116
     {
1117 1117
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));
1118 1118
         $this->getCell($cellAddress)->setValue($value, $binder);
@@ -1137,7 +1137,7 @@  discard block
 block discarded – undo
1137 1137
      *
1138 1138
      * @return $this
1139 1139
      */
1140
-    public function setCellValueExplicit(CellAddress|string|array $coordinate, mixed $value, string $dataType): static
1140
+    public function setCellValueExplicit(CellAddress | string | array $coordinate, mixed $value, string $dataType): static
1141 1141
     {
1142 1142
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));
1143 1143
         $this->getCell($cellAddress)->setValueExplicit($value, $dataType);
@@ -1158,7 +1158,7 @@  discard block
 block discarded – undo
1158 1158
      *              the "active" cell, and any previous assignment becomes a disconnected reference because
1159 1159
      *              the active cell has changed.
1160 1160
      */
1161
-    public function getCell(CellAddress|string|array $coordinate): Cell
1161
+    public function getCell(CellAddress | string | array $coordinate): Cell
1162 1162
     {
1163 1163
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));
1164 1164
 
@@ -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);
@@ -1393,7 +1393,7 @@  discard block
 block discarded – undo
1393 1393
      *              or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]),
1394 1394
      *              or a CellAddress or AddressRange object.
1395 1395
      */
1396
-    public function getStyle(AddressRange|CellAddress|int|string|array $cellCoordinate): Style
1396
+    public function getStyle(AddressRange | CellAddress | int | string | array $cellCoordinate): Style
1397 1397
     {
1398 1398
         if (is_string($cellCoordinate)) {
1399 1399
             $cellCoordinate = Validations::definedNameToCoordinate($cellCoordinate, $this);
@@ -1639,7 +1639,7 @@  discard block
 block discarded – undo
1639 1639
      *
1640 1640
      * @return $this
1641 1641
      */
1642
-    public function setBreak(CellAddress|string|array $coordinate, int $break, int $max = -1): static
1642
+    public function setBreak(CellAddress | string | array $coordinate, int $break, int $max = -1): static
1643 1643
     {
1644 1644
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($coordinate));
1645 1645
 
@@ -1736,7 +1736,7 @@  discard block
 block discarded – undo
1736 1736
      *
1737 1737
      * @return $this
1738 1738
      */
1739
-    public function mergeCells(AddressRange|string|array $range, string $behaviour = self::MERGE_CELL_CONTENT_EMPTY): static
1739
+    public function mergeCells(AddressRange | string | array $range, string $behaviour = self::MERGE_CELL_CONTENT_EMPTY): static
1740 1740
     {
1741 1741
         $range = Functions::trimSheetFromCellReference(Validations::validateCellRange($range));
1742 1742
 
@@ -1856,7 +1856,7 @@  discard block
 block discarded – undo
1856 1856
      *
1857 1857
      * @return $this
1858 1858
      */
1859
-    public function unmergeCells(AddressRange|string|array $range): static
1859
+    public function unmergeCells(AddressRange | string | array $range): static
1860 1860
     {
1861 1861
         $range = Functions::trimSheetFromCellReference(Validations::validateCellRange($range));
1862 1862
 
@@ -1909,7 +1909,7 @@  discard block
 block discarded – undo
1909 1909
      *
1910 1910
      * @return $this
1911 1911
      */
1912
-    public function protectCells(AddressRange|CellAddress|int|string|array $range, string $password = '', bool $alreadyHashed = false, string $name = '', string $securityDescriptor = ''): static
1912
+    public function protectCells(AddressRange | CellAddress | int | string | array $range, string $password = '', bool $alreadyHashed = false, string $name = '', string $securityDescriptor = ''): static
1913 1913
     {
1914 1914
         $range = Functions::trimSheetFromCellReference(Validations::validateCellOrCellRange($range));
1915 1915
 
@@ -1930,7 +1930,7 @@  discard block
 block discarded – undo
1930 1930
      *
1931 1931
      * @return $this
1932 1932
      */
1933
-    public function unprotectCells(AddressRange|CellAddress|int|string|array $range): static
1933
+    public function unprotectCells(AddressRange | CellAddress | int | string | array $range): static
1934 1934
     {
1935 1935
         $range = Functions::trimSheetFromCellReference(Validations::validateCellOrCellRange($range));
1936 1936
 
@@ -1971,7 +1971,7 @@  discard block
 block discarded – undo
1971 1971
      *
1972 1972
      * @return $this
1973 1973
      */
1974
-    public function setAutoFilter(AddressRange|string|array|AutoFilter $autoFilterOrRange): static
1974
+    public function setAutoFilter(AddressRange | string | array | AutoFilter $autoFilterOrRange): static
1975 1975
     {
1976 1976
         if (is_object($autoFilterOrRange) && ($autoFilterOrRange instanceof AutoFilter)) {
1977 1977
             $this->autoFilter = $autoFilterOrRange;
@@ -2116,7 +2116,7 @@  discard block
 block discarded – undo
2116 2116
      *
2117 2117
      * @return $this
2118 2118
      */
2119
-    public function freezePane(null|CellAddress|string|array $coordinate, null|CellAddress|string|array $topLeftCell = null, bool $frozenSplit = false): static
2119
+    public function freezePane(null | CellAddress | string | array $coordinate, null | CellAddress | string | array $topLeftCell = null, bool $frozenSplit = false): static
2120 2120
     {
2121 2121
         $this->panes = [
2122 2122
             'bottomRight' => null,
@@ -2626,7 +2626,7 @@  discard block
 block discarded – undo
2626 2626
      *
2627 2627
      * @return $this
2628 2628
      */
2629
-    public function removeComment(CellAddress|string|array $cellCoordinate): self
2629
+    public function removeComment(CellAddress | string | array $cellCoordinate): self
2630 2630
     {
2631 2631
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($cellCoordinate));
2632 2632
 
@@ -2651,7 +2651,7 @@  discard block
 block discarded – undo
2651 2651
      * @param array{0: int, 1: int}|CellAddress|string $cellCoordinate Coordinate of the cell as a string, eg: 'C5';
2652 2652
      *               or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.
2653 2653
      */
2654
-    public function getComment(CellAddress|string|array $cellCoordinate, bool $attachNew = true): Comment
2654
+    public function getComment(CellAddress | string | array $cellCoordinate, bool $attachNew = true): Comment
2655 2655
     {
2656 2656
         $cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($cellCoordinate));
2657 2657
 
@@ -2716,7 +2716,7 @@  discard block
 block discarded – undo
2716 2716
      *
2717 2717
      * @return $this
2718 2718
      */
2719
-    public function setSelectedCells(AddressRange|CellAddress|int|string|array $coordinate): static
2719
+    public function setSelectedCells(AddressRange | CellAddress | int | string | array $coordinate): static
2720 2720
     {
2721 2721
         if (is_string($coordinate)) {
2722 2722
             $coordinate = Validations::definedNameToCoordinate($coordinate, $this);
@@ -3186,7 +3186,7 @@  discard block
 block discarded – undo
3186 3186
      *
3187 3187
      * @return ($range is non-empty-string ? ($returnRange is true ? array{0: string, 1: string} : string) : ($returnRange is true ? array{0: null, 1: null} : null))
3188 3188
      */
3189
-    public static function extractSheetTitle(?string $range, bool $returnRange = false, bool $unapostrophize = false): array|null|string
3189
+    public static function extractSheetTitle(?string $range, bool $returnRange = false, bool $unapostrophize = false): array | null | string
3190 3190
     {
3191 3191
         if (empty($range)) {
3192 3192
             return $returnRange ? [null, null] : null;
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Reader/Csv/CsvTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 class CsvTest extends TestCase
13 13
 {
14 14
     #[DataProvider('providerDelimiterDetection')]
15
-    public function testDelimiterDetection(string $filename, string $expectedDelimiter, string $cell, string|float|int|null $expectedValue): void
15
+    public function testDelimiterDetection(string $filename, string $expectedDelimiter, string $cell, string | float | int | null $expectedValue): void
16 16
     {
17 17
         $reader = new Csv();
18 18
         $delim1 = $reader->getDelimiter();
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Csv.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -699,7 +699,7 @@
 block discarded – undo
699 699
         string $enclosure = '"',
700 700
         ?string $escape = null,
701 701
         int $version = PHP_VERSION_ID
702
-    ): array|false {
702
+    ): array | false {
703 703
         $escape = $escape ?? self::getDefaultEscapeCharacter();
704 704
         if ($version >= 80400 && $escape !== '') {
705 705
             return @fgetcsv($stream, $length, $separator, $enclosure, $escape);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical/Conditional.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param null|array|string $condition the criteria that defines which cells will be checked
30 30
      * @param mixed $averageRange Data values
31 31
      */
32
-    public static function AVERAGEIF(mixed $range, null|array|string $condition, mixed $averageRange = []): null|int|float|string
32
+    public static function AVERAGEIF(mixed $range, null | array | string $condition, mixed $averageRange = []): null | int | float | string
33 33
     {
34 34
         if (!is_array($range) || !is_array($averageRange) || array_key_exists(0, $range) || array_key_exists(0, $averageRange)) {
35 35
             $refError = ExcelError::REF();
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      *
56 56
      * @param mixed $args Pairs of Ranges and Criteria
57 57
      */
58
-    public static function AVERAGEIFS(mixed ...$args): null|int|float|string
58
+    public static function AVERAGEIFS(mixed ...$args): null | int | float | string
59 59
     {
60 60
         if (empty($args)) {
61 61
             return 0.0;
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      * @param mixed $range Data values, expect array
86 86
      * @param null|array|string $condition the criteria that defines which cells will be counted
87 87
      */
88
-    public static function COUNTIF(mixed $range, null|array|string $condition): string|int
88
+    public static function COUNTIF(mixed $range, null | array | string $condition): string | int
89 89
     {
90 90
         if (
91 91
             !is_array($range)
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      *
120 120
      * @param mixed $args Pairs of Ranges and Criteria
121 121
      */
122
-    public static function COUNTIFS(mixed ...$args): int|string
122
+    public static function COUNTIFS(mixed ...$args): int | string
123 123
     {
124 124
         if (empty($args)) {
125 125
             return 0;
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      *
144 144
      * @param mixed $args Pairs of Ranges and Criteria
145 145
      */
146
-    public static function MAXIFS(mixed ...$args): null|float|string
146
+    public static function MAXIFS(mixed ...$args): null | float | string
147 147
     {
148 148
         if (empty($args)) {
149 149
             return 0.0;
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      *
166 166
      * @param mixed $args Pairs of Ranges and Criteria
167 167
      */
168
-    public static function MINIFS(mixed ...$args): null|float|string
168
+    public static function MINIFS(mixed ...$args): null | float | string
169 169
     {
170 170
         if (empty($args)) {
171 171
             return 0.0;
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      * @param mixed $range Data values, expecting array
189 189
      * @param mixed $sumRange Data values, expecting array
190 190
      */
191
-    public static function SUMIF(mixed $range, mixed $condition, mixed $sumRange = []): null|float|string
191
+    public static function SUMIF(mixed $range, mixed $condition, mixed $sumRange = []): null | float | string
192 192
     {
193 193
         if (
194 194
             !is_array($range)
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
      *
220 220
      * @param mixed $args Pairs of Ranges and Criteria
221 221
      */
222
-    public static function SUMIFS(mixed ...$args): null|float|string
222
+    public static function SUMIFS(mixed ...$args): null | float | string
223 223
     {
224 224
         if (empty($args)) {
225 225
             return 0.0;
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2DecTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     }
30 30
 
31 31
     #[DataProvider('providerOCT2DEC')]
32
-    public function testDirectCallToOCT2DEC(mixed $expectedResult, bool|string $value): void
32
+    public function testDirectCallToOCT2DEC(mixed $expectedResult, bool | string $value): void
33 33
     {
34 34
         $result = ConvertOctal::toDecimal($value);
35 35
         self::assertSame($expectedResult, $result);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     }
99 99
 
100 100
     #[DataProvider('providerOCT2DECOds')]
101
-    public function testOCT2DECOds(mixed $expectedResult, bool|string $value): void
101
+    public function testOCT2DECOds(mixed $expectedResult, bool | string $value): void
102 102
     {
103 103
         Functions::setCompatibilityMode(
104 104
             Functions::COMPATIBILITY_OPENOFFICE
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2DecTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     }
30 30
 
31 31
     #[DataProvider('providerBIN2DEC')]
32
-    public function testDirectCallToBIN2DEC(float|int|string $expectedResult, bool|int|string $arg1): void
32
+    public function testDirectCallToBIN2DEC(float | int | string $expectedResult, bool | int | string $arg1): void
33 33
     {
34 34
         $result = ConvertBinary::toDecimal($arg1);
35 35
         self::assertSame($expectedResult, $result);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     }
99 99
 
100 100
     #[DataProvider('providerBIN2DECOds')]
101
-    public function testBIN2DECOds(float|int|string $expectedResult, bool $arg1): void
101
+    public function testBIN2DECOds(float | int | string $expectedResult, bool $arg1): void
102 102
     {
103 103
         Functions::setCompatibilityMode(
104 104
             Functions::COMPATIBILITY_OPENOFFICE
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2DecTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     }
30 30
 
31 31
     #[DataProvider('providerHEX2DEC')]
32
-    public function testDirectCallToHEX2DEC(mixed $expectedResult, bool|float|int|string $value): void
32
+    public function testDirectCallToHEX2DEC(mixed $expectedResult, bool | float | int | string $value): void
33 33
     {
34 34
         $result = ConvertHex::toDecimal($value);
35 35
         self::assertSame($expectedResult, $result);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     }
99 99
 
100 100
     #[DataProvider('providerHEX2DECOds')]
101
-    public function testHEX2DECOds(mixed $expectedResult, bool|float|int|string $value): void
101
+    public function testHEX2DECOds(mixed $expectedResult, bool | float | int | string $value): void
102 102
     {
103 103
         Functions::setCompatibilityMode(
104 104
             Functions::COMPATIBILITY_OPENOFFICE
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Calculation/CustomFunction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 
10 10
 class CustomFunction
11 11
 {
12
-    public static function fourthPower(mixed $number): float|int|string
12
+    public static function fourthPower(mixed $number): float | int | string
13 13
     {
14 14
         try {
15 15
             $number = Helpers::validateNumericNullBool($number);
Please login to merge, or discard this patch.