Passed
Pull Request — master (#3860)
by Adrien
11:44
created
src/PhpSpreadsheet/Cell/DataType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
      *
54 54
      * @return RichText|string Sanitized value
55 55
      */
56
-    public static function checkString(null|RichText|string $textValue): RichText|string
56
+    public static function checkString(null | RichText | string $textValue): RichText | string
57 57
     {
58 58
         if ($textValue instanceof RichText) {
59 59
             // TODO: Sanitize Rich-Text string (max. character count is 32,767)
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Cell/Coordinate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      *
83 83
      * @return string Absolute coordinate        e.g. '$A' or '$1' or '$A$1'
84 84
      */
85
-    public static function absoluteReference(int|string $cellAddress): string
85
+    public static function absoluteReference(int | string $cellAddress): string
86 86
     {
87 87
         $cellAddress = (string) $cellAddress;
88 88
         if (self::coordinateIsRange($cellAddress)) {
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
      *
407 407
      * @param int|numeric-string $columnIndex Column index (A = 1)
408 408
      */
409
-    public static function stringFromColumnIndex(int|string $columnIndex): string
409
+    public static function stringFromColumnIndex(int | string $columnIndex): string
410 410
     {
411 411
         static $indexCache = [];
412 412
         static $lookupCache = ' ABCDEFGHIJKLMNOPQRSTUVWXYZ';
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Spreadsheet.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
     /**
264 264
      * retrieve ribbon XML Data.
265 265
      */
266
-    public function getRibbonXMLData(string $what = 'all'): null|array|string //we need some constants here...
266
+    public function getRibbonXMLData(string $what = 'all'): null | array | string //we need some constants here...
267 267
     {
268 268
         $returnData = null;
269 269
         $what = strtolower($what);
@@ -1082,7 +1082,7 @@  discard block
 block discarded – undo
1082 1082
      *
1083 1083
      * @return false|Style
1084 1084
      */
1085
-    public function getCellXfByHashCode(string $hashcode): bool|Style
1085
+    public function getCellXfByHashCode(string $hashcode): bool | Style
1086 1086
     {
1087 1087
         foreach ($this->cellXfCollection as $cellXf) {
1088 1088
             if ($cellXf->getHashCode() === $hashcode) {
@@ -1185,7 +1185,7 @@  discard block
 block discarded – undo
1185 1185
      *
1186 1186
      * @return false|Style
1187 1187
      */
1188
-    public function getCellStyleXfByHashCode(string $hashcode): bool|Style
1188
+    public function getCellStyleXfByHashCode(string $hashcode): bool | Style
1189 1189
     {
1190 1190
         foreach ($this->cellStyleXfCollection as $cellStyleXf) {
1191 1191
             if ($cellStyleXf->getHashCode() === $hashcode) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Drawing.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      *
14 14
      * @return float|int Value in EMU
15 15
      */
16
-    public static function pixelsToEMU(int $pixelValue): int|float
16
+    public static function pixelsToEMU(int $pixelValue): int | float
17 17
     {
18 18
         return $pixelValue * 9525;
19 19
     }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @return float|int Value in cell dimension
46 46
      */
47
-    public static function pixelsToCellDimension(int $pixelValue, \PhpOffice\PhpSpreadsheet\Style\Font $defaultFont): int|float
47
+    public static function pixelsToCellDimension(int $pixelValue, \PhpOffice\PhpSpreadsheet\Style\Font $defaultFont): int | float
48 48
     {
49 49
         // Font name and size
50 50
         $name = $defaultFont->getName();
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Xls.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      *
104 104
      * @return int Horizontal measured in pixels
105 105
      */
106
-    public static function getDistanceX(Worksheet $worksheet, string $startColumn = 'A', float|int $startOffsetX = 0, string $endColumn = 'A', float|int $endOffsetX = 0): int
106
+    public static function getDistanceX(Worksheet $worksheet, string $startColumn = 'A', float | int $startOffsetX = 0, string $endColumn = 'A', float | int $endOffsetX = 0): int
107 107
     {
108 108
         $distanceX = 0;
109 109
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      *
135 135
      * @return int Vertical distance measured in pixels
136 136
      */
137
-    public static function getDistanceY(Worksheet $worksheet, int $startRow = 1, float|int $startOffsetY = 0, int $endRow = 1, float|int $endOffsetY = 0): int
137
+    public static function getDistanceY(Worksheet $worksheet, int $startRow = 1, float | int $startOffsetY = 0, int $endRow = 1, float | int $endOffsetY = 0): int
138 138
     {
139 139
         $distanceY = 0;
140 140
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
     /**
45 45
      * Horizontal offset of upper-left corner of shape measured in 1/1024 of column width.
46 46
      */
47
-    private int|float $startOffsetX;
47
+    private int | float $startOffsetX;
48 48
 
49 49
     /**
50 50
      * Vertical offset of upper-left corner of shape measured in 1/256 of row height.
51 51
      */
52
-    private int|float $startOffsetY;
52
+    private int | float $startOffsetY;
53 53
 
54 54
     /**
55 55
      * Cell coordinates of bottom-right corner of shape, e.g. 'B2'.
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
     /**
60 60
      * Horizontal offset of bottom-right corner of shape measured in 1/1024 of column width.
61 61
      */
62
-    private int|float $endOffsetX;
62
+    private int | float $endOffsetX;
63 63
 
64 64
     /**
65 65
      * Vertical offset of bottom-right corner of shape measured in 1/256 of row height.
66 66
      */
67
-    private int|float $endOffsetY;
67
+    private int | float $endOffsetY;
68 68
 
69 69
     /**
70 70
      * Set parent Shape Group Container.
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
     /**
200 200
      * Set offset in x-direction of upper-left corner of shape measured in 1/1024 of column width.
201 201
      */
202
-    public function setStartOffsetX(int|float $startOffsetX): void
202
+    public function setStartOffsetX(int | float $startOffsetX): void
203 203
     {
204 204
         $this->startOffsetX = $startOffsetX;
205 205
     }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     /**
208 208
      * Get offset in x-direction of upper-left corner of shape measured in 1/1024 of column width.
209 209
      */
210
-    public function getStartOffsetX(): int|float
210
+    public function getStartOffsetX(): int | float
211 211
     {
212 212
         return $this->startOffsetX;
213 213
     }
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     /**
216 216
      * Set offset in y-direction of upper-left corner of shape measured in 1/256 of row height.
217 217
      */
218
-    public function setStartOffsetY(int|float $startOffsetY): void
218
+    public function setStartOffsetY(int | float $startOffsetY): void
219 219
     {
220 220
         $this->startOffsetY = $startOffsetY;
221 221
     }
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
     /**
224 224
      * Get offset in y-direction of upper-left corner of shape measured in 1/256 of row height.
225 225
      */
226
-    public function getStartOffsetY(): int|float
226
+    public function getStartOffsetY(): int | float
227 227
     {
228 228
         return $this->startOffsetY;
229 229
     }
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     /**
250 250
      * Set offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width.
251 251
      */
252
-    public function setEndOffsetX(int|float $endOffsetX): void
252
+    public function setEndOffsetX(int | float $endOffsetX): void
253 253
     {
254 254
         $this->endOffsetX = $endOffsetX;
255 255
     }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
     /**
258 258
      * Get offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width.
259 259
      */
260
-    public function getEndOffsetX(): int|float
260
+    public function getEndOffsetX(): int | float
261 261
     {
262 262
         return $this->endOffsetX;
263 263
     }
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
     /**
266 266
      * Set offset in y-direction of bottom-right corner of shape measured in 1/256 of row height.
267 267
      */
268
-    public function setEndOffsetY(int|float $endOffsetY): void
268
+    public function setEndOffsetY(int | float $endOffsetY): void
269 269
     {
270 270
         $this->endOffsetY = $endOffsetY;
271 271
     }
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
     /**
274 274
      * Get offset in y-direction of bottom-right corner of shape measured in 1/256 of row height.
275 275
      */
276
-    public function getEndOffsetY(): int|float
276
+    public function getEndOffsetY(): int | float
277 277
     {
278 278
         return $this->endOffsetY;
279 279
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/StringHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
      * Formats a numeric value as a string for output in various output writers forcing
336 336
      * point as decimal separator in case locale is other than English.
337 337
      */
338
-    public static function formatNumber(float|int|string|null $numericValue): string
338
+    public static function formatNumber(float | int | string | null $numericValue): string
339 339
     {
340 340
         if (is_float($numericValue)) {
341 341
             return str_replace(',', '.', (string) $numericValue);
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
     {
391 391
         // characters
392 392
         $chars = self::convertEncoding($textValue, 'UTF-16LE', 'UTF-8');
393
-        $ln = (int) (strlen($chars) / 2);  // N.B. - strlen, not mb_strlen issue #642
393
+        $ln = (int) (strlen($chars) / 2); // N.B. - strlen, not mb_strlen issue #642
394 394
 
395 395
         return pack('vC', $ln, 0x0001) . $chars;
396 396
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
      *
112 112
      * @return false|string
113 113
      */
114
-    public function stream_read(int $count): bool|string // @codingStandardsIgnoreLine
114
+    public function stream_read(int $count): bool | string // @codingStandardsIgnoreLine
115 115
     {
116 116
         if ($this->stream_eof()) {
117 117
             return false;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Date.php 1 patch
Spacing   +4 added lines, -4 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');
@@ -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.