Failed Conditions
Pull Request — master (#3743)
by Adrien
11:55
created
src/PhpSpreadsheet/Calculation/MathTrig/Helpers.php 1 patch
Spacing   +2 added lines, -2 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) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Sum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
      *
82 82
      * @return float|int|string The result, or a string containing an error
83 83
      */
84
-    public static function product(mixed ...$args): string|int|float
84
+    public static function product(mixed ...$args): string | int | float
85 85
     {
86 86
         $arrayList = $args;
87 87
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Exp.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
21 21
      *            with the same dimensions
22 22
      */
23
-    public static function evaluate(mixed $number): array|string|float
23
+    public static function evaluate(mixed $number): array | string | float
24 24
     {
25 25
         if (is_array($number)) {
26 26
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Round.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
23 23
      *            with the same dimensions
24 24
      */
25
-    public static function round(mixed $number, mixed $precision): array|string|float
25
+    public static function round(mixed $number, mixed $precision): array | string | float
26 26
     {
27 27
         if (is_array($number) || is_array($precision)) {
28 28
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $precision);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
51 51
      *            with the same dimensions
52 52
      */
53
-    public static function up($number, $digits): array|string|float
53
+    public static function up($number, $digits): array | string | float
54 54
     {
55 55
         if (is_array($number) || is_array($digits)) {
56 56
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $digits);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
87 87
      *            with the same dimensions
88 88
      */
89
-    public static function down($number, $digits): array|string|float
89
+    public static function down($number, $digits): array | string | float
90 90
     {
91 91
         if (is_array($number) || is_array($digits)) {
92 92
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $digits);
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
123 123
      *            with the same dimensions
124 124
      */
125
-    public static function multiple(mixed $number, mixed $multiple): array|string|int|float
125
+    public static function multiple(mixed $number, mixed $multiple): array | string | int | float
126 126
     {
127 127
         if (is_array($number) || is_array($multiple)) {
128 128
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $multiple);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
166 166
      *            with the same dimensions
167 167
      */
168
-    public static function even($number): array|string|float
168
+    public static function even($number): array | string | float
169 169
     {
170 170
         if (is_array($number)) {
171 171
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      *         If an array of numbers is passed as the argument, then the returned result will also be an array
192 192
      *            with the same dimensions
193 193
      */
194
-    public static function odd($number): array|string|int|float
194
+    public static function odd($number): array | string | int | float
195 195
     {
196 196
         if (is_array($number)) {
197 197
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Operations.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
24 24
      *            with the same dimensions
25 25
      */
26
-    public static function mod(mixed $dividend, mixed $divisor): array|string|float
26
+    public static function mod(mixed $dividend, mixed $divisor): array | string | float
27 27
     {
28 28
         if (is_array($dividend) || is_array($divisor)) {
29 29
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $dividend, $divisor);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      *
99 99
      * @param mixed ...$args Data values
100 100
      */
101
-    public static function product(mixed ...$args): string|float
101
+    public static function product(mixed ...$args): string | float
102 102
     {
103 103
         $args = array_filter(
104 104
             Functions::flattenArray($args),
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
142 142
      *            with the same dimensions
143 143
      */
144
-    public static function quotient(mixed $numerator, mixed $denominator): array|string|int
144
+    public static function quotient(mixed $numerator, mixed $denominator): array | string | int
145 145
     {
146 146
         if (is_array($numerator) || is_array($denominator)) {
147 147
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $numerator, $denominator);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Logarithms.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
27 27
      *            with the same dimensions
28 28
      */
29
-    public static function withBase(mixed $number, mixed $base = 10): array|string|float
29
+    public static function withBase(mixed $number, mixed $base = 10): array | string | float
30 30
     {
31 31
         if (is_array($number) || is_array($base)) {
32 32
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $base);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
57 57
      *            with the same dimensions
58 58
      */
59
-    public static function base10(mixed $number): array|string|float
59
+    public static function base10(mixed $number): array | string | float
60 60
     {
61 61
         if (is_array($number)) {
62 62
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      *         If an array of numbers is passed as an argument, then the returned result will also be an array
85 85
      *            with the same dimensions
86 86
      */
87
-    public static function natural(mixed $number): array|string|float
87
+    public static function natural(mixed $number): array | string | float
88 88
     {
89 89
         if (is_array($number)) {
90 90
             return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $number);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig/Base.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 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 evaluate(mixed $number, mixed $radix, mixed $minLength = null): array|string
32
+    public static function evaluate(mixed $number, mixed $radix, mixed $minLength = null): array | string
33 33
     {
34 34
         if (is_array($number) || is_array($radix) || is_array($minLength)) {
35 35
             return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $radix, $minLength);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
      *
322 322
      * @return float|string Excel date/time serial value or error message
323 323
      */
324
-    public static function COUPNCD(mixed $settlement, mixed $maturity, mixed $frequency, $basis = 0): string|float
324
+    public static function COUPNCD(mixed $settlement, mixed $maturity, mixed $frequency, $basis = 0): string | float
325 325
     {
326 326
         return Coupons::COUPNCD($settlement, $maturity, $frequency, $basis);
327 327
     }
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
      *
395 395
      * @return float|string Excel date/time serial value or error message
396 396
      */
397
-    public static function COUPPCD(mixed $settlement, mixed $maturity, mixed $frequency, $basis = 0): string|float
397
+    public static function COUPPCD(mixed $settlement, mixed $maturity, mixed $frequency, $basis = 0): string | float
398 398
     {
399 399
         return Coupons::COUPPCD($settlement, $maturity, $frequency, $basis);
400 400
     }
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
      * @param array|float $fractional_dollar Fractional Dollar
573 573
      * @param array|int $fraction Fraction
574 574
      */
575
-    public static function DOLLARDE($fractional_dollar = null, $fraction = 0): string|float|array
575
+    public static function DOLLARDE($fractional_dollar = null, $fraction = 0): string | float | array
576 576
     {
577 577
         return Dollar::decimal($fractional_dollar, $fraction);
578 578
     }
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
      * @param array|float $decimal_dollar Decimal Dollar
595 595
      * @param array|int $fraction Fraction
596 596
      */
597
-    public static function DOLLARFR($decimal_dollar = null, $fraction = 0): string|float|array
597
+    public static function DOLLARFR($decimal_dollar = null, $fraction = 0): string | float | array
598 598
     {
599 599
         return Dollar::fractional($decimal_dollar, $fraction);
600 600
     }
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
      * @param float $nominalRate Nominal interest rate
616 616
      * @param int $periodsPerYear Number of compounding payments per year
617 617
      */
618
-    public static function EFFECT($nominalRate = 0, $periodsPerYear = 0): string|float
618
+    public static function EFFECT($nominalRate = 0, $periodsPerYear = 0): string | float
619 619
     {
620 620
         return Financial\InterestRate::effective($nominalRate, $periodsPerYear);
621 621
     }
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
      *                                0 or omitted    At the end of the period.
644 644
      *                                1                At the beginning of the period.
645 645
      */
646
-    public static function FV($rate = 0, $nper = 0, $pmt = 0, $pv = 0, $type = 0): string|float
646
+    public static function FV($rate = 0, $nper = 0, $pmt = 0, $pv = 0, $type = 0): string | float
647 647
     {
648 648
         return Financial\CashFlow\Constant\Periodic::futureValue($rate, $nper, $pmt, $pv, $type);
649 649
     }
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
      * @param float $fv Future Value
725 725
      * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
726 726
      */
727
-    public static function IPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0): string|float
727
+    public static function IPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0): string | float
728 728
     {
729 729
         return Financial\CashFlow\Constant\Periodic\Interest::payment($rate, $per, $nper, $pv, $fv, $type);
730 730
     }
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
      *
831 831
      * @return float|string Result, or a string containing an error
832 832
      */
833
-    public static function NOMINAL($effectiveRate = 0, $periodsPerYear = 0): string|float
833
+    public static function NOMINAL($effectiveRate = 0, $periodsPerYear = 0): string | float
834 834
     {
835 835
         return InterestRate::nominal($effectiveRate, $periodsPerYear);
836 836
     }
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
      *
937 937
      * @return float|string Result, or a string containing an error
938 938
      */
939
-    public static function PPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0): string|float
939
+    public static function PPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0): string | float
940 940
     {
941 941
         return Financial\CashFlow\Constant\Periodic\Payments::interestPayment($rate, $per, $nper, $pv, $fv, $type);
942 942
     }
@@ -971,7 +971,7 @@  discard block
 block discarded – undo
971 971
      *
972 972
      * @return float|string Result, or a string containing an error
973 973
      */
974
-    public static function PRICE(mixed $settlement, mixed $maturity, $rate, $yield, $redemption, $frequency, $basis = 0): string|float
974
+    public static function PRICE(mixed $settlement, mixed $maturity, $rate, $yield, $redemption, $frequency, $basis = 0): string | float
975 975
     {
976 976
         return Securities\Price::price($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis);
977 977
     }
@@ -1054,7 +1054,7 @@  discard block
 block discarded – undo
1054 1054
      *
1055 1055
      * @return float|string Result, or a string containing an error
1056 1056
      */
1057
-    public static function PV($rate = 0, $nper = 0, $pmt = 0, $fv = 0, $type = 0): string|float
1057
+    public static function PV($rate = 0, $nper = 0, $pmt = 0, $fv = 0, $type = 0): string | float
1058 1058
     {
1059 1059
         return Financial\CashFlow\Constant\Periodic::presentValue($rate, $nper, $pmt, $fv, $type);
1060 1060
     }
@@ -1206,7 +1206,7 @@  discard block
 block discarded – undo
1206 1206
      *
1207 1207
      * @return float|string Result, or a string containing an error
1208 1208
      */
1209
-    public static function TBILLEQ(mixed $settlement, mixed $maturity, mixed $discount): string|float
1209
+    public static function TBILLEQ(mixed $settlement, mixed $maturity, mixed $discount): string | float
1210 1210
     {
1211 1211
         return TreasuryBill::bondEquivalentYield($settlement, $maturity, $discount);
1212 1212
     }
@@ -1229,7 +1229,7 @@  discard block
 block discarded – undo
1229 1229
      *
1230 1230
      * @return float|string Result, or a string containing an error
1231 1231
      */
1232
-    public static function TBILLPRICE(mixed $settlement, mixed $maturity, mixed $discount): string|float
1232
+    public static function TBILLPRICE(mixed $settlement, mixed $maturity, mixed $discount): string | float
1233 1233
     {
1234 1234
         return TreasuryBill::price($settlement, $maturity, $discount);
1235 1235
     }
@@ -1250,7 +1250,7 @@  discard block
 block discarded – undo
1250 1250
      *                                The maturity date is the date when the Treasury bill expires.
1251 1251
      * @param mixed $price The Treasury bill's price per $100 face value
1252 1252
      */
1253
-    public static function TBILLYIELD(mixed $settlement, mixed $maturity, mixed $price): string|float
1253
+    public static function TBILLYIELD(mixed $settlement, mixed $maturity, mixed $price): string | float
1254 1254
     {
1255 1255
         return TreasuryBill::yield($settlement, $maturity, $price);
1256 1256
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      * @param float $alpha Parameter to the distribution
124 124
      * @param float $beta Parameter to the distribution
125 125
      */
126
-    public static function BETADIST($value, $alpha, $beta, mixed $rMin = 0, mixed $rMax = 1): string|float|array
126
+    public static function BETADIST($value, $alpha, $beta, mixed $rMin = 0, mixed $rMax = 1): string | float | array
127 127
     {
128 128
         return Statistical\Distributions\Beta::distribution($value, $alpha, $beta, $rMin, $rMax);
129 129
     }
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
      *
535 535
      * @return array|float|string The result, or a string containing an error
536 536
      */
537
-    public static function GAMMAFunction($value): string|float|array
537
+    public static function GAMMAFunction($value): string | float | array
538 538
     {
539 539
         return Statistical\Distributions\Gamma::gamma($value);
540 540
     }
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
      *
592 592
      * @param float $value
593 593
      */
594
-    public static function GAMMALN($value): string|float|array
594
+    public static function GAMMALN($value): string | float | array
595 595
     {
596 596
         return Statistical\Distributions\Gamma::ln($value);
597 597
     }
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
      *
788 788
      * @return array|string The result, or a string containing an error
789 789
      */
790
-    public static function LINEST(array $yValues, $xValues = null, $const = true, $stats = false): string|array
790
+    public static function LINEST(array $yValues, $xValues = null, $const = true, $stats = false): string | array
791 791
     {
792 792
         return Trends::LINEST($yValues, $xValues, $const, $stats);
793 793
     }
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
      *
810 810
      * @return array|string The result, or a string containing an error
811 811
      */
812
-    public static function LOGEST(array $yValues, $xValues = null, $const = true, $stats = false): string|array
812
+    public static function LOGEST(array $yValues, $xValues = null, $const = true, $stats = false): string | array
813 813
     {
814 814
         return Trends::LOGEST($yValues, $xValues, $const, $stats);
815 815
     }
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
      *            accuracy if I can get my head round the mathematics
834 834
      *            (as described at) http://home.online.no/~pjacklam/notes/invnorm/
835 835
      */
836
-    public static function LOGINV($probability, $mean, $stdDev): string|float|array
836
+    public static function LOGINV($probability, $mean, $stdDev): string | float | array
837 837
     {
838 838
         return Statistical\Distributions\LogNormal::inverse($probability, $mean, $stdDev);
839 839
     }
@@ -1206,7 +1206,7 @@  discard block
 block discarded – undo
1206 1206
      *
1207 1207
      * @return float|string (string if result is an error)
1208 1208
      */
1209
-    public static function PERCENTRANK(mixed $valueSet, mixed $value, mixed $significance = 3): string|float
1209
+    public static function PERCENTRANK(mixed $valueSet, mixed $value, mixed $significance = 3): string | float
1210 1210
     {
1211 1211
         return Statistical\Percentiles::PERCENTRANK($valueSet, $value, $significance);
1212 1212
     }
Please login to merge, or discard this patch.