Passed
Pull Request — master (#3793)
by Adrien
14:11
created
Category
src/PhpSpreadsheet/Helper/Dimension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      *                If this is a height, then size is measured in pixels ()
49 49
      *                   or in points () if $unit is null.
50 50
      */
51
-    protected float|int $size;
51
+    protected float | int $size;
52 52
 
53 53
     protected ?string $unit = null;
54 54
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Document/Properties.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
     /**
37 37
      * Created.
38 38
      */
39
-    private float|int $created;
39
+    private float | int $created;
40 40
 
41 41
     /**
42 42
      * Modified.
43 43
      */
44
-    private float|int $modified;
44
+    private float | int $modified;
45 45
 
46 46
     /**
47 47
      * Title.
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         return $this;
141 141
     }
142 142
 
143
-    private static function intOrFloatTimestamp(null|float|int|string $timestamp): float|int
143
+    private static function intOrFloatTimestamp(null | float | int | string $timestamp): float | int
144 144
     {
145 145
         if ($timestamp === null) {
146 146
             $timestamp = (float) (new DateTime())->format('U');
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     /**
162 162
      * Get Created.
163 163
      */
164
-    public function getCreated(): float|int
164
+    public function getCreated(): float | int
165 165
     {
166 166
         return $this->created;
167 167
     }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      *
172 172
      * @return $this
173 173
      */
174
-    public function setCreated(null|float|int|string $timestamp): self
174
+    public function setCreated(null | float | int | string $timestamp): self
175 175
     {
176 176
         $this->created = self::intOrFloatTimestamp($timestamp);
177 177
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     /**
182 182
      * Get Modified.
183 183
      */
184
-    public function getModified(): float|int
184
+    public function getModified(): float | int
185 185
     {
186 186
         return $this->modified;
187 187
     }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      *
192 192
      * @return $this
193 193
      */
194
-    public function setModified(null|float|int|string $timestamp): self
194
+    public function setModified(null | float | int | string $timestamp): self
195 195
     {
196 196
         $this->modified = self::intOrFloatTimestamp($timestamp);
197 197
 
@@ -415,32 +415,32 @@  discard block
 block discarded – undo
415 415
     }
416 416
 
417 417
     private const PROPERTY_TYPE_ARRAY = [
418
-        'i' => self::PROPERTY_TYPE_INTEGER,      //    Integer
419
-        'i1' => self::PROPERTY_TYPE_INTEGER,     //    1-Byte Signed Integer
420
-        'i2' => self::PROPERTY_TYPE_INTEGER,     //    2-Byte Signed Integer
421
-        'i4' => self::PROPERTY_TYPE_INTEGER,     //    4-Byte Signed Integer
422
-        'i8' => self::PROPERTY_TYPE_INTEGER,     //    8-Byte Signed Integer
423
-        'int' => self::PROPERTY_TYPE_INTEGER,    //    Integer
424
-        'ui1' => self::PROPERTY_TYPE_INTEGER,    //    1-Byte Unsigned Integer
425
-        'ui2' => self::PROPERTY_TYPE_INTEGER,    //    2-Byte Unsigned Integer
426
-        'ui4' => self::PROPERTY_TYPE_INTEGER,    //    4-Byte Unsigned Integer
427
-        'ui8' => self::PROPERTY_TYPE_INTEGER,    //    8-Byte Unsigned Integer
428
-        'uint' => self::PROPERTY_TYPE_INTEGER,   //    Unsigned Integer
429
-        'f' => self::PROPERTY_TYPE_FLOAT,        //    Real Number
430
-        'r4' => self::PROPERTY_TYPE_FLOAT,       //    4-Byte Real Number
431
-        'r8' => self::PROPERTY_TYPE_FLOAT,       //    8-Byte Real Number
432
-        'decimal' => self::PROPERTY_TYPE_FLOAT,  //    Decimal
433
-        's' => self::PROPERTY_TYPE_STRING,       //    String
434
-        'empty' => self::PROPERTY_TYPE_STRING,   //    Empty
435
-        'null' => self::PROPERTY_TYPE_STRING,    //    Null
436
-        'lpstr' => self::PROPERTY_TYPE_STRING,   //    LPSTR
437
-        'lpwstr' => self::PROPERTY_TYPE_STRING,  //    LPWSTR
438
-        'bstr' => self::PROPERTY_TYPE_STRING,    //    Basic String
439
-        'd' => self::PROPERTY_TYPE_DATE,         //    Date and Time
440
-        'date' => self::PROPERTY_TYPE_DATE,      //    Date and Time
441
-        'filetime' => self::PROPERTY_TYPE_DATE,  //    File Time
442
-        'b' => self::PROPERTY_TYPE_BOOLEAN,      //    Boolean
443
-        'bool' => self::PROPERTY_TYPE_BOOLEAN,   //    Boolean
418
+        'i' => self::PROPERTY_TYPE_INTEGER, //    Integer
419
+        'i1' => self::PROPERTY_TYPE_INTEGER, //    1-Byte Signed Integer
420
+        'i2' => self::PROPERTY_TYPE_INTEGER, //    2-Byte Signed Integer
421
+        'i4' => self::PROPERTY_TYPE_INTEGER, //    4-Byte Signed Integer
422
+        'i8' => self::PROPERTY_TYPE_INTEGER, //    8-Byte Signed Integer
423
+        'int' => self::PROPERTY_TYPE_INTEGER, //    Integer
424
+        'ui1' => self::PROPERTY_TYPE_INTEGER, //    1-Byte Unsigned Integer
425
+        'ui2' => self::PROPERTY_TYPE_INTEGER, //    2-Byte Unsigned Integer
426
+        'ui4' => self::PROPERTY_TYPE_INTEGER, //    4-Byte Unsigned Integer
427
+        'ui8' => self::PROPERTY_TYPE_INTEGER, //    8-Byte Unsigned Integer
428
+        'uint' => self::PROPERTY_TYPE_INTEGER, //    Unsigned Integer
429
+        'f' => self::PROPERTY_TYPE_FLOAT, //    Real Number
430
+        'r4' => self::PROPERTY_TYPE_FLOAT, //    4-Byte Real Number
431
+        'r8' => self::PROPERTY_TYPE_FLOAT, //    8-Byte Real Number
432
+        'decimal' => self::PROPERTY_TYPE_FLOAT, //    Decimal
433
+        's' => self::PROPERTY_TYPE_STRING, //    String
434
+        'empty' => self::PROPERTY_TYPE_STRING, //    Empty
435
+        'null' => self::PROPERTY_TYPE_STRING, //    Null
436
+        'lpstr' => self::PROPERTY_TYPE_STRING, //    LPSTR
437
+        'lpwstr' => self::PROPERTY_TYPE_STRING, //    LPWSTR
438
+        'bstr' => self::PROPERTY_TYPE_STRING, //    Basic String
439
+        'd' => self::PROPERTY_TYPE_DATE, //    Date and Time
440
+        'date' => self::PROPERTY_TYPE_DATE, //    Date and Time
441
+        'filetime' => self::PROPERTY_TYPE_DATE, //    File Time
442
+        'b' => self::PROPERTY_TYPE_BOOLEAN, //    Boolean
443
+        'bool' => self::PROPERTY_TYPE_BOOLEAN, //    Boolean
444 444
     ];
445 445
 
446 446
     private const SPECIAL_TYPES = [
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet/Worksheet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3100,7 +3100,7 @@
 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/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|int|string
255
+    public function getAttribute(string $name): null | 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/Worksheet/AutoFilter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -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
     }
@@ -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   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -437,7 +437,7 @@
 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/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.