@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | public function testOR($expectedResult, ...$args): void |
22 | 22 | { |
23 | - $result = Operations::or(...$args); |
|
23 | + $result = Operations:: or (...$args); |
|
24 | 24 | self::assertEquals($expectedResult, $result); |
25 | 25 | } |
26 | 26 |
@@ -15,13 +15,13 @@ |
||
15 | 15 | public function testIF($expectedResult, ...$args): void |
16 | 16 | { |
17 | 17 | if (count($args) === 0) { |
18 | - $result = Conditional::if(); |
|
18 | + $result = Conditional::if (); |
|
19 | 19 | } elseif (count($args) === 1) { |
20 | - $result = Conditional::if($args[0]); |
|
20 | + $result = Conditional::if ($args[0]); |
|
21 | 21 | } elseif (count($args) === 2) { |
22 | - $result = Conditional::if($args[0], $args[1]); |
|
22 | + $result = Conditional::if ($args[0], $args[1]); |
|
23 | 23 | } else { |
24 | - $result = Conditional::if($args[0], $args[1], $args[2]); |
|
24 | + $result = Conditional::if ($args[0], $args[1], $args[2]); |
|
25 | 25 | } |
26 | 26 | self::assertEquals($expectedResult, $result); |
27 | 27 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | public function testAND($expectedResult, ...$args): void |
22 | 22 | { |
23 | - $result = Operations::and(...$args); |
|
23 | + $result = Operations:: and (...$args); |
|
24 | 24 | self::assertEquals($expectedResult, $result); |
25 | 25 | } |
26 | 26 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | public function testXOR($expectedResult, ...$args): void |
22 | 22 | { |
23 | - $result = Operations::xor(...$args); |
|
23 | + $result = Operations:: xor (...$args); |
|
24 | 24 | self::assertEquals($expectedResult, $result); |
25 | 25 | } |
26 | 26 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | public function testSWITCH($expectedResult, ...$args): void |
22 | 22 | { |
23 | - $result = Conditional::switch(...$args); |
|
23 | + $result = Conditional::switch (...$args); |
|
24 | 24 | self::assertEquals($expectedResult, $result); |
25 | 25 | } |
26 | 26 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * |
47 | 47 | * @return mixed The value of returnIfTrue or returnIfFalse determined by condition |
48 | 48 | */ |
49 | - public static function if($condition = true, $returnIfTrue = 0, $returnIfFalse = false) |
|
49 | + public static function if ($condition = true, $returnIfTrue = 0, $returnIfFalse = false) |
|
50 | 50 | { |
51 | 51 | $condition = ($condition === null) ? true : Functions::flattenSingleValue($condition); |
52 | 52 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * |
87 | 87 | * @return mixed The value of matched expression |
88 | 88 | */ |
89 | - public static function switch(...$arguments) |
|
89 | + public static function switch (...$arguments) |
|
90 | 90 | { |
91 | 91 | $result = ExcelError::VALUE(); |
92 | 92 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | $errorpart = $errorpart ?? ''; |
142 | 142 | |
143 | - return self::if(ErrorValue::isError($testValue), $errorpart, $testValue); |
|
143 | + return self::if (ErrorValue::isError($testValue), $errorpart, $testValue); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | |
167 | 167 | $napart = $napart ?? ''; |
168 | 168 | |
169 | - return self::if(ErrorValue::isNa($testValue), $napart, $testValue); |
|
169 | + return self::if (ErrorValue::isNa($testValue), $napart, $testValue); |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | /** |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | for ($i = 0; $i < $argumentCount; $i += 2) { |
198 | 198 | $testValue = ($arguments[$i] === null) ? '' : Functions::flattenSingleValue($arguments[$i]); |
199 | 199 | $returnIfTrue = ($arguments[$i + 1] === null) ? '' : $arguments[$i + 1]; |
200 | - $result = self::if($testValue, $returnIfTrue, $falseValueException); |
|
200 | + $result = self::if ($testValue, $returnIfTrue, $falseValueException); |
|
201 | 201 | |
202 | 202 | if ($result !== $falseValueException) { |
203 | 203 | return $result; |
@@ -5021,7 +5021,7 @@ discard block |
||
5021 | 5021 | return $output; |
5022 | 5022 | } |
5023 | 5023 | |
5024 | - private function validateBinaryOperand(&$operand, Stack &$stack): bool |
|
5024 | + private function validateBinaryOperand(&$operand, Stack & $stack): bool |
|
5025 | 5025 | { |
5026 | 5026 | if (is_array($operand)) { |
5027 | 5027 | if ((count($operand, COUNT_RECURSIVE) - count($operand)) == 1) { |
@@ -5066,7 +5066,7 @@ discard block |
||
5066 | 5066 | * |
5067 | 5067 | * @return array |
5068 | 5068 | */ |
5069 | - private function executeArrayComparison($operand1, $operand2, $operation, Stack &$stack, bool $recursingArrays) |
|
5069 | + private function executeArrayComparison($operand1, $operand2, $operation, Stack & $stack, bool $recursingArrays) |
|
5070 | 5070 | { |
5071 | 5071 | $result = []; |
5072 | 5072 | if (!is_array($operand2)) { |
@@ -5113,7 +5113,7 @@ discard block |
||
5113 | 5113 | * |
5114 | 5114 | * @return mixed |
5115 | 5115 | */ |
5116 | - private function executeBinaryComparisonOperation($operand1, $operand2, $operation, Stack &$stack, $recursingArrays = false) |
|
5116 | + private function executeBinaryComparisonOperation($operand1, $operand2, $operation, Stack & $stack, $recursingArrays = false) |
|
5117 | 5117 | { |
5118 | 5118 | // If we're dealing with matrix operations, we want a matrix result |
5119 | 5119 | if ((is_array($operand1)) || (is_array($operand2))) { |