Failed Conditions
Pull Request — master (#4452)
by Owen
12:39
created
src/PhpSpreadsheet/Shared/Trend/BestFit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
         return $this->yBestFitValues;
297 297
     }
298 298
 
299
-    protected function calculateGoodnessOfFit(float $sumX, float $sumY, float $sumX2, float $sumY2, float $sumXY, float $meanX, float $meanY, bool|int $const): void
299
+    protected function calculateGoodnessOfFit(float $sumX, float $sumY, float $sumX2, float $sumY2, float $sumXY, float $meanX, float $meanY, bool | int $const): void
300 300
     {
301 301
         $SSres = $SScov = $SStot = $SSsex = 0.0;
302 302
         foreach ($this->xValues as $xKey => $xValue) {
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
     {
357 357
         return array_sum(
358 358
             array_map(
359
-                fn ($value): float|int => $value ** 2,
359
+                fn ($value): float | int => $value ** 2,
360 360
                 $values
361 361
             )
362 362
         );
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Database/DVar.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
      * @return float|string (string if result is an error)
35 35
      */
36
-    public static function evaluate(array $database, array|null|int|string $field, array $criteria): string|float
36
+    public static function evaluate(array $database, array | null | int | string $field, array $criteria): string | float
37 37
     {
38 38
         $field = self::fieldExtract($database, $field);
39 39
         if ($field === null) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Database/DStDevP.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      *                                        the column label in which you specify a condition for the
32 32
      *                                        column.
33 33
      */
34
-    public static function evaluate(array $database, array|null|int|string $field, array $criteria): float|string
34
+    public static function evaluate(array $database, array | null | int | string $field, array $criteria): float | string
35 35
     {
36 36
         $field = self::fieldExtract($database, $field);
37 37
         if ($field === null) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/OLE/PPS.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,12 +62,12 @@
 block discarded – undo
62 62
     /**
63 63
      * A timestamp.
64 64
      */
65
-    public float|int $Time1st;
65
+    public float | int $Time1st;
66 66
 
67 67
     /**
68 68
      * A timestamp.
69 69
      */
70
-    public float|int $Time2nd;
70
+    public float | int $Time2nd;
71 71
 
72 72
     /**
73 73
      * Starting block (small or big) for this PPS's data  inside the container.
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Collection/Memory/SimpleCache3.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,14 +62,14 @@
 block discarded – undo
62 62
         return array_key_exists($key, $this->cache);
63 63
     }
64 64
 
65
-    public function set(string $key, mixed $value, null|int|DateInterval $ttl = null): bool
65
+    public function set(string $key, mixed $value, null | int | DateInterval $ttl = null): bool
66 66
     {
67 67
         $this->cache[$key] = $value;
68 68
 
69 69
         return true;
70 70
     }
71 71
 
72
-    public function setMultiple(iterable $values, null|int|DateInterval $ttl = null): bool
72
+    public function setMultiple(iterable $values, null | int | DateInterval $ttl = null): bool
73 73
     {
74 74
         foreach ($values as $key => $value) {
75 75
             $this->set($key, $value);
Please login to merge, or discard this patch.
PhpSpreadsheetTests/Calculation/Functions/Statistical/AllSetupTeardown.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@
 block discarded – undo
213 213
         self::assertEqualsWithDelta($expectedResult, $sheet->getCell('Z99')->getCalculatedValue(), 1.0e-8, 'arguments supplied as ranges');
214 214
     }
215 215
 
216
-    private function convertToString(null|bool|float|int|string|Stringable $arg): string
216
+    private function convertToString(null | bool | float | int | string | Stringable $arg): string
217 217
     {
218 218
         if (is_string($arg)) {
219 219
             return '"' . $arg . '"';
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Custom/ComplexAssert.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         parent::__construct('complexAssert');
19 19
     }
20 20
 
21
-    private function testExpectedExceptions(string|float $expected, string|float $actual): bool
21
+    private function testExpectedExceptions(string | float $expected, string | float $actual): bool
22 22
     {
23 23
         //    Expecting an error, so we do a straight string comparison
24 24
         if ($expected === $actual) {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         return $this->errorMessage;
91 91
     }
92 92
 
93
-    public function runAssertComplexEquals(string $expected, array|float|string $actual, ?float $delta = null): void
93
+    public function runAssertComplexEquals(string $expected, array | float | string $actual, ?float $delta = null): void
94 94
     {
95 95
         self::assertTrue($this->assertComplexEquals($expected, $actual, $delta), $this->getErrorMessage());
96 96
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Engineering/Compare.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
30 30
      *            with the same dimensions
31 31
      */
32
-    public static function DELTA(array|float|bool|string|int $a, array|float|bool|string|int $b = 0.0): array|string|int
32
+    public static function DELTA(array | float | bool | string | int $a, array | float | bool | string | int $b = 0.0): array | string | int
33 33
     {
34 34
         if (is_array($a) || is_array($b)) {
35 35
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $a, $b);
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
65 65
      *            with the same dimensions
66 66
      */
67
-    public static function GESTEP(array|float|bool|string|int $number, $step = 0.0): array|string|int
67
+    public static function GESTEP(array | float | bool | string | int $number, $step = 0.0): array | string | int
68 68
     {
69 69
         if (is_array($number) || is_array($step)) {
70 70
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $step);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Font.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -329,12 +329,12 @@  discard block
 block discarded – undo
329 329
     /**
330 330
      * Pad amount for exact in pixels; use best guess if null.
331 331
      */
332
-    private static null|float|int $paddingAmountExact = null;
332
+    private static null | float | int $paddingAmountExact = null;
333 333
 
334 334
     /**
335 335
      * Set pad amount for exact in pixels; use best guess if null.
336 336
      */
337
-    public static function setPaddingAmountExact(null|float|int $paddingAmountExact): void
337
+    public static function setPaddingAmountExact(null | float | int $paddingAmountExact): void
338 338
     {
339 339
         self::$paddingAmountExact = $paddingAmountExact;
340 340
     }
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
     /**
343 343
      * Get pad amount for exact in pixels; or null if using best guess.
344 344
      */
345
-    public static function getPaddingAmountExact(): null|float|int
345
+    public static function getPaddingAmountExact(): null | float | int
346 346
     {
347 347
         return self::$paddingAmountExact;
348 348
     }
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
      *
504 504
      * @return int Font size (in pixels)
505 505
      */
506
-    public static function fontSizeToPixels(float|int $fontSizeInPoints): int
506
+    public static function fontSizeToPixels(float | int $fontSizeInPoints): int
507 507
     {
508 508
         return (int) ((4 / 3) * $fontSizeInPoints);
509 509
     }
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
      *
516 516
      * @return float|int Size (in pixels)
517 517
      */
518
-    public static function inchSizeToPixels(int|float $sizeInInch): int|float
518
+    public static function inchSizeToPixels(int | float $sizeInInch): int | float
519 519
     {
520 520
         return $sizeInInch * 96;
521 521
     }
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
      *
528 528
      * @return float Size (in pixels)
529 529
      */
530
-    public static function centimeterSizeToPixels(int|float $sizeInCm): float
530
+    public static function centimeterSizeToPixels(int | float $sizeInCm): float
531 531
     {
532 532
         return $sizeInCm * 37.795275591;
533 533
     }
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
      *
629 629
      * @return ($returnAsPixels is true ? int : float) Column width
630 630
      */
631
-    public static function getDefaultColumnWidthByFont(FontStyle $font, bool $returnAsPixels = false): float|int
631
+    public static function getDefaultColumnWidthByFont(FontStyle $font, bool $returnAsPixels = false): float | int
632 632
     {
633 633
         if (isset(self::DEFAULT_COLUMN_WIDTHS[$font->getName()][$font->getSize()])) {
634 634
             // Exact width can be determined
Please login to merge, or discard this patch.