Passed
Push — develop ( b6287c...cd2c29 )
by nguereza
02:21 queued 24s
created
src/Query/Expression.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * Class Expression
53 53
  * @package Platine\Database\Query
54 54
  */
55
-class Expression
56
-{
55
+class Expression {
57 56
     /**
58 57
      * The list of expression
59 58
      * @var array<int, array<string, mixed>>
Please login to merge, or discard this patch.
src/Query/Insert.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@  discard block
 block discarded – undo
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
      * @var Connection
59 58
      */
@@ -64,8 +63,7 @@  discard block
 block discarded – undo
64 63
      * @param Connection $connection
65 64
      * @param QueryStatement|null $queryStatement
66 65
      */
67
-    public function __construct(Connection $connection, QueryStatement $queryStatement = null)
68
-    {
66
+    public function __construct(Connection $connection, QueryStatement $queryStatement = null) {
69 67
         parent::__construct($queryStatement);
70 68
 
71 69
         $this->connection = $connection;
Please login to merge, or discard this patch.
src/Query/InsertStatement.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
  * Class InsertStatement
51 51
  * @package Platine\Database\Query
52 52
  */
53
-class InsertStatement
54
-{
53
+class InsertStatement {
55 54
     /**
56 55
      * The Query statement instance
57 56
      * @var QueryStatement
@@ -62,8 +61,7 @@  discard block
 block discarded – undo
62 61
      * InsertStatement constructor.
63 62
      * @param QueryStatement|null $queryStatement
64 63
      */
65
-    public function __construct(QueryStatement $queryStatement = null)
66
-    {
64
+    public function __construct(QueryStatement $queryStatement = null) {
67 65
         if ($queryStatement === null) {
68 66
             $queryStatement = new QueryStatement();
69 67
         }
@@ -98,16 +96,14 @@  discard block
 block discarded – undo
98 96
      * @param string $table
99 97
      * @return mixed
100 98
      */
101
-    public function into(string $table)
102
-    {
99
+    public function into(string $table) {
103 100
         $this->queryStatement->addTables([$table]);
104 101
     }
105 102
 
106 103
     /**
107 104
      * @inheritDoc
108 105
      */
109
-    public function __clone()
110
-    {
106
+    public function __clone() {
111 107
         $this->queryStatement = clone $this->queryStatement;
112 108
     }
113 109
 }
Please login to merge, or discard this patch.
src/Query/ColumnExpression.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@  discard block
 block discarded – undo
52 52
  * Class ColumnExpression
53 53
  * @package Platine\Database\Query
54 54
  */
55
-class ColumnExpression
56
-{
55
+class ColumnExpression {
57 56
     /**
58 57
      * The Query statement instance
59 58
      * @var QueryStatement
@@ -64,8 +63,7 @@  discard block
 block discarded – undo
64 63
      * ColumnExpression constructor.
65 64
      * @param QueryStatement $queryStatement
66 65
      */
67
-    public function __construct(QueryStatement $queryStatement)
68
-    {
66
+    public function __construct(QueryStatement $queryStatement) {
69 67
         $this->queryStatement = $queryStatement;
70 68
     }
71 69
 
@@ -159,8 +157,7 @@  discard block
 block discarded – undo
159 157
         return $this->column((new Expression())->max($column, $distinct), $alias);
160 158
     }
161 159
 
162
-    public function __clone()
163
-    {
160
+    public function __clone() {
164 161
         $this->queryStatement = clone $this->queryStatement;
165 162
     }
166 163
 }
Please login to merge, or discard this patch.
src/Query/Delete.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
  * Class Delete
54 54
  * @package Platine\Database\Query
55 55
  */
56
-class Delete extends DeleteStatement
57
-{
56
+class Delete extends DeleteStatement {
58 57
     /**
59 58
      * @var Connection
60 59
      */
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
      * @param string|array<string> $from
67 66
      * @param QueryStatement|null $queryStatement
68 67
      */
69
-    public function __construct(Connection $connection, $from, QueryStatement $queryStatement = null)
70
-    {
68
+    public function __construct(Connection $connection, $from, QueryStatement $queryStatement = null) {
71 69
         parent::__construct($from, $queryStatement);
72 70
 
73 71
         $this->connection = $connection;
Please login to merge, or discard this patch.
src/Query/Query.php 1 patch
Braces   +15 added lines, -30 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
  * Class Query
55 55
  * @package Platine\Database\Query
56 56
  */
57
-class Query extends BaseStatement
58
-{
57
+class Query extends BaseStatement {
59 58
     /**
60 59
      * @var Connection
61 60
      */
@@ -88,8 +87,7 @@  discard block
 block discarded – undo
88 87
      *
89 88
      * @return Select|SelectStatement
90 89
      */
91
-    public function distinct(bool $value = true)
92
-    {
90
+    public function distinct(bool $value = true) {
93 91
         return $this->buildSelect()->distinct($value);
94 92
     }
95 93
 
@@ -98,8 +96,7 @@  discard block
 block discarded – undo
98 96
      *
99 97
      * @return Select|SelectStatement
100 98
      */
101
-    public function groupBy($columns)
102
-    {
99
+    public function groupBy($columns) {
103 100
         return $this->buildSelect()->groupBy($columns);
104 101
     }
105 102
 
@@ -109,8 +106,7 @@  discard block
 block discarded – undo
109 106
      *
110 107
      * @return Select|SelectStatement
111 108
      */
112
-    public function having($column, Closure $value = null)
113
-    {
109
+    public function having($column, Closure $value = null) {
114 110
         return $this->buildSelect()->having($column, $value);
115 111
     }
116 112
 
@@ -120,8 +116,7 @@  discard block
 block discarded – undo
120 116
      *
121 117
      * @return Select|SelectStatement
122 118
      */
123
-    public function orHaving($column, Closure $value = null)
124
-    {
119
+    public function orHaving($column, Closure $value = null) {
125 120
         return $this->buildSelect()->orHaving($column, $value);
126 121
     }
127 122
 
@@ -131,8 +126,7 @@  discard block
 block discarded – undo
131 126
      *
132 127
      * @return Select|SelectStatement
133 128
      */
134
-    public function orderBy($columns, string $order = 'ASC')
135
-    {
129
+    public function orderBy($columns, string $order = 'ASC') {
136 130
         return $this->buildSelect()->orderBy($columns, $order);
137 131
     }
138 132
 
@@ -141,8 +135,7 @@  discard block
 block discarded – undo
141 135
      *
142 136
      * @return Select|SelectStatement
143 137
      */
144
-    public function limit(int $value)
145
-    {
138
+    public function limit(int $value) {
146 139
         return $this->buildSelect()->limit($value);
147 140
     }
148 141
 
@@ -151,8 +144,7 @@  discard block
 block discarded – undo
151 144
      *
152 145
      * @return Select|SelectStatement
153 146
      */
154
-    public function offset(int $value)
155
-    {
147
+    public function offset(int $value) {
156 148
         return $this->buildSelect()->offset($value);
157 149
     }
158 150
 
@@ -160,8 +152,7 @@  discard block
 block discarded – undo
160 152
      * @param string $table
161 153
      * @return Select|SelectStatement
162 154
      */
163
-    public function into(string $table)
164
-    {
155
+    public function into(string $table) {
165 156
         return $this->buildSelect()->into($table);
166 157
     }
167 158
 
@@ -170,8 +161,7 @@  discard block
 block discarded – undo
170 161
      *
171 162
      * @return ResultSet
172 163
      */
173
-    public function select($columns = [])
174
-    {
164
+    public function select($columns = []) {
175 165
         return $this->buildSelect()->select($columns);
176 166
     }
177 167
 
@@ -189,8 +179,7 @@  discard block
 block discarded – undo
189 179
      *
190 180
      * @return mixed
191 181
      */
192
-    public function column($name)
193
-    {
182
+    public function column($name) {
194 183
         return $this->buildSelect()->column($name);
195 184
     }
196 185
 
@@ -211,8 +200,7 @@  discard block
 block discarded – undo
211 200
      *
212 201
      * @return int|float
213 202
      */
214
-    public function avg($column, bool $distinct = false)
215
-    {
203
+    public function avg($column, bool $distinct = false) {
216 204
         return $this->buildSelect()->avg($column, $distinct);
217 205
     }
218 206
 
@@ -222,8 +210,7 @@  discard block
 block discarded – undo
222 210
      *
223 211
      * @return int|float
224 212
      */
225
-    public function sum($column, bool $distinct = false)
226
-    {
213
+    public function sum($column, bool $distinct = false) {
227 214
         return $this->buildSelect()->sum($column, $distinct);
228 215
     }
229 216
 
@@ -233,8 +220,7 @@  discard block
 block discarded – undo
233 220
      *
234 221
      * @return mixed
235 222
      */
236
-    public function min($column, bool $distinct = false)
237
-    {
223
+    public function min($column, bool $distinct = false) {
238 224
         return $this->buildSelect()->min($column, $distinct);
239 225
     }
240 226
 
@@ -244,8 +230,7 @@  discard block
 block discarded – undo
244 230
      *
245 231
      * @return mixed
246 232
      */
247
-    public function max($column, bool $distinct = false)
248
-    {
233
+    public function max($column, bool $distinct = false) {
249 234
         return $this->buildSelect()->max($column, $distinct);
250 235
     }
251 236
 
Please login to merge, or discard this patch.
src/Query/QueryStatement.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
  *
54 54
  * @package Platine\Database\Query
55 55
  */
56
-class QueryStatement
57
-{
56
+class QueryStatement {
58 57
     /**
59 58
      * The where SQL parts
60 59
      * @var array<int, mixed>
@@ -348,8 +347,7 @@  discard block
 block discarded – undo
348 347
      * @param bool $not
349 348
      * @return mixed
350 349
      */
351
-    public function addHavingIn($aggregate, $value, string $separator, bool $not)
352
-    {
350
+    public function addHavingIn($aggregate, $value, string $separator, bool $not) {
353 351
         $aggregate = $this->closureToExpression($aggregate);
354 352
 
355 353
         if ($value instanceof Closure) {
@@ -617,8 +615,7 @@  discard block
 block discarded – undo
617 615
      *
618 616
      * @return mixed|Expression
619 617
      */
620
-    protected function closureToExpression($value)
621
-    {
618
+    protected function closureToExpression($value) {
622 619
         if ($value instanceof Closure) {
623 620
             return Expression::fromClosure($value);
624 621
         }
Please login to merge, or discard this patch.
src/Driver/PostgreSQL.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@
 block discarded – undo
54 54
  * Class PostgreSQL
55 55
  * @package Platine\Database\Driver
56 56
  */
57
-class PostgreSQL extends Driver
58
-{
57
+class PostgreSQL extends Driver {
59 58
     /**
60 59
      * @inheritDoc
61 60
      */
Please login to merge, or discard this patch.
src/Driver/Oracle.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
  * Class Oracle
56 56
  * @package Platine\Database\Driver
57 57
  */
58
-class Oracle extends Driver
59
-{
58
+class Oracle extends Driver {
60 59
     /**
61 60
      * @inheritDoc
62 61
      */
Please login to merge, or discard this patch.