Failed Conditions
Pull Request — master (#3743)
by Adrien
11:55
created
src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
29 29
      *            with the same dimensions
30 30
      */
31
-    public static function day(mixed $dateValue): array|int|string
31
+    public static function day(mixed $dateValue): array | int | string
32 32
     {
33 33
         if (is_array($dateValue)) {
34 34
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
70 70
      *            with the same dimensions
71 71
      */
72
-    public static function month(mixed $dateValue): array|string|int
72
+    public static function month(mixed $dateValue): array | string | int
73 73
     {
74 74
         if (is_array($dateValue)) {
75 75
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue);
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
109 109
      *            with the same dimensions
110 110
      */
111
-    public static function year(mixed $dateValue): array|string|int
111
+    public static function year(mixed $dateValue): array | string | int
112 112
     {
113 113
         if (is_array($dateValue)) {
114 114
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTimeExcel/Helpers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     /**
128 128
      * Return result in one of three formats.
129 129
      */
130
-    public static function returnIn3FormatsArray(array $dateArray, bool $noFrac = false): DateTime|float|int
130
+    public static function returnIn3FormatsArray(array $dateArray, bool $noFrac = false): DateTime | float | int
131 131
     {
132 132
         $retType = Functions::getReturnDateType();
133 133
         if ($retType === Functions::RETURNDATE_PHP_DATETIME_OBJECT) {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     /**
180 180
      * Return result in one of three formats.
181 181
      */
182
-    public static function returnIn3FormatsObject(DateTime $PHPDateObject): DateTime|float|int
182
+    public static function returnIn3FormatsObject(DateTime $PHPDateObject): DateTime | float | int
183 183
     {
184 184
         $retType = Functions::getReturnDateType();
185 185
         if ($retType === Functions::RETURNDATE_PHP_DATETIME_OBJECT) {
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     /**
225 225
      * Many functions accept null argument treated as 0.
226 226
      */
227
-    public static function validateNumericNull(mixed $number): int|float
227
+    public static function validateNumericNull(mixed $number): int | float
228 228
     {
229 229
         $number = Functions::flattenSingleValue($number);
230 230
         if ($number === null) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeParts.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
28 28
      *            with the same dimensions
29 29
      */
30
-    public static function hour(mixed $timeValue): array|string|int
30
+    public static function hour(mixed $timeValue): array | string | int
31 31
     {
32 32
         if (is_array($timeValue)) {
33 33
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $timeValue);
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
69 69
      *            with the same dimensions
70 70
      */
71
-    public static function minute(mixed $timeValue): array|string|int
71
+    public static function minute(mixed $timeValue): array | string | int
72 72
     {
73 73
         if (is_array($timeValue)) {
74 74
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $timeValue);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
110 110
      *            with the same dimensions
111 111
      */
112
-    public static function second(mixed $timeValue): array|string|int
112
+    public static function second(mixed $timeValue): array | string | int
113 113
     {
114 114
         if (is_array($timeValue)) {
115 115
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $timeValue);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -439,7 +439,7 @@
 block discarded – undo
439 439
      * @deprecated 1.23.0 Use the isLogical() method in the Information\Value class instead
440 440
      * @see Information\Value::isLogical()
441 441
      */
442
-    public static function isLogical(mixed $value = null): bool|array
442
+    public static function isLogical(mixed $value = null): bool | array
443 443
     {
444 444
         return Information\Value::isLogical($value);
445 445
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Csv/Delimiter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 
91 91
             $meanSquareDeviations[$delimiter] = array_reduce(
92 92
                 $series,
93
-                fn ($sum, $value): int|float => $sum + ($value - $median) ** 2
93
+                fn ($sum, $value): int | float => $sum + ($value - $median) ** 2
94 94
             ) / count($series);
95 95
         }
96 96
 
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
      *         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/Statistical/Distributions/HyperGeometric.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
31 31
      *            with the same dimensions
32 32
      */
33
-    public static function distribution(mixed $sampleSuccesses, mixed $sampleNumber, mixed $populationSuccesses, mixed $populationNumber): array|string|float
33
+    public static function distribution(mixed $sampleSuccesses, mixed $sampleNumber, mixed $populationSuccesses, mixed $populationNumber): array | string | float
34 34
     {
35 35
         if (
36 36
             is_array($sampleSuccesses) || is_array($sampleNumber)
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Xls/Worksheet.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2144,7 +2144,7 @@  discard block
 block discarded – undo
2144 2144
      * @param float $scale_x The horizontal scale
2145 2145
      * @param float $scale_y The vertical scale
2146 2146
      */
2147
-    public function insertBitmap($row, $col, GdImage|string $bitmap, $x = 0, $y = 0, $scale_x = 1, $scale_y = 1): void
2147
+    public function insertBitmap($row, $col, GdImage | string $bitmap, $x = 0, $y = 0, $scale_x = 1, $scale_y = 1): void
2148 2148
     {
2149 2149
         $bitmap_array = $bitmap instanceof GdImage
2150 2150
             ? $this->processBitmapGd($bitmap)
@@ -2286,7 +2286,7 @@  discard block
 block discarded – undo
2286 2286
      * @param int $rwB Row containing bottom right corner of object
2287 2287
      * @param int $dyB Distance from bottom of cell
2288 2288
      */
2289
-    private function writeObjPicture(int $colL, int $dxL, int $rwT, int|float $dyT, int $colR, int $dxR, int $rwB, int $dyB): void
2289
+    private function writeObjPicture(int $colL, int $dxL, int $rwT, int | float $dyT, int $colR, int $dxR, int $rwB, int $dyB): void
2290 2290
     {
2291 2291
         $record = 0x005D; // Record identifier
2292 2292
         $length = 0x003C; // Bytes to follow
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Trend/BestFit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -424,7 +424,7 @@
 block discarded – undo
424 424
     {
425 425
         return array_sum(
426 426
             array_map(
427
-                fn ($value): float|int => $value ** 2,
427
+                fn ($value): float | int => $value ** 2,
428 428
                 $values
429 429
             )
430 430
         );
Please login to merge, or discard this patch.