Passed
Pull Request — master (#3718)
by Adrien
12:54
created
Category
src/PhpSpreadsheet/Calculation/Calculation.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3999,7 +3999,7 @@  discard block
 block discarded – undo
3999 3999
     /**
4000 4000
      * @return false|string False indicates an error
4001 4001
      */
4002
-    private function convertMatrixReferences(string $formula): false|string
4002
+    private function convertMatrixReferences(string $formula): false | string
4003 4003
     {
4004 4004
         static $matrixReplaceFrom = [self::FORMULA_OPEN_MATRIX_BRACE, ';', self::FORMULA_CLOSE_MATRIX_BRACE];
4005 4005
         static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))'];
@@ -4102,7 +4102,7 @@  discard block
 block discarded – undo
4102 4102
      *
4103 4103
      * @return array<int, mixed>|false
4104 4104
      */
4105
-    private function internalParseFormula($formula, ?Cell $cell = null): bool|array
4105
+    private function internalParseFormula($formula, ?Cell $cell = null): bool | array
4106 4106
     {
4107 4107
         if (($formula = $this->convertMatrixReferences(trim($formula))) === false) {
4108 4108
             return false;
@@ -5251,7 +5251,7 @@  discard block
 block discarded – undo
5251 5251
      * @param mixed $operand1
5252 5252
      * @param mixed $operand2
5253 5253
      */
5254
-    private function executeArrayComparison($operand1, $operand2, string $operation, Stack &$stack, bool $recursingArrays): array
5254
+    private function executeArrayComparison($operand1, $operand2, string $operation, Stack & $stack, bool $recursingArrays): array
5255 5255
     {
5256 5256
         $result = [];
5257 5257
         if (!is_array($operand2)) {
@@ -5294,7 +5294,7 @@  discard block
 block discarded – undo
5294 5294
      * @param mixed $operand1
5295 5295
      * @param mixed $operand2
5296 5296
      */
5297
-    private function executeBinaryComparisonOperation($operand1, $operand2, string $operation, Stack &$stack, bool $recursingArrays = false): array|bool
5297
+    private function executeBinaryComparisonOperation($operand1, $operand2, string $operation, Stack & $stack, bool $recursingArrays = false): array | bool
5298 5298
     {
5299 5299
         //    If we're dealing with matrix operations, we want a matrix result
5300 5300
         if ((is_array($operand1)) || (is_array($operand2))) {
@@ -5524,7 +5524,7 @@  discard block
 block discarded – undo
5524 5524
      *
5525 5525
      * @return array|string Array of values in range if range contains more than one element. Otherwise, a single value is returned.
5526 5526
      */
5527
-    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string|array
5527
+    public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet = null, bool $resetLog = true): string | array
5528 5528
     {
5529 5529
         // Return value
5530 5530
         $returnValue = [];
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial/Helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      *
25 25
      * @return int|string Result, or a string containing an error
26 26
      */
27
-    public static function daysPerYear($year, $basis = 0): string|int
27
+    public static function daysPerYear($year, $basis = 0): string | int
28 28
     {
29 29
         if (!is_numeric($basis)) {
30 30
             return ExcelError::NAN();
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial/InterestRate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      * @param mixed $nominalRate Nominal interest rate as a float
21 21
      * @param mixed $periodsPerYear Integer number of compounding payments per year
22 22
      */
23
-    public static function effective($nominalRate = 0, $periodsPerYear = 0): string|float
23
+    public static function effective($nominalRate = 0, $periodsPerYear = 0): string | float
24 24
     {
25 25
         $nominalRate = Functions::flattenSingleValue($nominalRate);
26 26
         $periodsPerYear = Functions::flattenSingleValue($periodsPerYear);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      *
50 50
      * @return float|string Result, or a string containing an error
51 51
      */
52
-    public static function nominal($effectiveRate = 0, $periodsPerYear = 0): string|float
52
+    public static function nominal($effectiveRate = 0, $periodsPerYear = 0): string | float
53 53
     {
54 54
         $effectiveRate = Functions::flattenSingleValue($effectiveRate);
55 55
         $periodsPerYear = Functions::flattenSingleValue($periodsPerYear);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial/Amortization.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $period,
48 48
         $rate,
49 49
         $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
50
-    ): string|float {
50
+    ): string | float {
51 51
         $cost = Functions::flattenSingleValue($cost);
52 52
         $purchased = Functions::flattenSingleValue($purchased);
53 53
         $firstPeriod = Functions::flattenSingleValue($firstPeriod);
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $period,
137 137
         $rate,
138 138
         $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
139
-    ): string|float {
139
+    ): string | float {
140 140
         $cost = Functions::flattenSingleValue($cost);
141 141
         $purchased = Functions::flattenSingleValue($purchased);
142 142
         $firstPeriod = Functions::flattenSingleValue($firstPeriod);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial/TreasuryBill.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      *
25 25
      * @return float|string Result, or a string containing an error
26 26
      */
27
-    public static function bondEquivalentYield($settlement, $maturity, $discount): string|float
27
+    public static function bondEquivalentYield($settlement, $maturity, $discount): string | float
28 28
     {
29 29
         $settlement = Functions::flattenSingleValue($settlement);
30 30
         $maturity = Functions::flattenSingleValue($maturity);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      *
70 70
      * @return float|string Result, or a string containing an error
71 71
      */
72
-    public static function price($settlement, $maturity, $discount): string|float
72
+    public static function price($settlement, $maturity, $discount): string | float
73 73
     {
74 74
         $settlement = Functions::flattenSingleValue($settlement);
75 75
         $maturity = Functions::flattenSingleValue($maturity);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      *                                The maturity date is the date when the Treasury bill expires.
118 118
      * @param float|string $price The Treasury bill's price per $100 face value
119 119
      */
120
-    public static function yield($settlement, $maturity, $price): string|float
120
+    public static function yield($settlement, $maturity, $price): string | float
121 121
     {
122 122
         $settlement = Functions::flattenSingleValue($settlement);
123 123
         $maturity = Functions::flattenSingleValue($maturity);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial/CashFlow/Single.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      * @param mixed $principal the present value
21 21
      * @param float[] $schedule an array of interest rates to apply
22 22
      */
23
-    public static function futureValue($principal, $schedule): string|float
23
+    public static function futureValue($principal, $schedule): string | float
24 24
     {
25 25
         $principal = Functions::flattenSingleValue($principal);
26 26
         $schedule = Functions::flattenArray($schedule);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      *
51 51
      * @return float|string Result, or a string containing an error
52 52
      */
53
-    public static function periods($rate, $presentValue, $futureValue): string|float
53
+    public static function periods($rate, $presentValue, $futureValue): string | float
54 54
     {
55 55
         $rate = Functions::flattenSingleValue($rate);
56 56
         $presentValue = Functions::flattenSingleValue($presentValue);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      *
84 84
      * @return float|string Result, or a string containing an error
85 85
      */
86
-    public static function interestRate($periods = 0.0, $presentValue = 0.0, $futureValue = 0.0): string|float
86
+    public static function interestRate($periods = 0.0, $presentValue = 0.0, $futureValue = 0.0): string | float
87 87
     {
88 88
         $periods = Functions::flattenSingleValue($periods);
89 89
         $presentValue = Functions::flattenSingleValue($presentValue);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         return '';
183 183
     }
184 184
 
185
-    private static function xirrPart3(array $values, array $dates, float $x1, float $x2): float|string
185
+    private static function xirrPart3(array $values, array $dates, float $x1, float $x2): float | string
186 186
     {
187 187
         $f = self::xnpvOrdered($x1, $values, $dates, false);
188 188
         if ($f < 0.0) {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         return $rslt;
212 212
     }
213 213
 
214
-    private static function xirrBisection(array $values, array $dates, float $x1, float $x2): string|float
214
+    private static function xirrBisection(array $values, array $dates, float $x1, float $x2): string | float
215 215
     {
216 216
         $rslt = ExcelError::NAN();
217 217
         for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/Periodic.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      *                                    calculate the internal rate of return.
30 30
      * @param mixed $guess A number that you guess is close to the result of IRR
31 31
      */
32
-    public static function rate($values, $guess = 0.1): string|float
32
+    public static function rate($values, $guess = 0.1): string | float
33 33
     {
34 34
         if (!is_array($values)) {
35 35
             return ExcelError::VALUE();
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      *
98 98
      * @return float|string Result, or a string containing an error
99 99
      */
100
-    public static function modifiedRate($values, $financeRate, $reinvestmentRate): string|float
100
+    public static function modifiedRate($values, $financeRate, $reinvestmentRate): string | float
101 101
     {
102 102
         if (!is_array($values)) {
103 103
             return ExcelError::DIV0();
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      *
147 147
      * @return float
148 148
      */
149
-    public static function presentValue($rate, ...$args): int|float
149
+    public static function presentValue($rate, ...$args): int | float
150 150
     {
151 151
         $returnValue = 0;
152 152
 
Please login to merge, or discard this patch.
Calculation/Financial/CashFlow/Constant/Periodic/Cumulative.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $start,
38 38
         $end,
39 39
         $type = FinancialConstants::PAYMENT_END_OF_PERIOD
40
-    ): string|float|int {
40
+    ): string | float | int {
41 41
         $rate = Functions::flattenSingleValue($rate);
42 42
         $periods = Functions::flattenSingleValue($periods);
43 43
         $presentValue = Functions::flattenSingleValue($presentValue);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         $start,
103 103
         $end,
104 104
         $type = FinancialConstants::PAYMENT_END_OF_PERIOD
105
-    ): string|float|int {
105
+    ): string | float | int {
106 106
         $rate = Functions::flattenSingleValue($rate);
107 107
         $periods = Functions::flattenSingleValue($periods);
108 108
         $presentValue = Functions::flattenSingleValue($presentValue);
Please login to merge, or discard this patch.