Passed
Push — master ( 055281...135371 )
by
unknown
19:31 queued 11:35
created
src/PhpSpreadsheet/Calculation/LookupRef/ChooseRowsEtc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      *
35 35
      * @return mixed[]|string
36 36
      */
37
-    public static function chooseCols(mixed $input, mixed ...$args): array|string
37
+    public static function chooseCols(mixed $input, mixed ...$args): array | string
38 38
     {
39 39
         if (!is_array($input)) {
40 40
             $input = [[$input]];
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      *
52 52
      * @return mixed[]|string
53 53
      */
54
-    public static function chooseRows(mixed $input, mixed ...$args): array|string
54
+    public static function chooseRows(mixed $input, mixed ...$args): array | string
55 55
     {
56 56
         if (!is_array($input)) {
57 57
             $input = [[$input]];
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      *
86 86
      * @return mixed[]|string
87 87
      */
88
-    private static function dropRows(array $array, mixed $offset): array|string
88
+    private static function dropRows(array $array, mixed $offset): array | string
89 89
     {
90 90
         if ($offset === null) {
91 91
             return $array;
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      *
118 118
      * @return mixed[]|string
119 119
      */
120
-    public static function drop(mixed $input, mixed $rows = null, mixed $columns = null): array|string
120
+    public static function drop(mixed $input, mixed $rows = null, mixed $columns = null): array | string
121 121
     {
122 122
         if (!is_array($input)) {
123 123
             $input = [[$input]];
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      *
145 145
      * @return mixed[]|string
146 146
      */
147
-    private static function takeRows(array $array, mixed $offset): array|string
147
+    private static function takeRows(array $array, mixed $offset): array | string
148 148
     {
149 149
         if ($offset === null) {
150 150
             return $array;
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      *
176 176
      * @return mixed[]|string
177 177
      */
178
-    public static function take(mixed $input, mixed $rows, mixed $columns = null): array|string
178
+    public static function take(mixed $input, mixed $rows, mixed $columns = null): array | string
179 179
     {
180 180
         if (!is_array($input)) {
181 181
             $input = [[$input]];
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      *
208 208
      * @return mixed[]|string
209 209
      */
210
-    public static function expand(mixed $input, mixed $rows, mixed $columns = null, mixed $pad = '#N/A'): array|string
210
+    public static function expand(mixed $input, mixed $rows, mixed $columns = null, mixed $pad = '#N/A'): array | string
211 211
     {
212 212
         if (!is_array($input)) {
213 213
             $input = [[$input]];
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      *
33 33
      * @return array<mixed>|float|int|string The relative position of the found item
34 34
      */
35
-    public static function MATCH(mixed $lookupValue, mixed $lookupArray, mixed $matchType = self::MATCHTYPE_LARGEST_VALUE): array|string|int|float
35
+    public static function MATCH(mixed $lookupValue, mixed $lookupArray, mixed $matchType = self::MATCHTYPE_LARGEST_VALUE): array | string | int | float
36 36
     {
37 37
         if (is_array($lookupValue)) {
38 38
             return self::evaluateArrayArgumentsIgnore([self::class, __FUNCTION__], 1, $lookupValue, $lookupArray, $matchType);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     }
79 79
 
80 80
     /** @param mixed[] $lookupArray */
81
-    private static function matchFirstValue(array $lookupArray, mixed $lookupValue): int|string|null
81
+    private static function matchFirstValue(array $lookupArray, mixed $lookupValue): int | string | null
82 82
     {
83 83
         if (is_string($lookupValue)) {
84 84
             $valueIsString = true;
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     }
154 154
 
155 155
     /** @param mixed[] $lookupArray */
156
-    private static function matchSmallestValue(array $lookupArray, mixed $lookupValue): int|string|null
156
+    private static function matchSmallestValue(array $lookupArray, mixed $lookupValue): int | string | null
157 157
     {
158 158
         $valueKey = null;
159 159
         if (is_string($lookupValue)) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/LookupRef/Offset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      *
43 43
      * @return array<mixed>|string An array containing a cell or range of cells, or a string on error
44 44
      */
45
-    public static function OFFSET(?string $cellAddress = null, $rows = 0, $columns = 0, $height = null, $width = null, ?Cell $cell = null): string|array
45
+    public static function OFFSET(?string $cellAddress = null, $rows = 0, $columns = 0, $height = null, $width = null, ?Cell $cell = null): string | array
46 46
     {
47 47
         /** @var int */
48 48
         $rows = Functions::flattenSingleValue($rows);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/LookupRef/Indirect.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      *
38 38
      * @param null|mixed[]|string $cellAddress
39 39
      */
40
-    private static function validateAddress(array|string|null $cellAddress): string
40
+    private static function validateAddress(array | string | null $cellAddress): string
41 41
     {
42 42
         $cellAddress = Functions::flattenSingleValue($cellAddress);
43 43
         if (!is_string($cellAddress) || !$cellAddress) {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      *
64 64
      * @return mixed[]|string An array containing a cell or range of cells, or a string on error
65 65
      */
66
-    public static function INDIRECT($cellAddress, mixed $a1fmt, Cell $cell): string|array
66
+    public static function INDIRECT($cellAddress, mixed $a1fmt, Cell $cell): string | array
67 67
     {
68 68
         [$baseCol, $baseRow] = Coordinate::indexesFromString($cell->getCoordinate());
69 69
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/LookupRef/Address.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
      * @return mixed[]|string If an array of values is passed as the $testValue argument, then the returned result will also be
49 49
      *            an array with the same dimensions
50 50
      */
51
-    public static function cell(mixed $row, mixed $column, mixed $relativity = 1, mixed $referenceStyle = true, mixed $sheetName = ''): array|string
51
+    public static function cell(mixed $row, mixed $column, mixed $relativity = 1, mixed $referenceStyle = true, mixed $sheetName = ''): array | string
52 52
     {
53 53
         if (
54 54
             is_array($row) || is_array($column)
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Engine/FormattedNumber.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      *
23 23
      * @param float|string $operand string value to test
24 24
      */
25
-    public static function convertToNumberIfFormatted(float|string &$operand): bool
25
+    public static function convertToNumberIfFormatted(float | string &$operand): bool
26 26
     {
27 27
         return self::convertToNumberIfNumeric($operand)
28 28
             || self::convertToNumberIfFraction($operand)
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      *
37 37
      * @param float|string $operand string value to test
38 38
      */
39
-    public static function convertToNumberIfNumeric(float|string &$operand): bool
39
+    public static function convertToNumberIfNumeric(float | string &$operand): bool
40 40
     {
41 41
         $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator(), '/');
42 42
         $value = preg_replace(['/(\d)' . $thousandsSeparator . '(\d)/u', '/([+-])\s+(\d)/u'], ['$1$2', '$1$2'], trim("$operand"));
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      *
59 59
      * @param string $operand string value to test
60 60
      */
61
-    public static function convertToNumberIfFraction(float|string &$operand): bool
61
+    public static function convertToNumberIfFraction(float | string &$operand): bool
62 62
     {
63 63
         if (is_string($operand) && preg_match(self::STRING_REGEXP_FRACTION, $operand, $match)) {
64 64
             $sign = ($match[1] === '-') ? '-' : '+';
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      *
81 81
      * @param float|string $operand string value to test
82 82
      */
83
-    public static function convertToNumberIfPercent(float|string &$operand): bool
83
+    public static function convertToNumberIfPercent(float | string &$operand): bool
84 84
     {
85 85
         $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator(), '/');
86 86
         $value = preg_replace('/(\d)' . $thousandsSeparator . '(\d)/u', '$1$2', trim("$operand"));
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      *
106 106
      * @param float|string $operand string value to test
107 107
      */
108
-    public static function convertToNumberIfCurrency(float|string &$operand): bool
108
+    public static function convertToNumberIfCurrency(float | string &$operand): bool
109 109
     {
110 110
         $currencyRegexp = self::currencyMatcherRegexp();
111 111
         $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator(), '/');
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Logical/Operations.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      *         If an array of values is passed as an argument, then the returned result will also be an array
111 111
      *            with the same dimensions
112 112
      */
113
-    public static function NOT(mixed $logical = false): array|bool|string
113
+    public static function NOT(mixed $logical = false): array | bool | string
114 114
     {
115 115
         if (is_array($logical)) {
116 116
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $logical);
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      * @param mixed[] $args
135 135
      * @param callable(int, int): bool $func
136 136
      */
137
-    private static function countTrueValues(array $args, callable $func): bool|string
137
+    private static function countTrueValues(array $args, callable $func): bool | string
138 138
     {
139 139
         $trueValueCount = 0;
140 140
         $count = 0;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1431,7 +1431,7 @@  discard block
 block discarded – undo
1431 1431
         $objWriter->endElement();
1432 1432
     }
1433 1433
 
1434
-    private function writeCellInlineStr(XMLWriter $objWriter, string $mappedType, RichText|string $cellValue): void
1434
+    private function writeCellInlineStr(XMLWriter $objWriter, string $mappedType, RichText | string $cellValue): void
1435 1435
     {
1436 1436
         $objWriter->writeAttribute('t', $mappedType);
1437 1437
         if (!$cellValue instanceof RichText) {
@@ -1451,7 +1451,7 @@  discard block
 block discarded – undo
1451 1451
     /**
1452 1452
      * @param string[] $flippedStringTable
1453 1453
      */
1454
-    private function writeCellString(XMLWriter $objWriter, string $mappedType, RichText|string $cellValue, array $flippedStringTable): void
1454
+    private function writeCellString(XMLWriter $objWriter, string $mappedType, RichText | string $cellValue, array $flippedStringTable): void
1455 1455
     {
1456 1456
         $objWriter->writeAttribute('t', $mappedType);
1457 1457
         if (!$cellValue instanceof RichText) {
@@ -1461,7 +1461,7 @@  discard block
 block discarded – undo
1461 1461
         }
1462 1462
     }
1463 1463
 
1464
-    private function writeCellNumeric(XMLWriter $objWriter, float|int $cellValue): void
1464
+    private function writeCellNumeric(XMLWriter $objWriter, float | int $cellValue): void
1465 1465
     {
1466 1466
         $result = StringHelper::convertToString($cellValue);
1467 1467
         if (is_float($cellValue) && !str_contains($result, '.')) {
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Reader/Xlsx/HyperlinkTest.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -55,13 +55,13 @@
 block discarded – undo
55 55
         $rsheet2 = $reloadedSpreadsheet->getSheet(1);
56 56
         self::assertSame('link to other sheet', $rsheet2->getCell('A2')->getValue());
57 57
         self::assertSame("sheet://'Sheet One'!A1", $rsheet2->getCell('A2')->getHyperlink()->getUrl());
58
-         self::assertSame(
59
-             'FF0000FF',
60
-             $rsheet2
61
-                 ->getStyle('A2')
62
-                 ->getFont()->getColor()->getARGB(),
63
-             'argb is set in addition to theme'
64
-         );
58
+            self::assertSame(
59
+                'FF0000FF',
60
+                $rsheet2
61
+                    ->getStyle('A2')
62
+                    ->getFont()->getColor()->getARGB(),
63
+                'argb is set in addition to theme'
64
+            );
65 65
 
66 66
         self::assertSame('external link', $rsheet2->getCell('A3')->getValue());
67 67
         self::assertSame('https://www.example.com', $rsheet2->getCell('A3')->getHyperlink()->getUrl());
Please login to merge, or discard this patch.