Passed
Pull Request — master (#4483)
by Owen
14:38
created
src/PhpSpreadsheet/Calculation/DateTimeExcel/Time.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
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
44 44
      *            with the same dimensions
45 45
      */
46
-    public static function fromHMS(array|int|float|bool|null|string $hour, array|int|float|bool|null|string $minute, array|int|float|bool|null|string $second): array|string|float|int|DateTime
46
+    public static function fromHMS(array | int | float | bool | null | string $hour, array | int | float | bool | null | string $minute, array | int | float | bool | null | string $second): array | string | float | int | DateTime
47 47
     {
48 48
         if (is_array($hour) || is_array($minute) || is_array($second)) {
49 49
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $hour, $minute, $second);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTimeExcel/YearFrac.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
      *         If an array of values is passed for the $startDate or $endDays,arguments, then the returned result
44 44
      *            will also be an array with matching dimensions
45 45
      */
46
-    public static function fraction(mixed $startDate, mixed $endDate, array|int|string|null $method = 0): array|string|int|float
46
+    public static function fraction(mixed $startDate, mixed $endDate, array | int | string | null $method = 0): array | string | int | float
47 47
     {
48 48
         if (is_array($startDate) || is_array($endDate) || is_array($method)) {
49 49
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $startDate, $endDate, $method);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTimeExcel/Difference.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      *         If an array of values is passed for the $startDate or $endDays,arguments, then the returned result
29 29
      *            will also be an array with matching dimensions
30 30
      */
31
-    public static function interval(mixed $startDate, mixed $endDate, array|string $unit = 'D')
31
+    public static function interval(mixed $startDate, mixed $endDate, array | string $unit = 'D')
32 32
     {
33 33
         if (is_array($startDate) || is_array($endDate) || is_array($unit)) {
34 34
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $startDate, $endDate, $unit);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     /**
81 81
      * Decide whether it's time to set retVal.
82 82
      */
83
-    private static function replaceRetValue(bool|int $retVal, string $unit, string $compare): null|bool|int
83
+    private static function replaceRetValue(bool | int $retVal, string $unit, string $compare): null | bool | int
84 84
     {
85 85
         if ($retVal !== false || $unit !== $compare) {
86 86
             return $retVal;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTimeExcel/Week.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      *         If an array of values is passed as the argument, then the returned result will also be an array
46 46
      *            with the same dimensions
47 47
      */
48
-    public static function number(mixed $dateValue, array|int|string|null $method = Constants::STARTWEEK_SUNDAY): array|int|string
48
+    public static function number(mixed $dateValue, array | int | string | null $method = Constants::STARTWEEK_SUNDAY): array | int | string
49 49
     {
50 50
         if (is_array($dateValue) || is_array($method)) {
51 51
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $dateValue, $method);
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
106 106
      *            with the same dimensions
107 107
      */
108
-    public static function isoWeekNumber(mixed $dateValue): array|int|string
108
+    public static function isoWeekNumber(mixed $dateValue): array | int | string
109 109
     {
110 110
         if (is_array($dateValue)) {
111 111
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue);
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      *         If an array of values is passed as the argument, then the returned result will also be an array
151 151
      *            with the same dimensions
152 152
      */
153
-    public static function day(null|array|float|int|string|bool $dateValue, mixed $style = 1): array|string|int
153
+    public static function day(null | array | float | int | string | bool $dateValue, mixed $style = 1): array | string | int
154 154
     {
155 155
         if (is_array($dateValue) || is_array($style)) {
156 156
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $dateValue, $style);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Helpers.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      *
14 14
      * @return float|string quotient or DIV0 if denominator is too small
15 15
      */
16
-    public static function verySmallDenominator(float $numerator, float $denominator): string|float
16
+    public static function verySmallDenominator(float $numerator, float $denominator): string | float
17 17
     {
18 18
         return (abs($denominator) < 1.0E-12) ? ExcelError::DIV0() : ($numerator / $denominator);
19 19
     }
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     /**
22 22
      * Many functions accept null/false/true argument treated as 0/0/1.
23 23
      */
24
-    public static function validateNumericNullBool(mixed $number): int|float
24
+    public static function validateNumericNullBool(mixed $number): int | float
25 25
     {
26 26
         $number = Functions::flattenSingleValue($number);
27 27
         if ($number === null) {
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     /**
41 41
      * Validate numeric, but allow substitute for null.
42 42
      */
43
-    public static function validateNumericNullSubstitution(mixed $number, null|float|int $substitute): float|int
43
+    public static function validateNumericNullSubstitution(mixed $number, null | float | int $substitute): float | int
44 44
     {
45 45
         $number = Functions::flattenSingleValue($number);
46 46
         if ($number === null && $substitute !== null) {
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     /**
57 57
      * Confirm number >= 0.
58 58
      */
59
-    public static function validateNotNegative(float|int $number, ?string $except = null): void
59
+    public static function validateNotNegative(float | int $number, ?string $except = null): void
60 60
     {
61 61
         if ($number >= 0) {
62 62
             return;
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     /**
69 69
      * Confirm number > 0.
70 70
      */
71
-    public static function validatePositive(float|int $number, ?string $except = null): void
71
+    public static function validatePositive(float | int $number, ?string $except = null): void
72 72
     {
73 73
         if ($number > 0) {
74 74
             return;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     /**
81 81
      * Confirm number != 0.
82 82
      */
83
-    public static function validateNotZero(float|int $number): void
83
+    public static function validateNotZero(float | int $number): void
84 84
     {
85 85
         if ($number) {
86 86
             return;
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     /**
105 105
      * Return NAN or value depending on argument.
106 106
      */
107
-    public static function numberOrNan(float $result): float|string
107
+    public static function numberOrNan(float $result): float | string
108 108
     {
109 109
         return is_nan($result) ? ExcelError::NAN() : $result;
110 110
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Gcd.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      * Excel Function:
19 19
      *        GCD(number1[,number2[, ...]])
20 20
      */
21
-    private static function evaluateGCD(float|int $a, float|int $b): float|int
21
+    private static function evaluateGCD(float | int $a, float | int $b): float | int
22 22
     {
23 23
         return $b ? self::evaluateGCD($b, $a % $b) : $a;
24 24
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Factorial.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 fact($factVal): array|string|float|int
30
+    public static function fact($factVal): array | string | float | int
31 31
     {
32 32
         if (is_array($factVal)) {
33 33
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $factVal);
@@ -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 factDouble($factVal): array|string|float|int
72
+    public static function factDouble($factVal): array | string | float | int
73 73
     {
74 74
         if (is_array($factVal)) {
75 75
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $factVal);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      *
102 102
      * @return float|int|string The result, or a string containing an error
103 103
      */
104
-    public static function multinomial(...$args): string|int|float
104
+    public static function multinomial(...$args): string | int | float
105 105
     {
106 106
         $summer = 0;
107 107
         $divisor = 1;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial/Depreciation.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * @param mixed $month Number of months in the first year. If month is omitted,
34 34
      *                         it defaults to 12.
35 35
      */
36
-    public static function DB(mixed $cost, mixed $salvage, mixed $life, mixed $period, mixed $month = 12): string|float|int
36
+    public static function DB(mixed $cost, mixed $salvage, mixed $life, mixed $period, mixed $month = 12): string | float | int
37 37
     {
38 38
         $cost = Functions::flattenSingleValue($cost);
39 39
         $salvage = Functions::flattenSingleValue($salvage);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      *                                If factor is omitted, it is assumed to be 2 (the
98 98
      *                                double-declining balance method).
99 99
      */
100
-    public static function DDB(mixed $cost, mixed $salvage, mixed $life, mixed $period, mixed $factor = 2.0): float|string
100
+    public static function DDB(mixed $cost, mixed $salvage, mixed $life, mixed $period, mixed $factor = 2.0): float | string
101 101
     {
102 102
         $cost = Functions::flattenSingleValue($cost);
103 103
         $salvage = Functions::flattenSingleValue($salvage);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      *
146 146
      * @return float|string Result, or a string containing an error
147 147
      */
148
-    public static function SLN(mixed $cost, mixed $salvage, mixed $life): string|float
148
+    public static function SLN(mixed $cost, mixed $salvage, mixed $life): string | float
149 149
     {
150 150
         $cost = Functions::flattenSingleValue($cost);
151 151
         $salvage = Functions::flattenSingleValue($salvage);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      *
179 179
      * @return float|string Result, or a string containing an error
180 180
      */
181
-    public static function SYD(mixed $cost, mixed $salvage, mixed $life, mixed $period): string|float
181
+    public static function SYD(mixed $cost, mixed $salvage, mixed $life, mixed $period): string | float
182 182
     {
183 183
         $cost = Functions::flattenSingleValue($cost);
184 184
         $salvage = Functions::flattenSingleValue($salvage);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         mixed $price,
39 39
         mixed $redemption,
40 40
         mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
41
-    ): float|string {
41
+    ): float | string {
42 42
         $settlement = Functions::flattenSingleValue($settlement);
43 43
         $maturity = Functions::flattenSingleValue($maturity);
44 44
         $price = Functions::flattenSingleValue($price);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         mixed $investment,
100 100
         mixed $redemption,
101 101
         mixed $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
102
-    ): float|string {
102
+    ): float | string {
103 103
         $settlement = Functions::flattenSingleValue($settlement);
104 104
         $maturity = Functions::flattenSingleValue($maturity);
105 105
         $investment = Functions::flattenSingleValue($investment);
Please login to merge, or discard this patch.