@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | * |
| 15 | 15 | * @return Num |
| 16 | 16 | */ |
| 17 | - public function abs () { |
|
| 17 | + public function abs() { |
|
| 18 | 18 | return Num::factory($this->db, "ABS({$this})"); |
| 19 | 19 | } |
| 20 | 20 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * @param number|ValueInterface $arg |
| 25 | 25 | * @return Num |
| 26 | 26 | */ |
| 27 | - public function add ($arg) { |
|
| 27 | + public function add($arg) { |
|
| 28 | 28 | return Num::factory($this->db, "({$this} + {$arg})"); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * |
| 34 | 34 | * @return Num |
| 35 | 35 | */ |
| 36 | - public function ceil () { |
|
| 36 | + public function ceil() { |
|
| 37 | 37 | return Num::factory($this->db, "CEIL({$this})"); |
| 38 | 38 | } |
| 39 | 39 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @param number|ValueInterface $arg |
| 44 | 44 | * @return Num |
| 45 | 45 | */ |
| 46 | - public function divide ($arg) { |
|
| 46 | + public function divide($arg) { |
|
| 47 | 47 | return Num::factory($this->db, "({$this} / {$arg})"); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @return Num |
| 54 | 54 | */ |
| 55 | - public function floor () { |
|
| 55 | + public function floor() { |
|
| 56 | 56 | return Num::factory($this->db, "FLOOR({$this})"); |
| 57 | 57 | } |
| 58 | 58 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | * |
| 62 | 62 | * @return Predicate |
| 63 | 63 | */ |
| 64 | - public function isEven () { |
|
| 64 | + public function isEven() { |
|
| 65 | 65 | return Predicate::factory($this->db, "({$this} % 2) = 0"); |
| 66 | 66 | } |
| 67 | 67 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * @return Predicate |
| 72 | 72 | */ |
| 73 | - public function isNegative () { |
|
| 73 | + public function isNegative() { |
|
| 74 | 74 | return Predicate::factory($this->db, "{$this} < 0"); |
| 75 | 75 | } |
| 76 | 76 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | * |
| 80 | 80 | * @return Predicate |
| 81 | 81 | */ |
| 82 | - public function isOdd () { |
|
| 82 | + public function isOdd() { |
|
| 83 | 83 | return Predicate::factory($this->db, "({$this} % 2) <> 0"); |
| 84 | 84 | } |
| 85 | 85 | |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | * |
| 89 | 89 | * @return Predicate |
| 90 | 90 | */ |
| 91 | - public function isPositive () { |
|
| 91 | + public function isPositive() { |
|
| 92 | 92 | return Predicate::factory($this->db, "{$this} > 0"); |
| 93 | 93 | } |
| 94 | 94 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | * @param number|ValueInterface $arg |
| 99 | 99 | * @return Num |
| 100 | 100 | */ |
| 101 | - public function mod ($arg) { |
|
| 101 | + public function mod($arg) { |
|
| 102 | 102 | return Num::factory($this->db, "({$this} % {$arg})"); |
| 103 | 103 | } |
| 104 | 104 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | * @param number|ValueInterface $arg |
| 109 | 109 | * @return Num |
| 110 | 110 | */ |
| 111 | - public function multiply ($arg) { |
|
| 111 | + public function multiply($arg) { |
|
| 112 | 112 | return Num::factory($this->db, "({$this} * {$arg})"); |
| 113 | 113 | } |
| 114 | 114 | |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | * @param number|ValueInterface $exponent |
| 119 | 119 | * @return Num |
| 120 | 120 | */ |
| 121 | - public function pow ($exponent) { |
|
| 121 | + public function pow($exponent) { |
|
| 122 | 122 | return Num::factory($this->db, "POW({$this},{$exponent})"); |
| 123 | 123 | } |
| 124 | 124 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | * @param int $decimals |
| 129 | 129 | * @return Num |
| 130 | 130 | */ |
| 131 | - public function round (int $decimals = 0) { |
|
| 131 | + public function round(int $decimals = 0) { |
|
| 132 | 132 | return Num::factory($this->db, "ROUND({$this},{$decimals})"); |
| 133 | 133 | } |
| 134 | 134 | |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | * @param number|ValueInterface $arg |
| 139 | 139 | * @return Num |
| 140 | 140 | */ |
| 141 | - public function subtract (ValueInterface $arg) { |
|
| 141 | + public function subtract(ValueInterface $arg) { |
|
| 142 | 142 | return Num::factory($this->db, "({$this} - {$arg})"); |
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | 145 | \ No newline at end of file |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * @param null|scalar|Select $arg |
| 26 | 26 | * @return Predicate |
| 27 | 27 | */ |
| 28 | - public function is ($arg): Predicate { |
|
| 28 | + public function is($arg): Predicate { |
|
| 29 | 29 | if ($arg instanceof Select) { |
| 30 | 30 | if ($this->db->isSQLite()) { |
| 31 | 31 | return Select::factory($this->db, $arg, [$arg[0]]) |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * @param number $max |
| 54 | 54 | * @return Predicate |
| 55 | 55 | */ |
| 56 | - public function isBetween ($min, $max) { |
|
| 56 | + public function isBetween($min, $max) { |
|
| 57 | 57 | $min = $this->db->quote($min); |
| 58 | 58 | $max = $this->db->quote($max); |
| 59 | 59 | return Predicate::factory($this->db, "{$this} BETWEEN {$min} AND {$max}"); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * @param scalar|array|Select $arg |
| 66 | 66 | * @return Predicate |
| 67 | 67 | */ |
| 68 | - public function isEqual ($arg) { |
|
| 68 | + public function isEqual($arg) { |
|
| 69 | 69 | return $this->db->match($this, $arg); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * |
| 75 | 75 | * @return Predicate |
| 76 | 76 | */ |
| 77 | - public function isFalse () { |
|
| 77 | + public function isFalse() { |
|
| 78 | 78 | return Predicate::factory($this->db, "{$this} IS FALSE"); |
| 79 | 79 | } |
| 80 | 80 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * @param string $multi `ALL|ANY` |
| 91 | 91 | * @return Predicate |
| 92 | 92 | */ |
| 93 | - public function isGreater ($arg, string $multi = 'ALL') { |
|
| 93 | + public function isGreater($arg, string $multi = 'ALL') { |
|
| 94 | 94 | if ($arg instanceof Select) { |
| 95 | 95 | if ($this->db->isSQLite()) { |
| 96 | 96 | $sub = Select::factory($this->db, $arg, [$arg[0]]); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * @param string $multi `ALL|ANY` |
| 117 | 117 | * @return Predicate |
| 118 | 118 | */ |
| 119 | - public function isGreaterOrEqual ($arg, string $multi = 'ALL') { |
|
| 119 | + public function isGreaterOrEqual($arg, string $multi = 'ALL') { |
|
| 120 | 120 | if ($arg instanceof Select) { |
| 121 | 121 | if ($this->db->isSQLite()) { |
| 122 | 122 | $sub = Select::factory($this->db, $arg, [$arg[0]]); |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | * @param string $multi `ALL|ANY` |
| 143 | 143 | * @return Predicate |
| 144 | 144 | */ |
| 145 | - public function isLess ($arg, string $multi = 'ALL') { |
|
| 145 | + public function isLess($arg, string $multi = 'ALL') { |
|
| 146 | 146 | if ($arg instanceof Select) { |
| 147 | 147 | if ($this->db->isSQLite()) { |
| 148 | 148 | $sub = Select::factory($this->db, $arg, [$arg[0]]); |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | * @param string $multi `ALL|ANY` |
| 169 | 169 | * @return Predicate |
| 170 | 170 | */ |
| 171 | - public function isLessOrEqual ($arg, string $multi = 'ALL') { |
|
| 171 | + public function isLessOrEqual($arg, string $multi = 'ALL') { |
|
| 172 | 172 | if ($arg instanceof Select) { |
| 173 | 173 | if ($this->db->isSQLite()) { |
| 174 | 174 | $sub = Select::factory($this->db, $arg, [$arg[0]]); |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | * @param string $pattern |
| 189 | 189 | * @return Predicate |
| 190 | 190 | */ |
| 191 | - public function isLike (string $pattern) { |
|
| 191 | + public function isLike(string $pattern) { |
|
| 192 | 192 | $pattern = $this->db->quote($pattern); |
| 193 | 193 | return Predicate::factory($this->db, "{$this} LIKE {$pattern}"); |
| 194 | 194 | } |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | * @param null|scalar|Select $arg |
| 200 | 200 | * @return Predicate |
| 201 | 201 | */ |
| 202 | - public function isNot ($arg) { |
|
| 202 | + public function isNot($arg) { |
|
| 203 | 203 | return $this->is($arg)->not(); |
| 204 | 204 | } |
| 205 | 205 | |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | * @param number $max |
| 211 | 211 | * @return Predicate |
| 212 | 212 | */ |
| 213 | - public function isNotBetween ($min, $max) { |
|
| 213 | + public function isNotBetween($min, $max) { |
|
| 214 | 214 | $min = $this->db->quote($min); |
| 215 | 215 | $max = $this->db->quote($max); |
| 216 | 216 | return Predicate::factory($this->db, "{$this} NOT BETWEEN {$min} AND {$max}"); |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | * @param scalar|array|Select $arg |
| 223 | 223 | * @return Predicate |
| 224 | 224 | */ |
| 225 | - public function isNotEqual ($arg) { |
|
| 225 | + public function isNotEqual($arg) { |
|
| 226 | 226 | if ($arg instanceof Select) { |
| 227 | 227 | return Predicate::factory($this->db, "{$this} NOT IN ({$arg->toSql()})"); |
| 228 | 228 | } |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | * @param string $pattern |
| 239 | 239 | * @return Predicate |
| 240 | 240 | */ |
| 241 | - public function isNotLike (string $pattern) { |
|
| 241 | + public function isNotLike(string $pattern) { |
|
| 242 | 242 | $pattern = $this->db->quote($pattern); |
| 243 | 243 | return Predicate::factory($this->db, "{$this} NOT LIKE {$pattern}"); |
| 244 | 244 | } |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | * |
| 249 | 249 | * @return Predicate |
| 250 | 250 | */ |
| 251 | - public function isNotNull () { |
|
| 251 | + public function isNotNull() { |
|
| 252 | 252 | return Predicate::factory($this->db, "{$this} IS NOT NULL"); |
| 253 | 253 | } |
| 254 | 254 | |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | * @param string $pattern |
| 259 | 259 | * @return Predicate |
| 260 | 260 | */ |
| 261 | - public function isNotRegExp (string $pattern) { |
|
| 261 | + public function isNotRegExp(string $pattern) { |
|
| 262 | 262 | $pattern = $this->db->quote($pattern); |
| 263 | 263 | return Predicate::factory($this->db, "{$this} NOT REGEXP {$pattern}"); |
| 264 | 264 | } |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | * |
| 269 | 269 | * @return Predicate |
| 270 | 270 | */ |
| 271 | - public function isNull () { |
|
| 271 | + public function isNull() { |
|
| 272 | 272 | return Predicate::factory($this->db, "{$this} IS NULL"); |
| 273 | 273 | } |
| 274 | 274 | |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | * @param string $pattern |
| 279 | 279 | * @return Predicate |
| 280 | 280 | */ |
| 281 | - public function isRegExp (string $pattern) { |
|
| 281 | + public function isRegExp(string $pattern) { |
|
| 282 | 282 | $pattern = $this->db->quote($pattern); |
| 283 | 283 | return Predicate::factory($this->db, "{$this} REGEXP {$pattern}"); |
| 284 | 284 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @return Text |
| 18 | 18 | */ |
| 19 | - public function hex () { |
|
| 19 | + public function hex() { |
|
| 20 | 20 | return Text::factory($this->db, "HEX({$this})"); |
| 21 | 21 | } |
| 22 | 22 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * |
| 28 | 28 | * @return Num |
| 29 | 29 | */ |
| 30 | - public function length () { |
|
| 30 | + public function length() { |
|
| 31 | 31 | if ($this->db->isSQLite()) { |
| 32 | 32 | return Num::factory($this->db, "LENGTH(CAST({$this} AS TEXT))"); |
| 33 | 33 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * |
| 42 | 42 | * @return Text |
| 43 | 43 | */ |
| 44 | - public function lower () { |
|
| 44 | + public function lower() { |
|
| 45 | 45 | return Text::factory($this->db, "LOWER({$this})"); |
| 46 | 46 | } |
| 47 | 47 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * @param string $substring |
| 54 | 54 | * @return Num |
| 55 | 55 | */ |
| 56 | - public function position (string $substring) { |
|
| 56 | + public function position(string $substring) { |
|
| 57 | 57 | $substring = $this->db->quote($substring); |
| 58 | 58 | if ($this->db->isSQLite()) { |
| 59 | 59 | return Num::factory($this->db, "INSTR({$this},{$substring})"); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * @param string $replace |
| 71 | 71 | * @return Text |
| 72 | 72 | */ |
| 73 | - public function replace (string $search, string $replace) { |
|
| 73 | + public function replace(string $search, string $replace) { |
|
| 74 | 74 | $search = $this->db->quote($search); |
| 75 | 75 | $replace = $this->db->quote($replace); |
| 76 | 76 | return Text::factory($this->db, "REPLACE({$this},{$search},{$replace})"); |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | * |
| 82 | 82 | * @return Num |
| 83 | 83 | */ |
| 84 | - public function size () { |
|
| 84 | + public function size() { |
|
| 85 | 85 | if ($this->db->isSQLite()) { |
| 86 | 86 | return Num::factory($this->db, "LENGTH(CAST({$this} AS BLOB))"); |
| 87 | 87 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | * @param null|int $length |
| 98 | 98 | * @return Text |
| 99 | 99 | */ |
| 100 | - public function substr (int $start, int $length = null) { |
|
| 100 | + public function substr(int $start, int $length = null) { |
|
| 101 | 101 | if (isset($length)) { |
| 102 | 102 | return Text::factory($this->db, "SUBSTR({$this},{$start},{$length})"); |
| 103 | 103 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | * |
| 112 | 112 | * @return Text |
| 113 | 113 | */ |
| 114 | - public function upper () { |
|
| 114 | + public function upper() { |
|
| 115 | 115 | return Text::factory($this->db, "UPPER({$this})"); |
| 116 | 116 | } |
| 117 | 117 | } |
| 118 | 118 | \ No newline at end of file |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | * @param scalar[] $values |
| 13 | 13 | * @return Value |
| 14 | 14 | */ |
| 15 | - public function coalesce (array $values) { |
|
| 15 | + public function coalesce(array $values) { |
|
| 16 | 16 | array_unshift($values, $this); |
| 17 | 17 | $values = $this->db->quoteList($values); |
| 18 | 18 | return Value::factory($this->db, "COALESCE({$values})"); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @return Num |
| 25 | 25 | */ |
| 26 | - public function toFloat () { |
|
| 26 | + public function toFloat() { |
|
| 27 | 27 | if ($this->db->isSQLite()) { |
| 28 | 28 | return Num::factory($this->db, "CAST({$this} AS REAL)"); |
| 29 | 29 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * |
| 36 | 36 | * @return Num |
| 37 | 37 | */ |
| 38 | - public function toInt () { |
|
| 38 | + public function toInt() { |
|
| 39 | 39 | if ($this->db->isSQLite()) { |
| 40 | 40 | return Num::factory($this->db, "CAST({$this} AS INTEGER)"); |
| 41 | 41 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * |
| 48 | 48 | * @return Text |
| 49 | 49 | */ |
| 50 | - public function toText () { |
|
| 50 | + public function toText() { |
|
| 51 | 51 | if ($this->db->isSQLite()) { |
| 52 | 52 | return Text::factory($this->db, "CAST({$this} AS TEXT)"); |
| 53 | 53 | } |