@@ -11,13 +11,13 @@ discard block |
||
| 11 | 11 | * @param mixed[] $args |
| 12 | 12 | */ |
| 13 | 13 | public static function addCondition(Closure $addFn, $expression, ...$args) { |
| 14 | - if($expression instanceof OptionalExpression) { |
|
| 15 | - if($expression->isValid()) { |
|
| 14 | + if ($expression instanceof OptionalExpression) { |
|
| 15 | + if ($expression->isValid()) { |
|
| 16 | 16 | $addFn($expression->getExpression(), $expression->getValue()); |
| 17 | 17 | } |
| 18 | - } elseif(is_object($expression)) { |
|
| 18 | + } elseif (is_object($expression)) { |
|
| 19 | 19 | self::addAsArray($addFn, (array) $expression, $args); |
| 20 | - } elseif(is_array($expression)) { |
|
| 20 | + } elseif (is_array($expression)) { |
|
| 21 | 21 | self::addAsArray($addFn, $expression, $args); |
| 22 | 22 | } else { |
| 23 | 23 | $addFn($expression, $args); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * @param array $args |
| 31 | 31 | */ |
| 32 | 32 | private static function addAsArray(Closure $addFn, array $expression, array $args) { |
| 33 | - if(count($expression) > 0) { |
|
| 33 | + if (count($expression) > 0) { |
|
| 34 | 34 | $addFn($expression, $args); |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | * @return $this |
| 18 | 18 | */ |
| 19 | 19 | public function having($expression, ...$args) { |
| 20 | - $fn = function (...$args) { $this->having[] = $args; }; |
|
| 20 | + $fn = function(...$args) { $this->having[] = $args; }; |
|
| 21 | 21 | ConditionAddHelper::addCondition($fn, $expression, ...$args); |
| 22 | 22 | return $this; |
| 23 | 23 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | * @return $this |
| 18 | 18 | */ |
| 19 | 19 | public function where($expression, ...$args) { |
| 20 | - $fn = function (...$args) { $this->where[] = $args; }; |
|
| 20 | + $fn = function(...$args) { $this->where[] = $args; }; |
|
| 21 | 21 | ConditionAddHelper::addCondition($fn, $expression, ...$args); |
| 22 | 22 | return $this; |
| 23 | 23 | } |