@@ -50,8 +50,7 @@ discard block |
||
50 | 50 | * Class HavingStatement |
51 | 51 | * @package Platine\Database\Query |
52 | 52 | */ |
53 | -class HavingStatement |
|
54 | -{ |
|
53 | +class HavingStatement { |
|
55 | 54 | |
56 | 55 | /** |
57 | 56 | * The Query statement instance |
@@ -69,8 +68,7 @@ discard block |
||
69 | 68 | * HavingStatement constructor. |
70 | 69 | * @param QueryStatement|null $queryStatement |
71 | 70 | */ |
72 | - public function __construct(QueryStatement $queryStatement = null) |
|
73 | - { |
|
71 | + public function __construct(QueryStatement $queryStatement = null) { |
|
74 | 72 | if ($queryStatement === null) { |
75 | 73 | $queryStatement = new QueryStatement(); |
76 | 74 | } |
@@ -108,8 +106,7 @@ discard block |
||
108 | 106 | /** |
109 | 107 | * @inheritDoc |
110 | 108 | */ |
111 | - public function __clone() |
|
112 | - { |
|
109 | + public function __clone() { |
|
113 | 110 | $this->queryStatement = clone $this->queryStatement; |
114 | 111 | $this->expression = new HavingExpression($this->queryStatement); |
115 | 112 | } |
@@ -52,8 +52,7 @@ discard block |
||
52 | 52 | * Class BaseStatement |
53 | 53 | * @package Platine\Database\Query |
54 | 54 | */ |
55 | -class BaseStatement extends WhereStatement |
|
56 | -{ |
|
55 | +class BaseStatement extends WhereStatement { |
|
57 | 56 | |
58 | 57 | /** |
59 | 58 | * @param string|string[] $table |
@@ -61,8 +60,7 @@ discard block |
||
61 | 60 | * |
62 | 61 | * @return Delete|Select|BaseStatement |
63 | 62 | */ |
64 | - public function join($table, Closure $closure) |
|
65 | - { |
|
63 | + public function join($table, Closure $closure) { |
|
66 | 64 | $this->queryStatement->addJoinClause('INNER', $table, $closure); |
67 | 65 | |
68 | 66 | return $this; |
@@ -74,8 +72,7 @@ discard block |
||
74 | 72 | * |
75 | 73 | * @return Delete|Select|BaseStatement |
76 | 74 | */ |
77 | - public function leftJoin($table, Closure $closure) |
|
78 | - { |
|
75 | + public function leftJoin($table, Closure $closure) { |
|
79 | 76 | $this->queryStatement->addJoinClause('LEFT', $table, $closure); |
80 | 77 | |
81 | 78 | return $this; |
@@ -87,8 +84,7 @@ discard block |
||
87 | 84 | * |
88 | 85 | * @return Delete|Select|BaseStatement |
89 | 86 | */ |
90 | - public function rightJoin($table, Closure $closure) |
|
91 | - { |
|
87 | + public function rightJoin($table, Closure $closure) { |
|
92 | 88 | $this->queryStatement->addJoinClause('RIGHT', $table, $closure); |
93 | 89 | |
94 | 90 | return $this; |
@@ -100,8 +96,7 @@ discard block |
||
100 | 96 | * |
101 | 97 | * @return Delete|Select|BaseStatement |
102 | 98 | */ |
103 | - public function fullJoin($table, Closure $closure) |
|
104 | - { |
|
99 | + public function fullJoin($table, Closure $closure) { |
|
105 | 100 | $this->queryStatement->addJoinClause('FULL', $table, $closure); |
106 | 101 | |
107 | 102 | return $this; |
@@ -113,8 +108,7 @@ discard block |
||
113 | 108 | * |
114 | 109 | * @return Delete|Select|BaseStatement |
115 | 110 | */ |
116 | - public function crossJoin($table, Closure $closure) |
|
117 | - { |
|
111 | + public function crossJoin($table, Closure $closure) { |
|
118 | 112 | $this->queryStatement->addJoinClause('CROSS', $table, $closure); |
119 | 113 | |
120 | 114 | return $this; |
@@ -52,8 +52,7 @@ discard block |
||
52 | 52 | * Class ColumnExpression |
53 | 53 | * @package Platine\Database\Query |
54 | 54 | */ |
55 | -class ColumnExpression |
|
56 | -{ |
|
55 | +class ColumnExpression { |
|
57 | 56 | |
58 | 57 | /** |
59 | 58 | * The Query statement instance |
@@ -65,8 +64,7 @@ discard block |
||
65 | 64 | * ColumnExpression constructor. |
66 | 65 | * @param QueryStatement $queryStatement |
67 | 66 | */ |
68 | - public function __construct(QueryStatement $queryStatement) |
|
69 | - { |
|
67 | + public function __construct(QueryStatement $queryStatement) { |
|
70 | 68 | $this->queryStatement = $queryStatement; |
71 | 69 | } |
72 | 70 | |
@@ -160,8 +158,7 @@ discard block |
||
160 | 158 | return $this->column((new Expression())->max($column, $distinct), $alias); |
161 | 159 | } |
162 | 160 | |
163 | - public function __clone() |
|
164 | - { |
|
161 | + public function __clone() { |
|
165 | 162 | $this->queryStatement = clone $this->queryStatement; |
166 | 163 | } |
167 | 164 | } |
@@ -50,8 +50,7 @@ discard block |
||
50 | 50 | * Class HavingExpression |
51 | 51 | * @package Platine\Database\Query |
52 | 52 | */ |
53 | -class HavingExpression |
|
54 | -{ |
|
53 | +class HavingExpression { |
|
55 | 54 | |
56 | 55 | /** |
57 | 56 | * The Query statement instance |
@@ -79,8 +78,7 @@ discard block |
||
79 | 78 | * HavingExpression constructor. |
80 | 79 | * @param QueryStatement $queryStatement |
81 | 80 | */ |
82 | - public function __construct(QueryStatement $queryStatement) |
|
83 | - { |
|
81 | + public function __construct(QueryStatement $queryStatement) { |
|
84 | 82 | $this->queryStatement = $queryStatement; |
85 | 83 | |
86 | 84 | $this->having = new Having($queryStatement); |
@@ -160,8 +158,7 @@ discard block |
||
160 | 158 | /** |
161 | 159 | * @inheritDoc |
162 | 160 | */ |
163 | - public function __clone() |
|
164 | - { |
|
161 | + public function __clone() { |
|
165 | 162 | if ($this->column instanceof Expression) { |
166 | 163 | $this->column = clone $this->column; |
167 | 164 | } |
@@ -52,8 +52,7 @@ |
||
52 | 52 | * Class Expression |
53 | 53 | * @package Platine\Database\Query |
54 | 54 | */ |
55 | -class Expression |
|
56 | -{ |
|
55 | +class Expression { |
|
57 | 56 | |
58 | 57 | /** |
59 | 58 | * The list of expression |
@@ -50,8 +50,7 @@ discard block |
||
50 | 50 | * Class Where |
51 | 51 | * @package Platine\Database\Query |
52 | 52 | */ |
53 | -class Where |
|
54 | -{ |
|
53 | +class Where { |
|
55 | 54 | |
56 | 55 | /** |
57 | 56 | * @var string|Expression |
@@ -269,8 +268,7 @@ discard block |
||
269 | 268 | /** |
270 | 269 | * @inheritDoc |
271 | 270 | */ |
272 | - public function __clone() |
|
273 | - { |
|
271 | + public function __clone() { |
|
274 | 272 | if ($this->column instanceof Expression) { |
275 | 273 | $this->column = clone $this->column; |
276 | 274 | } |
@@ -292,7 +292,7 @@ |
||
292 | 292 | bool $isColumn = false |
293 | 293 | ): WhereStatement { |
294 | 294 | if ($isColumn && is_string($value)) { |
295 | - $value = function (Expression $expr) use ($value) { |
|
295 | + $value = function(Expression $expr) use ($value) { |
|
296 | 296 | return $expr->column($value); |
297 | 297 | }; |
298 | 298 | } |
@@ -52,8 +52,7 @@ discard block |
||
52 | 52 | * Class Insert |
53 | 53 | * @package Platine\Database\Query |
54 | 54 | */ |
55 | -class Insert extends InsertStatement |
|
56 | -{ |
|
55 | +class Insert extends InsertStatement { |
|
57 | 56 | |
58 | 57 | /** |
59 | 58 | * @var Connection |
@@ -65,8 +64,7 @@ discard block |
||
65 | 64 | * @param Connection $connection |
66 | 65 | * @param QueryStatement|null $queryStatement |
67 | 66 | */ |
68 | - public function __construct(Connection $connection, QueryStatement $queryStatement = null) |
|
69 | - { |
|
67 | + public function __construct(Connection $connection, QueryStatement $queryStatement = null) { |
|
70 | 68 | parent::__construct($queryStatement); |
71 | 69 | |
72 | 70 | $this->connection = $connection; |
@@ -50,8 +50,7 @@ |
||
50 | 50 | * Class Join |
51 | 51 | * @package Platine\Database\Query |
52 | 52 | */ |
53 | -class Join |
|
54 | -{ |
|
53 | +class Join { |
|
55 | 54 | |
56 | 55 | /** |
57 | 56 | * The Join conditions |
@@ -50,8 +50,7 @@ discard block |
||
50 | 50 | * Class CreateTable |
51 | 51 | * @package Platine\Database\Schema |
52 | 52 | */ |
53 | -class CreateTable |
|
54 | -{ |
|
53 | +class CreateTable { |
|
55 | 54 | |
56 | 55 | /** |
57 | 56 | * The list of CreateColumn |
@@ -105,8 +104,7 @@ discard block |
||
105 | 104 | * Class constructor |
106 | 105 | * @param string $table |
107 | 106 | */ |
108 | - public function __construct(string $table) |
|
109 | - { |
|
107 | + public function __construct(string $table) { |
|
110 | 108 | $this->table = $table; |
111 | 109 | } |
112 | 110 | |
@@ -132,8 +130,7 @@ discard block |
||
132 | 130 | * |
133 | 131 | * @return mixed |
134 | 132 | */ |
135 | - public function getPrimaryKey() |
|
136 | - { |
|
133 | + public function getPrimaryKey() { |
|
137 | 134 | return $this->primaryKey; |
138 | 135 | } |
139 | 136 |