Failed Conditions
Pull Request — master (#3873)
by Adrien
13:56
created
tests/PhpSpreadsheetTests/Shared/Date2Test.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     /**
42 42
      * @dataProvider providerTimeOnly
43 43
      */
44
-    public function testTimeOnly(int|float $expectedResult, int|float|string $value, ?string $format = null): void
44
+    public function testTimeOnly(int | float $expectedResult, int | float | string $value, ?string $format = null): void
45 45
     {
46 46
         Cell::setCalculateDateTimeType(Cell::CALCULATE_TIME_FLOAT);
47 47
         $this->spreadsheet = new Spreadsheet();
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     /**
87 87
      * @dataProvider providerDateAndTime
88 88
      */
89
-    public function testDateAndTime(int|float $expectedResult, int|float|string $value, ?string $format = null): void
89
+    public function testDateAndTime(int | float $expectedResult, int | float | string $value, ?string $format = null): void
90 90
     {
91 91
         Cell::setCalculateDateTimeType(Cell::CALCULATE_DATE_TIME_FLOAT);
92 92
         $this->spreadsheet = new Spreadsheet();
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     /**
132 132
      * @dataProvider providerAsis
133 133
      */
134
-    public function testDefault(int|float $expectedResult, int|float|string $value, ?string $format = null): void
134
+    public function testDefault(int | float $expectedResult, int | float | string $value, ?string $format = null): void
135 135
     {
136 136
         //Cell::setCalculateDateTimeType(Cell::CALCULATE_DATE_TIME_ASIS);
137 137
         $this->spreadsheet = new Spreadsheet();
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     /**
154 154
      * @dataProvider providerAsis
155 155
      */
156
-    public function testAsis(int|float $expectedResult, int|float|string $value, ?string $format = null): void
156
+    public function testAsis(int | float $expectedResult, int | float | string $value, ?string $format = null): void
157 157
     {
158 158
         Cell::setCalculateDateTimeType(Cell::CALCULATE_DATE_TIME_ASIS);
159 159
         $this->spreadsheet = new Spreadsheet();
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Style/Style.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
      *
68 68
      * @var null|array<string, array>
69 69
      */
70
-    private static ?array $cachedStyles = null;
70
+    private static ? array $cachedStyles = null;
71 71
 
72 72
     /**
73 73
      * Create a new Style.
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Style/ConditionalFormatting/CellMatcher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         };
115 115
     }
116 116
 
117
-    protected function wrapValue(mixed $value): float|int|string
117
+    protected function wrapValue(mixed $value): float | int | string
118 118
     {
119 119
         if (!is_numeric($value)) {
120 120
             if (is_bool($value)) {
@@ -129,12 +129,12 @@  discard block
 block discarded – undo
129 129
         return $value;
130 130
     }
131 131
 
132
-    protected function wrapCellValue(): float|int|string
132
+    protected function wrapCellValue(): float | int | string
133 133
     {
134 134
         return $this->wrapValue($this->cell->getCalculatedValue());
135 135
     }
136 136
 
137
-    protected function conditionCellAdjustment(array $matches): float|int|string
137
+    protected function conditionCellAdjustment(array $matches): float | int | string
138 138
     {
139 139
         $column = $matches[6];
140 140
         $row = $matches[7];
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/CellValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         $this->operandValueType[$index] = $operandValueType;
70 70
     }
71 71
 
72
-    protected function wrapValue(mixed $value, string $operandValueType): float|int|string
72
+    protected function wrapValue(mixed $value, string $operandValueType): float | int | string
73 73
     {
74 74
         if (!is_numeric($value) && !is_bool($value) && null !== $value) {
75 75
             if ($operandValueType === Wizard::VALUE_TYPE_LITERAL) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Style/Color.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@
 block discarded – undo
282 282
      *
283 283
      * @return int|string The extracted colour component
284 284
      */
285
-    private static function getColourComponent(string $rgbValue, int $offset, bool $hex = true): string|int
285
+    private static function getColourComponent(string $rgbValue, int $offset, bool $hex = true): string | int
286 286
     {
287 287
         $colour = substr($rgbValue, $offset, 2) ?: '';
288 288
         if (preg_match('/^[0-9a-f]{2}$/i', $colour) !== 1) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Style/Supervisor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      *
44 44
      * @return $this
45 45
      */
46
-    public function bindParent(Spreadsheet|self $parent, ?string $parentPropertyName = null)
46
+    public function bindParent(Spreadsheet | self $parent, ?string $parentPropertyName = null)
47 47
     {
48 48
         $this->parent = $parent;
49 49
         $this->parentPropertyName = $parentPropertyName;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Style/Border.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
      *
147 147
      * @return $this
148 148
      */
149
-    public function setBorderStyle(bool|string $style): static
149
+    public function setBorderStyle(bool | string $style): static
150 150
     {
151 151
         if (empty($style)) {
152 152
             $style = self::BORDER_NONE;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@
 block discarded – undo
253 253
         return (string) $value;
254 254
     }
255 255
 
256
-    private static function makeString(array|string $value): string
256
+    private static function makeString(array | string $value): string
257 257
     {
258 258
         return is_array($value) ? '' : "$value";
259 259
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Style/NumberFormat/Wizard/DateTime.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         $this->formatBlocks = array_map([$this, 'mapFormatBlocks'], $formatBlocks);
29 29
     }
30 30
 
31
-    private function mapFormatBlocks(DateTimeWizard|string $value): string
31
+    private function mapFormatBlocks(DateTimeWizard | string $value): string
32 32
     {
33 33
         // Any date masking codes are returned as lower case values
34 34
         if (is_object($value)) {
Please login to merge, or discard this patch.