@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @param string[] $conditions |
18 | 18 | * @return Predicate |
19 | 19 | */ |
20 | - public static function all (array $conditions) { |
|
20 | + public static function all(array $conditions) { |
|
21 | 21 | if (count($conditions) === 1) { |
22 | 22 | return reset($conditions); |
23 | 23 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * @param string[] $conditions |
31 | 31 | * @return Predicate |
32 | 32 | */ |
33 | - public static function any (array $conditions) { |
|
33 | + public static function any(array $conditions) { |
|
34 | 34 | if (count($conditions) === 1) { |
35 | 35 | return reset($conditions); |
36 | 36 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * @param string $listOper |
58 | 58 | * @return Predicate |
59 | 59 | */ |
60 | - public static function compare (string $a, $b = null, $oper = '=', $subOper = 'ANY', $listOper = 'IN') { |
|
60 | + public static function compare(string $a, $b = null, $oper = '=', $subOper = 'ANY', $listOper = 'IN') { |
|
61 | 61 | if (is_array($b)) { |
62 | 62 | return new static("{$a} {$listOper} (" . implode(',', $b) . ")"); |
63 | 63 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * @param string $listOper |
80 | 80 | * @return Predicate[] |
81 | 81 | */ |
82 | - public static function compareArray (array $values, $oper = '=', $subOper = 'ANY', $listOper = 'IN') { |
|
82 | + public static function compareArray(array $values, $oper = '=', $subOper = 'ANY', $listOper = 'IN') { |
|
83 | 83 | foreach ($values as $a => $b) { |
84 | 84 | $values[$a] = static::compare($a, $b, $oper, $subOper, $listOper); |
85 | 85 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * |
92 | 92 | * @return Predicate |
93 | 93 | */ |
94 | - public function invert () { |
|
94 | + public function invert() { |
|
95 | 95 | return new static("NOT({$this})"); |
96 | 96 | } |
97 | 97 | } |
98 | 98 | \ No newline at end of file |
@@ -60,8 +60,7 @@ |
||
60 | 60 | public static function compare (string $a, $b = null, $oper = '=', $subOper = 'ANY', $listOper = 'IN') { |
61 | 61 | if (is_array($b)) { |
62 | 62 | return new static("{$a} {$listOper} (" . implode(',', $b) . ")"); |
63 | - } |
|
64 | - elseif ($b instanceof Select) { |
|
63 | + } elseif ($b instanceof Select) { |
|
65 | 64 | return new static("{$a} {$oper} {$subOper} ({$b->toSql()})"); |
66 | 65 | } |
67 | 66 | return new static("{$a} {$oper} {$b}"); |