Skip to content

Commit 8144dcb

Browse files
committed
Upgrade Coding Standard
1 parent 517d875 commit 8144dcb

9 files changed

Lines changed: 74 additions & 147 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
},
4141
"require-dev": {
4242
"ext-xdebug": "*",
43-
"aplus/coding-standard": "^1.13",
43+
"aplus/coding-standard": "^1.14",
4444
"ergebnis/composer-normalize": "^2.25",
4545
"jetbrains/phpstorm-attributes": "^1.0",
4646
"phpmd/phpmd": "^2.13",

src/Database.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ protected function connect(
160160
string $schema = null,
161161
string $host = 'localhost',
162162
int $port = 3306
163-
) : static
164-
{
163+
) : static {
165164
if ( ! \is_array($username)) {
166165
$username = [
167166
'host' => $host,

src/Manipulation/Delete.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ protected function renderOptions() : ?string
7474
public function table(
7575
array | Closure | string $reference,
7676
array | Closure | string ...$references
77-
) : static
78-
{
77+
) : static {
7978
$this->sql['table'] = [];
8079
foreach ([$reference, ...$references] as $reference) {
8180
$this->sql['table'][] = $reference;

src/Manipulation/Select.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,7 @@ protected function renderOptions() : ?string
236236
public function expressions(
237237
array | Closure | string $expression,
238238
array | Closure | string ...$expressions
239-
) : static
240-
{
239+
) : static {
241240
foreach ([$expression, ...$expressions] as $expression) {
242241
$this->sql['expressions'][] = $expression;
243242
}
@@ -255,8 +254,7 @@ public function expressions(
255254
public function columns(
256255
array | Closure | string $expression,
257256
array | Closure | string ...$expressions
258-
) : static
259-
{
257+
) : static {
260258
return $this->expressions($expression, ...$expressions);
261259
}
262260

@@ -337,8 +335,7 @@ public function intoOutfile(
337335
string $charset = null,
338336
array $fieldsOptions = [],
339337
array $linesOptions = []
340-
) : static
341-
{
338+
) : static {
342339
$this->sql['into_outfile'] = [
343340
'filename' => $filename,
344341
'charset' => $charset,

src/Manipulation/Traits/Having.php

Lines changed: 29 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ public function having(
3333
Closure | string $column,
3434
string $operator,
3535
Closure | float | int | string | null ...$values
36-
) : static
37-
{
36+
) : static {
3837
return $this->addHaving('AND', $column, $operator, $values);
3938
}
4039

@@ -51,8 +50,7 @@ public function orHaving(
5150
Closure | string $column,
5251
string $operator,
5352
Closure | float | int | string | null ...$values
54-
) : static
55-
{
53+
) : static {
5654
return $this->addHaving('OR', $column, $operator, $values);
5755
}
5856

@@ -69,8 +67,7 @@ public function orHaving(
6967
public function havingEqual(
7068
Closure | string $column,
7169
Closure | float | int | string | null $value
72-
) : static
73-
{
70+
) : static {
7471
return $this->having($column, '=', $value);
7572
}
7673

@@ -87,8 +84,7 @@ public function havingEqual(
8784
public function orHavingEqual(
8885
Closure | string $column,
8986
Closure | float | int | string | null $value
90-
) : static
91-
{
87+
) : static {
9288
return $this->orHaving($column, '=', $value);
9389
}
9490

@@ -105,8 +101,7 @@ public function orHavingEqual(
105101
public function havingNotEqual(
106102
Closure | string $column,
107103
Closure | float | int | string | null $value
108-
) : static
109-
{
104+
) : static {
110105
return $this->having($column, '!=', $value);
111106
}
112107

@@ -123,8 +118,7 @@ public function havingNotEqual(
123118
public function orHavingNotEqual(
124119
Closure | string $column,
125120
Closure | float | int | string | null $value
126-
) : static
127-
{
121+
) : static {
128122
return $this->orHaving($column, '!=', $value);
129123
}
130124

@@ -141,8 +135,7 @@ public function orHavingNotEqual(
141135
public function havingNullSafeEqual(
142136
Closure | string $column,
143137
Closure | float | int | string | null $value
144-
) : static
145-
{
138+
) : static {
146139
return $this->having($column, '<=>', $value);
147140
}
148141

@@ -159,8 +152,7 @@ public function havingNullSafeEqual(
159152
public function orHavingNullSafeEqual(
160153
Closure | string $column,
161154
Closure | float | int | string | null $value
162-
) : static
163-
{
155+
) : static {
164156
return $this->orHaving($column, '<=>', $value);
165157
}
166158

@@ -177,8 +169,7 @@ public function orHavingNullSafeEqual(
177169
public function havingLessThan(
178170
Closure | string $column,
179171
Closure | float | int | string | null $value
180-
) : static
181-
{
172+
) : static {
182173
return $this->having($column, '<', $value);
183174
}
184175

@@ -195,8 +186,7 @@ public function havingLessThan(
195186
public function orHavingLessThan(
196187
Closure | string $column,
197188
Closure | float | int | string | null $value
198-
) : static
199-
{
189+
) : static {
200190
return $this->orHaving($column, '<', $value);
201191
}
202192

@@ -213,8 +203,7 @@ public function orHavingLessThan(
213203
public function havingLessThanOrEqual(
214204
Closure | string $column,
215205
Closure | float | int | string | null $value
216-
) : static
217-
{
206+
) : static {
218207
return $this->having($column, '<=', $value);
219208
}
220209

@@ -231,8 +220,7 @@ public function havingLessThanOrEqual(
231220
public function orHavingLessThanOrEqual(
232221
Closure | string $column,
233222
Closure | float | int | string | null $value
234-
) : static
235-
{
223+
) : static {
236224
return $this->orHaving($column, '<=', $value);
237225
}
238226

@@ -249,8 +237,7 @@ public function orHavingLessThanOrEqual(
249237
public function havingGreaterThan(
250238
Closure | string $column,
251239
Closure | float | int | string | null $value
252-
) : static
253-
{
240+
) : static {
254241
return $this->having($column, '>', $value);
255242
}
256243

@@ -267,8 +254,7 @@ public function havingGreaterThan(
267254
public function orHavingGreaterThan(
268255
Closure | string $column,
269256
Closure | float | int | string | null $value
270-
) : static
271-
{
257+
) : static {
272258
return $this->orHaving($column, '>', $value);
273259
}
274260

@@ -285,8 +271,7 @@ public function orHavingGreaterThan(
285271
public function havingGreaterThanOrEqual(
286272
Closure | string $column,
287273
Closure | float | int | string | null $value
288-
) : static
289-
{
274+
) : static {
290275
return $this->having($column, '>=', $value);
291276
}
292277

@@ -303,8 +288,7 @@ public function havingGreaterThanOrEqual(
303288
public function orHavingGreaterThanOrEqual(
304289
Closure | string $column,
305290
Closure | float | int | string | null $value
306-
) : static
307-
{
291+
) : static {
308292
return $this->orHaving($column, '>=', $value);
309293
}
310294

@@ -321,8 +305,7 @@ public function orHavingGreaterThanOrEqual(
321305
public function havingLike(
322306
Closure | string $column,
323307
Closure | float | int | string | null $value
324-
) : static
325-
{
308+
) : static {
326309
return $this->having($column, 'LIKE', $value);
327310
}
328311

@@ -339,8 +322,7 @@ public function havingLike(
339322
public function orHavingLike(
340323
Closure | string $column,
341324
Closure | float | int | string | null $value
342-
) : static
343-
{
325+
) : static {
344326
return $this->orHaving($column, 'LIKE', $value);
345327
}
346328

@@ -357,8 +339,7 @@ public function orHavingLike(
357339
public function havingNotLike(
358340
Closure | string $column,
359341
Closure | float | int | string | null $value
360-
) : static
361-
{
342+
) : static {
362343
return $this->having($column, 'NOT LIKE', $value);
363344
}
364345

@@ -375,8 +356,7 @@ public function havingNotLike(
375356
public function orHavingNotLike(
376357
Closure | string $column,
377358
Closure | float | int | string | null $value
378-
) : static
379-
{
359+
) : static {
380360
return $this->orHaving($column, 'NOT LIKE', $value);
381361
}
382362

@@ -395,8 +375,7 @@ public function havingIn(
395375
Closure | string $column,
396376
Closure | float | int | string | null $value,
397377
Closure | float | int | string | null ...$values
398-
) : static
399-
{
378+
) : static {
400379
return $this->having($column, 'IN', ...[$value, ...$values]);
401380
}
402381

@@ -415,8 +394,7 @@ public function orHavingIn(
415394
Closure | string $column,
416395
Closure | float | int | string | null $value,
417396
Closure | float | int | string | null ...$values
418-
) : static
419-
{
397+
) : static {
420398
return $this->orHaving($column, 'IN', ...[$value, ...$values]);
421399
}
422400

@@ -435,8 +413,7 @@ public function havingNotIn(
435413
Closure | string $column,
436414
Closure | float | int | string | null $value,
437415
Closure | float | int | string | null ...$values
438-
) : static
439-
{
416+
) : static {
440417
return $this->having($column, 'NOT IN', ...[$value, ...$values]);
441418
}
442419

@@ -455,8 +432,7 @@ public function orHavingNotIn(
455432
Closure | string $column,
456433
Closure | float | int | string | null $value,
457434
Closure | float | int | string | null ...$values
458-
) : static
459-
{
435+
) : static {
460436
return $this->orHaving($column, 'NOT IN', ...[$value, ...$values]);
461437
}
462438

@@ -475,8 +451,7 @@ public function havingBetween(
475451
Closure | string $column,
476452
Closure | float | int | string | null $min,
477453
Closure | float | int | string | null $max
478-
) : static
479-
{
454+
) : static {
480455
return $this->having($column, 'BETWEEN', $min, $max);
481456
}
482457

@@ -495,8 +470,7 @@ public function orHavingBetween(
495470
Closure | string $column,
496471
Closure | float | int | string | null $min,
497472
Closure | float | int | string | null $max
498-
) : static
499-
{
473+
) : static {
500474
return $this->orHaving($column, 'BETWEEN', $min, $max);
501475
}
502476

@@ -515,8 +489,7 @@ public function havingNotBetween(
515489
Closure | string $column,
516490
Closure | float | int | string | null $min,
517491
Closure | float | int | string | null $max
518-
) : static
519-
{
492+
) : static {
520493
return $this->having($column, 'NOT BETWEEN', $min, $max);
521494
}
522495

@@ -535,8 +508,7 @@ public function orHavingNotBetween(
535508
Closure | string $column,
536509
Closure | float | int | string | null $min,
537510
Closure | float | int | string | null $max
538-
) : static
539-
{
511+
) : static {
540512
return $this->orHaving($column, 'NOT BETWEEN', $min, $max);
541513
}
542514

@@ -613,8 +585,7 @@ private function addHaving(
613585
array | Closure | string $column,
614586
string $operator,
615587
array $values
616-
) : static
617-
{
588+
) : static {
618589
return $this->addWhere($glue, $column, $operator, $values, 'having');
619590
}
620591

src/Manipulation/Traits/Join.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ trait Join
3737
public function from(
3838
array | Closure | string $reference,
3939
array | Closure | string ...$references
40-
) : static
41-
{
40+
) : static {
4241
$this->sql['from'] = [];
4342
foreach ([$reference, ...$references] as $reference) {
4443
$this->sql['from'][] = $reference;
@@ -102,8 +101,7 @@ public function join(
102101
string $type = '',
103102
string $clause = null,
104103
array | Closure $conditional = null
105-
) : static
106-
{
104+
) : static {
107105
return $this->setJoin($table, $type, $clause, $conditional);
108106
}
109107

@@ -366,8 +364,7 @@ private function setJoin(
366364
string $type,
367365
string $clause = null,
368366
Closure | array $expression = null
369-
) : static
370-
{
367+
) : static {
371368
$this->sql['join'] = [
372369
'type' => $type,
373370
'table' => $table,

src/Manipulation/Traits/Values.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ trait Values
3030
public function values(
3131
array | Closure | float | int | string | null $value,
3232
Closure | float | int | string | null ...$values
33-
) : static
34-
{
33+
) : static {
3534
if ( ! \is_array($value)) {
3635
$this->sql['values'][] = [$value, ...$values];
3736
return $this;

0 commit comments

Comments
 (0)