@@ -14,7 +14,7 @@ |
||
14 | 14 | * |
15 | 15 | * @return Text |
16 | 16 | */ |
17 | - public function toText () { |
|
17 | + public function toText() { |
|
18 | 18 | if ($this->db->getDriver() === 'sqlite') { |
19 | 19 | return new Text($this->db, "CAST({$this} AS TEXT)"); |
20 | 20 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | use ComparisonTrait; |
13 | 13 | use AggregateTrait; |
14 | 14 | |
15 | - public function __construct (DB $db, string $expression) { |
|
15 | + public function __construct(DB $db, string $expression) { |
|
16 | 16 | $this->db = $db; |
17 | 17 | parent::__construct($expression); |
18 | 18 | } |
@@ -10,5 +10,5 @@ |
||
10 | 10 | /** |
11 | 11 | * @return string |
12 | 12 | */ |
13 | - public function __toString (); |
|
13 | + public function __toString(); |
|
14 | 14 | } |
15 | 15 | \ No newline at end of file |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * @param string|ValueInterface $subject |
53 | 53 | * @param array $values `[when => then]` for the subject. |
54 | 54 | */ |
55 | - public function __construct (DB $db, $subject = null, array $values = []) { |
|
55 | + public function __construct(DB $db, $subject = null, array $values = []) { |
|
56 | 56 | parent::__construct($db, ''); |
57 | 57 | $this->subject = (string)$this->db->quote($subject); |
58 | 58 | $this->setValues($values); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | /** |
62 | 62 | * @return string |
63 | 63 | */ |
64 | - public function __toString () { |
|
64 | + public function __toString() { |
|
65 | 65 | $sql = 'CASE'; |
66 | 66 | if (strlen($this->subject)) { |
67 | 67 | $sql .= " {$this->subject}"; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * @param string|ValueInterface |
81 | 81 | * @return $this |
82 | 82 | */ |
83 | - public function setElse ($else) { |
|
83 | + public function setElse($else) { |
|
84 | 84 | $this->else = (string)$this->db->quote($else); |
85 | 85 | return $this; |
86 | 86 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * @param string|ValueInterface $then |
93 | 93 | * @return $this |
94 | 94 | */ |
95 | - public function setValue ($when, $then) { |
|
95 | + public function setValue($when, $then) { |
|
96 | 96 | $when = (string)$this->db->quote($when); |
97 | 97 | $then = (string)$this->db->quote($then); |
98 | 98 | $this->values[$when] = $then; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | * @param array $values `[when => then]` |
106 | 106 | * @return $this |
107 | 107 | */ |
108 | - public function setValues (array $values) { |
|
108 | + public function setValues(array $values) { |
|
109 | 109 | foreach ($values as $when => $then) { |
110 | 110 | $this->setValue($when, $then); |
111 | 111 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * |
20 | 20 | * @return Numeric |
21 | 21 | */ |
22 | - public function abs () { |
|
22 | + public function abs() { |
|
23 | 23 | return new Numeric($this->db, "ABS({$this})"); |
24 | 24 | } |
25 | 25 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @param number|ValueInterface $arg |
30 | 30 | * @return Numeric |
31 | 31 | */ |
32 | - public function add ($arg) { |
|
32 | + public function add($arg) { |
|
33 | 33 | return new Numeric($this->db, "({$this} + {$arg})"); |
34 | 34 | } |
35 | 35 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * |
39 | 39 | * @return Numeric |
40 | 40 | */ |
41 | - public function ceil () { |
|
41 | + public function ceil() { |
|
42 | 42 | return new Numeric($this->db, "CEIL({$this})"); |
43 | 43 | } |
44 | 44 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * @param number|ValueInterface $arg |
49 | 49 | * @return Numeric |
50 | 50 | */ |
51 | - public function divide ($arg) { |
|
51 | + public function divide($arg) { |
|
52 | 52 | return new Numeric($this->db, "({$this} / {$arg})"); |
53 | 53 | } |
54 | 54 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * |
58 | 58 | * @return Numeric |
59 | 59 | */ |
60 | - public function floor () { |
|
60 | + public function floor() { |
|
61 | 61 | return new Numeric($this->db, "FLOOR({$this})"); |
62 | 62 | } |
63 | 63 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * |
67 | 67 | * @return Predicate |
68 | 68 | */ |
69 | - public function isEven () { |
|
69 | + public function isEven() { |
|
70 | 70 | return new Predicate("({$this} % 2) = 0"); |
71 | 71 | } |
72 | 72 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * |
76 | 76 | * @return Predicate |
77 | 77 | */ |
78 | - public function isNegative () { |
|
78 | + public function isNegative() { |
|
79 | 79 | return new Predicate("{$this} < 0"); |
80 | 80 | } |
81 | 81 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * |
85 | 85 | * @return Predicate |
86 | 86 | */ |
87 | - public function isOdd () { |
|
87 | + public function isOdd() { |
|
88 | 88 | return new Predicate("({$this} % 2) <> 0"); |
89 | 89 | } |
90 | 90 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * |
94 | 94 | * @return Predicate |
95 | 95 | */ |
96 | - public function isPositive () { |
|
96 | + public function isPositive() { |
|
97 | 97 | return new Predicate("{$this} > 0"); |
98 | 98 | } |
99 | 99 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * @param number|ValueInterface $arg |
104 | 104 | * @return Numeric |
105 | 105 | */ |
106 | - public function modulo ($arg) { |
|
106 | + public function modulo($arg) { |
|
107 | 107 | return new Numeric($this->db, "({$this} % {$arg})"); |
108 | 108 | } |
109 | 109 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | * @param number|ValueInterface $arg |
114 | 114 | * @return Numeric |
115 | 115 | */ |
116 | - public function multiply ($arg) { |
|
116 | + public function multiply($arg) { |
|
117 | 117 | return new Numeric($this->db, "({$this} * {$arg})"); |
118 | 118 | } |
119 | 119 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | * @param number|ValueInterface $exponent |
124 | 124 | * @return Numeric |
125 | 125 | */ |
126 | - public function pow ($exponent) { |
|
126 | + public function pow($exponent) { |
|
127 | 127 | return new Numeric($this->db, "POW({$this},{$exponent})"); |
128 | 128 | } |
129 | 129 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | * @param int $decimals |
134 | 134 | * @return Numeric |
135 | 135 | */ |
136 | - public function round (int $decimals = 0) { |
|
136 | + public function round(int $decimals = 0) { |
|
137 | 137 | return new Numeric($this->db, "ROUND({$this},{$decimals})"); |
138 | 138 | } |
139 | 139 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * @param number|ValueInterface $arg |
144 | 144 | * @return Numeric |
145 | 145 | */ |
146 | - public function subtract ($arg) { |
|
146 | + public function subtract($arg) { |
|
147 | 147 | return new Numeric($this->db, "({$this} - {$arg})"); |
148 | 148 | } |
149 | 149 | } |
150 | 150 | \ No newline at end of file |