@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * |
| 13 | 13 | * @return Predicate |
| 14 | 14 | */ |
| 15 | - public function not () { |
|
| 15 | + public function not() { |
|
| 16 | 16 | return new static("NOT({$this})"); |
| 17 | 17 | } |
| 18 | 18 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * @param array $values |
| 27 | 27 | * @return Value |
| 28 | 28 | */ |
| 29 | - public function coalesce (array $values) { |
|
| 29 | + public function coalesce(array $values) { |
|
| 30 | 30 | array_unshift($values, $this); |
| 31 | 31 | $values = $this->db->quoteList($values); |
| 32 | 32 | return $this->db->factory(Value::class, $this->db, "COALESCE({$values})"); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * @param array $values `[when => then]` |
| 39 | 39 | * @return Choice |
| 40 | 40 | */ |
| 41 | - public function getChoice (array $values) { |
|
| 41 | + public function getChoice(array $values) { |
|
| 42 | 42 | return $this->db->factory(Choice::class, $this->db, "{$this}", $values); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | * @param null|bool|number|string|Select $arg |
| 52 | 52 | * @return Predicate |
| 53 | 53 | */ |
| 54 | - public function is ($arg): Predicate { |
|
| 54 | + public function is($arg): Predicate { |
|
| 55 | 55 | if ($arg instanceof Select) { |
| 56 | 56 | if ($this->db->isSQLite()) { |
| 57 | 57 | /** @var Select $sub */ |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | * @param number $max |
| 80 | 80 | * @return Predicate |
| 81 | 81 | */ |
| 82 | - public function isBetween ($min, $max) { |
|
| 82 | + public function isBetween($min, $max) { |
|
| 83 | 83 | $min = $this->db->quote($min); |
| 84 | 84 | $max = $this->db->quote($max); |
| 85 | 85 | return $this->db->factory(Predicate::class, "{$this} BETWEEN {$min} AND {$max}"); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | * @param bool|number|string|array|Select $arg |
| 92 | 92 | * @return Predicate |
| 93 | 93 | */ |
| 94 | - public function isEqual ($arg) { |
|
| 94 | + public function isEqual($arg) { |
|
| 95 | 95 | return $this->db->match($this, $arg); |
| 96 | 96 | } |
| 97 | 97 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * |
| 101 | 101 | * @return Predicate |
| 102 | 102 | */ |
| 103 | - public function isFalse () { |
|
| 103 | + public function isFalse() { |
|
| 104 | 104 | return $this->db->factory(Predicate::class, "{$this} IS FALSE"); |
| 105 | 105 | } |
| 106 | 106 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * @param string $multi `ALL|ANY` |
| 117 | 117 | * @return Predicate |
| 118 | 118 | */ |
| 119 | - public function isGreater ($arg, string $multi = 'ALL') { |
|
| 119 | + public function isGreater($arg, string $multi = 'ALL') { |
|
| 120 | 120 | if ($arg instanceof Select) { |
| 121 | 121 | switch ($this->db) { |
| 122 | 122 | case 'sqlite': |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | * @param string $multi `ALL|ANY` |
| 148 | 148 | * @return Predicate |
| 149 | 149 | */ |
| 150 | - public function isGreaterOrEqual ($arg, string $multi = 'ALL') { |
|
| 150 | + public function isGreaterOrEqual($arg, string $multi = 'ALL') { |
|
| 151 | 151 | if ($arg instanceof Select) { |
| 152 | 152 | switch ($this->db) { |
| 153 | 153 | case 'sqlite': |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | * @param string $multi `ALL|ANY` |
| 179 | 179 | * @return Predicate |
| 180 | 180 | */ |
| 181 | - public function isLess ($arg, string $multi = 'ALL') { |
|
| 181 | + public function isLess($arg, string $multi = 'ALL') { |
|
| 182 | 182 | if ($arg instanceof Select) { |
| 183 | 183 | switch ($this->db) { |
| 184 | 184 | case 'sqlite': |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | * @param string $multi `ALL|ANY` |
| 210 | 210 | * @return Predicate |
| 211 | 211 | */ |
| 212 | - public function isLessOrEqual ($arg, string $multi = 'ALL') { |
|
| 212 | + public function isLessOrEqual($arg, string $multi = 'ALL') { |
|
| 213 | 213 | if ($arg instanceof Select) { |
| 214 | 214 | switch ($this->db) { |
| 215 | 215 | case 'sqlite': |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | * @param string $pattern |
| 235 | 235 | * @return Predicate |
| 236 | 236 | */ |
| 237 | - public function isLike (string $pattern) { |
|
| 237 | + public function isLike(string $pattern) { |
|
| 238 | 238 | $pattern = $this->db->quote($pattern); |
| 239 | 239 | return $this->db->factory(Predicate::class, "{$this} LIKE {$pattern}"); |
| 240 | 240 | } |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | * @param null|bool|number|string|Select $arg |
| 246 | 246 | * @return Predicate |
| 247 | 247 | */ |
| 248 | - public function isNot ($arg) { |
|
| 248 | + public function isNot($arg) { |
|
| 249 | 249 | return $this->is($arg)->not(); |
| 250 | 250 | } |
| 251 | 251 | |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | * @param number $max |
| 257 | 257 | * @return Predicate |
| 258 | 258 | */ |
| 259 | - public function isNotBetween ($min, $max) { |
|
| 259 | + public function isNotBetween($min, $max) { |
|
| 260 | 260 | $min = $this->db->quote($min); |
| 261 | 261 | $max = $this->db->quote($max); |
| 262 | 262 | return $this->db->factory(Predicate::class, "{$this} NOT BETWEEN {$min} AND {$max}"); |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | * @param bool|number|string|array|Select $arg |
| 269 | 269 | * @return Predicate |
| 270 | 270 | */ |
| 271 | - public function isNotEqual ($arg) { |
|
| 271 | + public function isNotEqual($arg) { |
|
| 272 | 272 | if ($arg instanceof Select) { |
| 273 | 273 | return $this->db->factory(Predicate::class, "{$this} NOT IN ({$arg->toSql()})"); |
| 274 | 274 | } |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | * @param string $pattern |
| 285 | 285 | * @return Predicate |
| 286 | 286 | */ |
| 287 | - public function isNotLike (string $pattern) { |
|
| 287 | + public function isNotLike(string $pattern) { |
|
| 288 | 288 | $pattern = $this->db->quote($pattern); |
| 289 | 289 | return $this->db->factory(Predicate::class, "{$this} NOT LIKE {$pattern}"); |
| 290 | 290 | } |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | * |
| 295 | 295 | * @return Predicate |
| 296 | 296 | */ |
| 297 | - public function isNotNull () { |
|
| 297 | + public function isNotNull() { |
|
| 298 | 298 | return $this->db->factory(Predicate::class, "{$this} IS NOT NULL"); |
| 299 | 299 | } |
| 300 | 300 | |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | * @param string $pattern |
| 305 | 305 | * @return Predicate |
| 306 | 306 | */ |
| 307 | - public function isNotRegExp (string $pattern) { |
|
| 307 | + public function isNotRegExp(string $pattern) { |
|
| 308 | 308 | $pattern = $this->db->quote($pattern); |
| 309 | 309 | return $this->db->factory(Predicate::class, "{$this} NOT REGEXP {$pattern}"); |
| 310 | 310 | } |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | * |
| 315 | 315 | * @return Predicate |
| 316 | 316 | */ |
| 317 | - public function isNull () { |
|
| 317 | + public function isNull() { |
|
| 318 | 318 | return $this->db->factory(Predicate::class, "{$this} IS NULL"); |
| 319 | 319 | } |
| 320 | 320 | |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | * @param string $pattern |
| 325 | 325 | * @return Predicate |
| 326 | 326 | */ |
| 327 | - public function isRegExp (string $pattern) { |
|
| 327 | + public function isRegExp(string $pattern) { |
|
| 328 | 328 | $pattern = $this->db->quote($pattern); |
| 329 | 329 | return $this->db->factory(Predicate::class, "{$this} REGEXP {$pattern}"); |
| 330 | 330 | } |