Passed
Pull Request — master (#3834)
by Shinji
21:30
created
tests/PhpSpreadsheetTests/Calculation/CalculationFunctionListTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     /**
34 34
      * @dataProvider providerGetFunctions
35 35
      */
36
-    public function testGetFunctions(string $category, array|string $functionCall): void
36
+    public function testGetFunctions(string $category, array | string $functionCall): void
37 37
     {
38 38
         self::assertIsCallable($functionCall);
39 39
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTime.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      *
35 35
      * @return float|string Excel date/time serial value, or string if error
36 36
      */
37
-    public static function getDateValue(mixed $dateValue): float|string
37
+    public static function getDateValue(mixed $dateValue): float | string
38 38
     {
39 39
         try {
40 40
             return DateTimeExcel\Helpers::getDateValue($dateValue);
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      * @return array|\DateTime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,
185 185
      *                        depending on the value of the ReturnDateType flag
186 186
      */
187
-    public static function TIME($hour = 0, $minute = 0, $second = 0): string|float|int|\DateTime|array
187
+    public static function TIME($hour = 0, $minute = 0, $second = 0): string | float | int | \DateTime | array
188 188
     {
189 189
         return DateTimeExcel\Time::fromHMS($hour, $minute, $second);
190 190
     }
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
      * @return array|\Datetime|float|int|string Excel date/time serial value, PHP date/time serial value or PHP date/time object,
249 249
      *                        depending on the value of the ReturnDateType flag
250 250
      */
251
-    public static function TIMEVALUE($timeValue): string|\Datetime|int|float|array
251
+    public static function TIMEVALUE($timeValue): string | \Datetime | int | float | array
252 252
     {
253 253
         return DateTimeExcel\TimeValue::fromString($timeValue);
254 254
     }
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
      *
333 333
      * @return array|int|string Number of days between start date and end date
334 334
      */
335
-    public static function DAYS360(mixed $startDate = 0, mixed $endDate = 0, $method = false): string|int|array
335
+    public static function DAYS360(mixed $startDate = 0, mixed $endDate = 0, $method = false): string | int | array
336 336
     {
337 337
         return DateTimeExcel\Days360::between($startDate, $endDate, $method);
338 338
     }
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
      *
369 369
      * @return array|float|string fraction of the year, or a string containing an error
370 370
      */
371
-    public static function YEARFRAC(mixed $startDate = 0, mixed $endDate = 0, $method = 0): string|int|float|array
371
+    public static function YEARFRAC(mixed $startDate = 0, mixed $endDate = 0, $method = 0): string | int | float | array
372 372
     {
373 373
         return DateTimeExcel\YearFrac::fraction($startDate, $endDate, $method);
374 374
     }
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
      *
396 396
      * @return array|int|string Interval between the dates
397 397
      */
398
-    public static function NETWORKDAYS(mixed $startDate, mixed $endDate, mixed ...$dateArgs): string|int|array
398
+    public static function NETWORKDAYS(mixed $startDate, mixed $endDate, mixed ...$dateArgs): string | int | array
399 399
     {
400 400
         return DateTimeExcel\NetworkDays::count($startDate, $endDate, ...$dateArgs);
401 401
     }
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
      *
448 448
      * @return array|int|string Day of the month
449 449
      */
450
-    public static function DAYOFMONTH(mixed $dateValue = 1): int|string|array
450
+    public static function DAYOFMONTH(mixed $dateValue = 1): int | string | array
451 451
     {
452 452
         return DateTimeExcel\DateParts::day($dateValue);
453 453
     }
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
      *
475 475
      * @return array|int|string Day of the week value
476 476
      */
477
-    public static function WEEKDAY($dateValue = 1, $style = 1): string|int|array
477
+    public static function WEEKDAY($dateValue = 1, $style = 1): string | int | array
478 478
     {
479 479
         return DateTimeExcel\Week::day($dateValue, $style);
480 480
     }
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
      *
686 686
      * @return array|int|string Week Number
687 687
      */
688
-    public static function WEEKNUM(mixed $dateValue = 1, $method = self::STARTWEEK_SUNDAY): int|string|array
688
+    public static function WEEKNUM(mixed $dateValue = 1, $method = self::STARTWEEK_SUNDAY): int | string | array
689 689
     {
690 690
         return DateTimeExcel\Week::number($dateValue, $method);
691 691
     }
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
      *
708 708
      * @return array|int|string Week Number
709 709
      */
710
-    public static function ISOWEEKNUM(mixed $dateValue = 1): int|string|array
710
+    public static function ISOWEEKNUM(mixed $dateValue = 1): int | string | array
711 711
     {
712 712
         return DateTimeExcel\Week::isoWeekNumber($dateValue);
713 713
     }
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
      *
731 731
      * @return array|int|string Month of the year
732 732
      */
733
-    public static function MONTHOFYEAR(mixed $dateValue = 1): string|int|array
733
+    public static function MONTHOFYEAR(mixed $dateValue = 1): string | int | array
734 734
     {
735 735
         return DateTimeExcel\DateParts::month($dateValue);
736 736
     }
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
      *
754 754
      * @return array|int|string Year
755 755
      */
756
-    public static function YEAR(mixed $dateValue = 1): string|int|array
756
+    public static function YEAR(mixed $dateValue = 1): string | int | array
757 757
     {
758 758
         return DateTimeExcel\DateParts::year($dateValue);
759 759
     }
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
      *
777 777
      * @return array|int|string Hour
778 778
      */
779
-    public static function HOUROFDAY(mixed $timeValue = 0): string|int|array
779
+    public static function HOUROFDAY(mixed $timeValue = 0): string | int | array
780 780
     {
781 781
         return DateTimeExcel\TimeParts::hour($timeValue);
782 782
     }
@@ -799,7 +799,7 @@  discard block
 block discarded – undo
799 799
      *
800 800
      * @return array|int|string Minute
801 801
      */
802
-    public static function MINUTE(mixed $timeValue = 0): string|int|array
802
+    public static function MINUTE(mixed $timeValue = 0): string | int | array
803 803
     {
804 804
         return DateTimeExcel\TimeParts::minute($timeValue);
805 805
     }
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
      *
823 823
      * @return array|int|string Second
824 824
      */
825
-    public static function SECOND(mixed $timeValue = 0): string|int|array
825
+    public static function SECOND(mixed $timeValue = 0): string | int | array
826 826
     {
827 827
         return DateTimeExcel\TimeParts::second($timeValue);
828 828
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/HashTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
     /**
111 111
      * Get index for hash code.
112 112
      */
113
-    public function getIndexForHashCode(string $hashCode): false|int
113
+    public function getIndexForHashCode(string $hashCode): false | int
114 114
     {
115 115
         return array_search($hashCode, $this->keyMap, true);
116 116
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart/Legend.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
     /**
102 102
      * Get legend position as an Excel internal numeric value.
103 103
      */
104
-    public function getPositionXL(): false|int
104
+    public function getPositionXL(): false | int
105 105
     {
106 106
         return array_search($this->position, self::POSITION_XLREF);
107 107
     }
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
@@ -285,7 +285,7 @@
 block discarded – undo
285 285
         return $dataBar;
286 286
     }
287 287
 
288
-    private function readColorScale(simpleXMLElement|stdClass $cfRule): ConditionalColorScale
288
+    private function readColorScale(simpleXMLElement | stdClass $cfRule): ConditionalColorScale
289 289
     {
290 290
         $colorScale = new ConditionalColorScale();
291 291
         $types = [];
Please login to merge, or discard this patch.
PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormatValueObject.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
 {
7 7
     private string $type;
8 8
 
9
-    private null|float|int|string $value;
9
+    private null | float | int | string $value;
10 10
 
11 11
     private mixed $cellFormula;
12 12
 
13
-    public function __construct(string $type, null|float|int|string $value = null, mixed $cellFormula = null)
13
+    public function __construct(string $type, null | float | int | string $value = null, mixed $cellFormula = null)
14 14
     {
15 15
         $this->type = $type;
16 16
         $this->value = $value;
@@ -29,12 +29,12 @@  discard block
 block discarded – undo
29 29
         return $this;
30 30
     }
31 31
 
32
-    public function getValue(): null|float|int|string
32
+    public function getValue(): null | float | int | string
33 33
     {
34 34
         return $this->value;
35 35
     }
36 36
 
37
-    public function setValue(null|float|int|string $value): self
37
+    public function setValue(null | float | int | string $value): self
38 38
     {
39 39
         $this->value = $value;
40 40
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xls.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6976,7 +6976,7 @@  discard block
 block discarded – undo
6976 6976
      * It can also happen that the REF structure uses the -1 (FFFF) code to indicate deleted sheets,
6977 6977
      * in which case an Exception is thrown.
6978 6978
      */
6979
-    private function readSheetRangeByRefIndex(int $index): string|false
6979
+    private function readSheetRangeByRefIndex(int $index): string | false
6980 6980
     {
6981 6981
         if (isset($this->ref[$index])) {
6982 6982
             $type = $this->externalBooks[$this->ref[$index]['externalBookIndex']]['type'];
@@ -7267,7 +7267,7 @@  discard block
 block discarded – undo
7267 7267
      *
7268 7268
      * @return float
7269 7269
      */
7270
-    private static function extractNumber($data): int|float
7270
+    private static function extractNumber($data): int | float
7271 7271
     {
7272 7272
         $rknumhigh = self::getInt4d($data, 4);
7273 7273
         $rknumlow = self::getInt4d($data, 0);
@@ -7295,7 +7295,7 @@  discard block
 block discarded – undo
7295 7295
      *
7296 7296
      * @return float
7297 7297
      */
7298
-    private static function getIEEE754($rknum): float|int
7298
+    private static function getIEEE754($rknum): float | int
7299 7299
     {
7300 7300
         if (($rknum & 0x02) != 0) {
7301 7301
             $value = $rknum >> 2;
@@ -7606,7 +7606,7 @@  discard block
 block discarded – undo
7606 7606
     {
7607 7607
     }*/
7608 7608
 
7609
-    private function readCFFormula(string $recordData, int $offset, int $size): float|int|string|null
7609
+    private function readCFFormula(string $recordData, int $offset, int $size): float | int | string | null
7610 7610
     {
7611 7611
         try {
7612 7612
             $formula = substr($recordData, $offset, $size);
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Chart/ChartsDynamicTitleTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
             true, // plotVisibleOnly
102 102
             DataSeries::EMPTY_AS_GAP, // displayBlanksAs
103 103
             null, // xAxisLabel
104
-            null,  // yAxisLabel
104
+            null, // yAxisLabel
105 105
             null, // xAxis
106 106
         );
107 107
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart/Axis.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         return $this->axisType === self::AXIS_TYPE_DATE || (bool) $this->axisNumber['numeric'];
125 125
     }
126 126
 
127
-    public function setAxisOption(string $key, null|float|int|string $value): void
127
+    public function setAxisOption(string $key, null | float | int | string $value): void
128 128
     {
129 129
         if ($value !== null && $value !== '') {
130 130
             $this->axisOptions[$key] = (string) $value;
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
         ?string $axisOrientation = null,
142 142
         ?string $majorTmt = null,
143 143
         ?string $minorTmt = null,
144
-        null|float|int|string $minimum = null,
145
-        null|float|int|string $maximum = null,
146
-        null|float|int|string $majorUnit = null,
147
-        null|float|int|string $minorUnit = null,
148
-        null|float|int|string $textRotation = null,
144
+        null | float | int | string $minimum = null,
145
+        null | float | int | string $maximum = null,
146
+        null | float | int | string $majorUnit = null,
147
+        null | float | int | string $minorUnit = null,
148
+        null | float | int | string $textRotation = null,
149 149
         ?string $hidden = null,
150 150
         ?string $baseTimeUnit = null,
151 151
         ?string $majorTimeUnit = null,
Please login to merge, or discard this patch.