Passed
Branch master (a9567f)
by y
01:25
created
src/DB/AttributesTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     /**
23 23
      * @return array
24 24
      */
25
-    public function getAttributes (): array {
25
+    public function getAttributes(): array {
26 26
         return $this->attributes ?: [];
27 27
     }
28 28
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      * @param mixed $offset
31 31
      * @return bool
32 32
      */
33
-    public function offsetExists ($offset): bool {
33
+    public function offsetExists($offset): bool {
34 34
         return $this->attributes and array_key_exists($offset, $this->attributes);
35 35
     }
36 36
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * @param mixed $offset
39 39
      * @return mixed Returns `NULL` for nonexistent attributes.
40 40
      */
41
-    public function offsetGet ($offset) {
41
+    public function offsetGet($offset) {
42 42
         return $this->attributes[$offset] ?? null;
43 43
     }
44 44
 
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
      * @param mixed $offset
47 47
      * @param mixed $value
48 48
      */
49
-    public function offsetSet ($offset, $value): void {
49
+    public function offsetSet($offset, $value): void {
50 50
         $this->attributes[$offset] = $value;
51 51
     }
52 52
 
53 53
     /**
54 54
      * @param mixed $offset
55 55
      */
56
-    public function offsetUnset ($offset): void {
56
+    public function offsetUnset($offset): void {
57 57
         unset($this->attributes[$offset]);
58 58
     }
59 59
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @param array $attributes
62 62
      * @return $this
63 63
      */
64
-    public function setAttributes (array $attributes) {
64
+    public function setAttributes(array $attributes) {
65 65
         $this->attributes = $attributes;
66 66
         return $this;
67 67
     }
Please login to merge, or discard this patch.
src/DB/EntityInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,5 +10,5 @@
 block discarded – undo
10 10
     /**
11 11
      * @return int
12 12
      */
13
-    public function getId ();
13
+    public function getId();
14 14
 }
15 15
\ No newline at end of file
Please login to merge, or discard this patch.
src/DB/AbstractAccess.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     /**
26 26
      * @param DB $db
27 27
      */
28
-    public function __construct (DB $db) {
28
+    public function __construct(DB $db) {
29 29
         $this->db = $db;
30 30
     }
31 31
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @param Closure $prepare `():Statement`
37 37
      * @return Statement
38 38
      */
39
-    protected function cache (string $key, Closure $prepare): Statement {
39
+    protected function cache(string $key, Closure $prepare): Statement {
40 40
         return $this->_cache[$key] ?? $this->_cache[$key] = $prepare->__invoke();
41 41
     }
42 42
 
Please login to merge, or discard this patch.
src/DB/AbstractTable.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,19 +15,19 @@  discard block
 block discarded – undo
15 15
      *
16 16
      * @return string
17 17
      */
18
-    abstract public function __toString (): string;
18
+    abstract public function __toString(): string;
19 19
 
20 20
     /**
21 21
      * @param string $name
22 22
      * @return bool
23 23
      */
24
-    abstract public function offsetExists ($name): bool;
24
+    abstract public function offsetExists($name): bool;
25 25
 
26 26
     /**
27 27
      * @param string $name
28 28
      * @return Column
29 29
      */
30
-    abstract public function offsetGet ($name): Column;
30
+    abstract public function offsetGet($name): Column;
31 31
 
32 32
     /**
33 33
      * Throws.
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @param void $value
37 37
      * @throws Exception
38 38
      */
39
-    final public function offsetSet ($name, $value): void {
39
+    final public function offsetSet($name, $value): void {
40 40
         throw new Exception('Tables are immutable.');
41 41
     }
42 42
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @param void $name
47 47
      * @throws Exception
48 48
      */
49
-    final public function offsetUnset ($name): void {
49
+    final public function offsetUnset($name): void {
50 50
         $this->offsetSet($name, null);
51 51
     }
52 52
 
Please login to merge, or discard this patch.
src/DB/ExpressionInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,6 +7,6 @@
 block discarded – undo
7 7
  */
8 8
 interface ExpressionInterface {
9 9
 
10
-    public function __toString ();
10
+    public function __toString();
11 11
 
12 12
 }
13 13
\ No newline at end of file
Please login to merge, or discard this patch.
src/DB/Expression.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      * @param array $arguments
29 29
      * @return ExpressionInterface
30 30
      */
31
-    public static function __callStatic (string $name, array $arguments): ExpressionInterface {
31
+    public static function __callStatic(string $name, array $arguments): ExpressionInterface {
32 32
         $arguments = implode(' ', $arguments);
33 33
         $name = strtoupper(preg_replace('/(?<!^)[A-Z]/', '_$0', $name));
34 34
         return new static("{$name}({$arguments})");
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
     /**
38 38
      * @param string $string
39 39
      */
40
-    public function __construct (string $string) {
40
+    public function __construct(string $string) {
41 41
         $this->string = $string;
42 42
     }
43 43
 
44 44
     /**
45 45
      * @return string
46 46
      */
47
-    public function __toString () {
47
+    public function __toString() {
48 48
         return $this->string;
49 49
     }
50 50
 }
51 51
\ No newline at end of file
Please login to merge, or discard this patch.
src/DB/SQL.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      * @param string[] $conditions
18 18
      * @return string
19 19
      */
20
-    public static function all (array $conditions): string {
20
+    public static function all(array $conditions): string {
21 21
         if (count($conditions) === 1) {
22 22
             return reset($conditions);
23 23
         }
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      * @param string[] $conditions
31 31
      * @return string
32 32
      */
33
-    public static function any (array $conditions): string {
33
+    public static function any(array $conditions): string {
34 34
         if (count($conditions) === 1) {
35 35
             return reset($conditions);
36 36
         }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * @param string $listOperator
70 70
      * @return string|array
71 71
      */
72
-    public static function compare ($a, $operator, $b = null, $subOperator = null, $listOperator = null) {
72
+    public static function compare($a, $operator, $b = null, $subOperator = null, $listOperator = null) {
73 73
         if (is_array($a)) {
74 74
             $cmp = [];
75 75
             foreach ($a as $k => $v) {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      * @param array $columns
94 94
      * @return string
95 95
      */
96
-    public static function group (array $columns): string {
96
+    public static function group(array $columns): string {
97 97
         if (!empty($columns)) {
98 98
             return ' GROUP BY ' . implode(',', $columns);
99 99
         }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      * @param array $conditions
108 108
      * @return string
109 109
      */
110
-    public static function having (array $conditions): string {
110
+    public static function having(array $conditions): string {
111 111
         if (!empty($conditions)) {
112 112
             return ' HAVING ' . static::all($conditions);
113 113
         }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      * @param string|array|Select $b
122 122
      * @return string|array
123 123
      */
124
-    public static function isEqual ($a, $b = null) {
124
+    public static function isEqual($a, $b = null) {
125 125
         return static::compare($a, '=', $b, 'ANY', 'IN');
126 126
     }
127 127
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      * @param string|Select $b
133 133
      * @return string|array
134 134
      */
135
-    public static function isGreater ($a, $b = null) {
135
+    public static function isGreater($a, $b = null) {
136 136
         return static::compare($a, '>', $b, 'ALL');
137 137
     }
138 138
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      * @param string|Select $b
144 144
      * @return string|array
145 145
      */
146
-    public static function isGreaterOrEqual ($a, $b = null) {
146
+    public static function isGreaterOrEqual($a, $b = null) {
147 147
         return static::compare($a, '>=', $b, 'ALL');
148 148
     }
149 149
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      * @param string|Select $b
155 155
      * @return string|array
156 156
      */
157
-    public static function isLess ($a, $b = null) {
157
+    public static function isLess($a, $b = null) {
158 158
         return static::compare($a, '<', $b, 'ALL');
159 159
     }
160 160
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      * @param string|Select $b
166 166
      * @return string|array
167 167
      */
168
-    public static function isLessOrEqual ($a, $b = null) {
168
+    public static function isLessOrEqual($a, $b = null) {
169 169
         return static::compare($a, '<=', $b, 'ALL');
170 170
     }
171 171
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
      * @param string $pattern
177 177
      * @return string|array
178 178
      */
179
-    public static function isLike ($x, string $pattern = null) {
179
+    public static function isLike($x, string $pattern = null) {
180 180
         return static::compare($x, 'LIKE', $pattern);
181 181
     }
182 182
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
      * @param null|bool $identity
188 188
      * @return string|array
189 189
      */
190
-    public static function isNot ($x, $identity) {
190
+    public static function isNot($x, $identity) {
191 191
         return static::compare($x, 'IS NOT', ['' => 'UNKNOWN', 1 => 'TRUE', 0 => 'FALSE'][$identity]);
192 192
     }
193 193
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
      * @param string|array|Select $b
199 199
      * @return string|array
200 200
      */
201
-    public static function isNotEqual ($a, $b = null) {
201
+    public static function isNotEqual($a, $b = null) {
202 202
         return static::compare($a, '<>', $b, 'ALL', 'NOT IN');
203 203
     }
204 204
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
      * @param string $pattern
210 210
      * @return string|array
211 211
      */
212
-    public static function isNotLike ($x, string $pattern = null) {
212
+    public static function isNotLike($x, string $pattern = null) {
213 213
         return static::compare($x, 'NOT LIKE', $pattern);
214 214
     }
215 215
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
      * @param string|array $x
220 220
      * @return string|array
221 221
      */
222
-    public static function isNotNull ($x) {
222
+    public static function isNotNull($x) {
223 223
         if (is_array($x)) {
224 224
             return array_map(__METHOD__, $x);
225 225
         }
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      * @param string $pattern
234 234
      * @return string|array
235 235
      */
236
-    public static function isNotRegExp ($x, string $pattern = null) {
236
+    public static function isNotRegExp($x, string $pattern = null) {
237 237
         return static::compare($x, 'NOT REGEXP', $pattern);
238 238
     }
239 239
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
      * @param string $pattern
245 245
      * @return string|array
246 246
      */
247
-    public static function isRegExp ($x, string $pattern = null) {
247
+    public static function isRegExp($x, string $pattern = null) {
248 248
         return static::compare($x, 'REGEXP', $pattern);
249 249
     }
250 250
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
      * @param int $offset
257 257
      * @return string
258 258
      */
259
-    public static function limit (int $limit, int $offset = 0): string {
259
+    public static function limit(int $limit, int $offset = 0): string {
260 260
         if ($limit) {
261 261
             $limit = " LIMIT {$limit}";
262 262
             if ($offset) {
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      * @param int|array|Countable $count
274 274
      * @return string[]
275 275
      */
276
-    public static function marks ($count): array {
276
+    public static function marks($count): array {
277 277
         if (is_array($count) or $count instanceof Countable) {
278 278
             $count = count($count);
279 279
         }
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
      * @param string|array $x
287 287
      * @return string|array
288 288
      */
289
-    public static function not ($x) {
289
+    public static function not($x) {
290 290
         if (is_array($x)) {
291 291
             return array_map(__METHOD__, $x);
292 292
         }
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
      * @param string $order
301 301
      * @return string
302 302
      */
303
-    public static function order (string $order): string {
303
+    public static function order(string $order): string {
304 304
         if (strlen($order)) {
305 305
             return ' ORDER BY ' . $order;
306 306
         }
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
      * @param array $columns String keys are used for aliasing.
315 315
      * @return string
316 316
      */
317
-    public static function select (string $table, array $columns): string {
317
+    public static function select(string $table, array $columns): string {
318 318
         $names = [];
319 319
         foreach ($columns as $alias => $name) {
320 320
             if (is_string($alias) and $alias !== $name) {
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
      * @param string[] $columns
336 336
      * @return string[] `[column => :column]`
337 337
      */
338
-    public static function slots (array $columns): array {
338
+    public static function slots(array $columns): array {
339 339
         $slots = [];
340 340
         foreach ($columns as $column) {
341 341
             $slots[(string)$column] = ':' . str_replace('.', '__', $column);
@@ -350,12 +350,12 @@  discard block
 block discarded – undo
350 350
      * @param array $conditions
351 351
      * @return string
352 352
      */
353
-    public static function where (array $conditions): string {
353
+    public static function where(array $conditions): string {
354 354
         if (!empty($conditions)) {
355 355
             return ' WHERE ' . static::all($conditions);
356 356
         }
357 357
         return '';
358 358
     }
359 359
 
360
-    final private function __construct () { }
360
+    final private function __construct() { }
361 361
 }
362 362
\ No newline at end of file
Please login to merge, or discard this patch.
src/DB.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @param string $passwd
46 46
      * @param array $options
47 47
      */
48
-    public function __construct ($dsn, $username = null, $passwd = null, $options = null) {
48
+    public function __construct($dsn, $username = null, $passwd = null, $options = null) {
49 49
         /** @scrutinizer ignore-call */
50 50
         parent::__construct(...func_get_args());
51 51
         $this->setAttribute(self::ATTR_DEFAULT_FETCH_MODE, self::FETCH_ASSOC);
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      * @param string $sql
63 63
      * @return int
64 64
      */
65
-    public function exec ($sql): int {
65
+    public function exec($sql): int {
66 66
         $this->logger->__invoke($sql);
67 67
         return parent::exec($sql);
68 68
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      *
73 73
      * @return string
74 74
      */
75
-    final public function getDriver (): string {
75
+    final public function getDriver(): string {
76 76
         return $this->getAttribute(self::ATTR_DRIVER_NAME);
77 77
     }
78 78
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      * @param string $interface
83 83
      * @return Junction
84 84
      */
85
-    public function getJunction ($interface): Junction {
85
+    public function getJunction($interface): Junction {
86 86
         if (!isset($this->junctions[$interface])) {
87 87
             $this->junctions[$interface] = new Junction($this, $interface);
88 88
         }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     /**
93 93
      * @return Closure
94 94
      */
95
-    public function getLogger (): Closure {
95
+    public function getLogger(): Closure {
96 96
         return $this->logger;
97 97
     }
98 98
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      * @param string|EntityInterface $class
103 103
      * @return Record
104 104
      */
105
-    public function getRecord ($class): Record {
105
+    public function getRecord($class): Record {
106 106
         if (is_object($class)) {
107 107
             $class = get_class($class);
108 108
         }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      * @param mixed $b
128 128
      * @return string
129 129
      */
130
-    public function match ($a, $b = null) {
130
+    public function match($a, $b = null) {
131 131
         if (is_int($a) and is_string($b)) {
132 132
             return $b;
133 133
         }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      * @param array $match
151 151
      * @return string[]
152 152
      */
153
-    public function matchArray (array $match) {
153
+    public function matchArray(array $match) {
154 154
         return array_map([$this, 'match'], array_keys($match), $match);
155 155
     }
156 156
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      * @param mixed $match
163 163
      * @return string|string[]
164 164
      */
165
-    public function matchMixed ($match) {
165
+    public function matchMixed($match) {
166 166
         if (is_array($match)) {
167 167
             return $this->matchArray($match);
168 168
         }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      * @param string $access Class or interface name.
174 174
      * @return bool
175 175
      */
176
-    public function offsetExists ($access): bool {
176
+    public function offsetExists($access): bool {
177 177
         return (bool)$this->offsetGet($access);
178 178
     }
179 179
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
      * @param string $access Class or interface name.
182 182
      * @return Record|Junction|null
183 183
      */
184
-    public function offsetGet ($access) {
184
+    public function offsetGet($access) {
185 185
         if (class_exists($access)) {
186 186
             return $this->getRecord($access);
187 187
         }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
      * @param void $value
199 199
      * @throws Exception
200 200
      */
201
-    final public function offsetSet ($access, $value): void {
201
+    final public function offsetSet($access, $value): void {
202 202
         throw new Exception('The schema is immutable.');
203 203
     }
204 204
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      * @param void $access
209 209
      * @throws Exception
210 210
      */
211
-    final public function offsetUnset ($access): void {
211
+    final public function offsetUnset($access): void {
212 212
         $this->offsetSet($access, null);
213 213
     }
214 214
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
      * @param array $options
220 220
      * @return Statement
221 221
      */
222
-    public function prepare ($sql, $options = null): Statement {
222
+    public function prepare($sql, $options = null): Statement {
223 223
         $this->logger->__invoke($sql);
224 224
         /** @var Statement $statement */
225 225
         /** @scrutinizer ignore-call */
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
      * @param array $ctorargs
237 237
      * @return Statement
238 238
      */
239
-    public function query ($sql, $mode = PDO::ATTR_DEFAULT_FETCH_MODE, $arg3 = null, array $ctorargs = []): Statement {
239
+    public function query($sql, $mode = PDO::ATTR_DEFAULT_FETCH_MODE, $arg3 = null, array $ctorargs = []): Statement {
240 240
         $this->logger->__invoke($sql);
241 241
         /** @var Statement $statement */
242 242
         /** @scrutinizer ignore-call */
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
      * @param int $type Ignored.
257 257
      * @return string
258 258
      */
259
-    public function quote ($value, $type = null) {
259
+    public function quote($value, $type = null) {
260 260
         if ($value instanceof ExpressionInterface) {
261 261
             return $value;
262 262
         }
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
      * @param array $values
277 277
      * @return array
278 278
      */
279
-    public function quoteArray (array $values): array {
279
+    public function quoteArray(array $values): array {
280 280
         return array_map([$this, 'quote'], $values);
281 281
     }
282 282
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
      * @param mixed $value
287 287
      * @return array|string
288 288
      */
289
-    public function quoteMixed ($value) {
289
+    public function quoteMixed($value) {
290 290
         if (is_array($value)) {
291 291
             return $this->quoteArray($value);
292 292
         }
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      * @param EntityInterface $entity
300 300
      * @return int ID
301 301
      */
302
-    public function save (EntityInterface $entity): int {
302
+    public function save(EntityInterface $entity): int {
303 303
         return $this->getRecord($entity)->save($entity);
304 304
     }
305 305
 
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
      * @param Closure $logger
308 308
      * @return $this
309 309
      */
310
-    public function setLogger (Closure $logger) {
310
+    public function setLogger(Closure $logger) {
311 311
         $this->logger = $logger;
312 312
         return $this;
313 313
     }
Please login to merge, or discard this patch.
src/DB/Select.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      * @param string|Select $table
80 80
      * @param string[] $columns
81 81
      */
82
-    public function __construct (DB $db, $table, array $columns) {
82
+    public function __construct(DB $db, $table, array $columns) {
83 83
         parent::__construct($db);
84 84
         if ($table instanceof Select) {
85 85
             $table = $table->toSubquery();
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     /**
96 96
      * Gives the clone a new alias.
97 97
      */
98
-    public function __clone () {
98
+    public function __clone() {
99 99
         $this->alias = uniqid('_') . "__{$this->table}";
100 100
     }
101 101
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      * @param array $args
104 104
      * @return Statement
105 105
      */
106
-    public function __invoke (array $args = []): Statement {
106
+    public function __invoke(array $args = []): Statement {
107 107
         return $this->execute($args);
108 108
     }
109 109
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      *
113 113
      * @return string
114 114
      */
115
-    public function __toString (): string {
115
+    public function __toString(): string {
116 116
         return $this->alias;
117 117
     }
118 118
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      * @param array $args Execution arguments.
123 123
      * @return int
124 124
      */
125
-    public function count (array $args = []): int {
125
+    public function count(array $args = []): int {
126 126
         $clone = clone $this;
127 127
         $clone->columns = ['COUNT(*)'];
128 128
         return (int)$clone->execute($args)->fetchColumn();
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      * @param array $args
135 135
      * @return Statement
136 136
      */
137
-    public function execute (array $args = []): Statement {
137
+    public function execute(array $args = []): Statement {
138 138
         if (!empty($args)) {
139 139
             return $this->prepare()($args);
140 140
         }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      * @param array $args Execution arguments.
150 150
      * @return array
151 151
      */
152
-    public function fetchAll (array $args = []): array {
152
+    public function fetchAll(array $args = []): array {
153 153
         return $this->fetcher->__invoke($this->execute($args));
154 154
     }
155 155
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      *
161 161
      * @return ArrayIterator
162 162
      */
163
-    public function getIterator () {
163
+    public function getIterator() {
164 164
         return new ArrayIterator($this->fetchAll());
165 165
     }
166 166
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      * @param string $column
171 171
      * @return $this
172 172
      */
173
-    public function group (string $column) {
173
+    public function group(string $column) {
174 174
         $this->_group[] = $column;
175 175
         return $this;
176 176
     }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
      * @param string $condition
182 182
      * @return $this
183 183
      */
184
-    public function having (string $condition) {
184
+    public function having(string $condition) {
185 185
         $this->_having[] = $condition;
186 186
         return $this;
187 187
     }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      * @param string $type
195 195
      * @return $this
196 196
      */
197
-    public function join ($table, string $condition, string $type = 'INNER') {
197
+    public function join($table, string $condition, string $type = 'INNER') {
198 198
         if ($table instanceof Select) {
199 199
             $table = $table->toSubquery();
200 200
         }
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
      * @param int $offset
210 210
      * @return $this
211 211
      */
212
-    public function limit (int $limit, int $offset = 0) {
212
+    public function limit(int $limit, int $offset = 0) {
213 213
         $this->_limit = $limit;
214 214
         $this->_offset = $offset;
215 215
         return $this;
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      * @param string $name Name or alias if used.
222 222
      * @return bool
223 223
      */
224
-    public function offsetExists ($name): bool {
224
+    public function offsetExists($name): bool {
225 225
         return true;
226 226
     }
227 227
 
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
      * @param string $name Name, or alias if used.
232 232
      * @return Column
233 233
      */
234
-    public function offsetGet ($name): Column {
234
+    public function offsetGet($name): Column {
235 235
         return new Column($this->db, $name, $this->alias);
236 236
     }
237 237
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      * @param string $order
242 242
      * @return $this
243 243
      */
244
-    public function order (string $order) {
244
+    public function order(string $order) {
245 245
         $this->_order = $order;
246 246
         return $this;
247 247
     }
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     /**
250 250
      * @return Statement
251 251
      */
252
-    public function prepare (): Statement {
252
+    public function prepare(): Statement {
253 253
         return $this->db->prepare($this->toSql());
254 254
     }
255 255
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
      * @param Closure $fetcher
258 258
      * @return $this
259 259
      */
260
-    public function setFetcher (Closure $fetcher) {
260
+    public function setFetcher(Closure $fetcher) {
261 261
         $this->fetcher = $fetcher;
262 262
         return $this;
263 263
     }
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
     /**
266 266
      * @return string
267 267
      */
268
-    public function toSql (): string {
268
+    public function toSql(): string {
269 269
         $sql = SQL::select($this->table, $this->columns);
270 270
         foreach ($this->_join as $join) {
271 271
             $sql .= " {$join}";
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
      *
284 284
      * @return string
285 285
      */
286
-    public function toSubquery (): string {
286
+    public function toSubquery(): string {
287 287
         return "({$this->toSql()}) AS {$this->alias}";
288 288
     }
289 289
 
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
      * @param string $condition
294 294
      * @return $this
295 295
      */
296
-    public function where (string $condition) {
296
+    public function where(string $condition) {
297 297
         $this->_where[] = $condition;
298 298
         return $this;
299 299
     }
Please login to merge, or discard this patch.