@@ -38,7 +38,6 @@ |
||
38 | 38 | * Class QueryPrepareException |
39 | 39 | * @package Platine\Database\Exception |
40 | 40 | */ |
41 | -class QueryPrepareException extends RuntimeException |
|
42 | -{ |
|
41 | +class QueryPrepareException extends RuntimeException { |
|
43 | 42 | |
44 | 43 | } |
@@ -38,7 +38,6 @@ |
||
38 | 38 | * Class TransactionException |
39 | 39 | * @package Platine\Database\Exception |
40 | 40 | */ |
41 | -class TransactionException extends RuntimeException |
|
42 | -{ |
|
41 | +class TransactionException extends RuntimeException { |
|
43 | 42 | |
44 | 43 | } |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | * Class Select |
55 | 55 | * @package Platine\Database\Query |
56 | 56 | */ |
57 | -class Select extends SelectStatement |
|
58 | -{ |
|
57 | +class Select extends SelectStatement { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * @var Connection |
@@ -82,8 +81,7 @@ discard block |
||
82 | 81 | * |
83 | 82 | * @return ResultSet |
84 | 83 | */ |
85 | - public function select($columns = []) |
|
86 | - { |
|
84 | + public function select($columns = []) { |
|
87 | 85 | parent::select($columns); |
88 | 86 | $driver = $this->connection->getDriver(); |
89 | 87 | |
@@ -98,8 +96,7 @@ discard block |
||
98 | 96 | * |
99 | 97 | * @return mixed|false |
100 | 98 | */ |
101 | - public function column($name) |
|
102 | - { |
|
99 | + public function column($name) { |
|
103 | 100 | parent::column($name); |
104 | 101 | return $this->getColumnResult(); |
105 | 102 | } |
@@ -122,8 +119,7 @@ discard block |
||
122 | 119 | * |
123 | 120 | * @return int|float |
124 | 121 | */ |
125 | - public function avg($column, bool $distinct = false) |
|
126 | - { |
|
122 | + public function avg($column, bool $distinct = false) { |
|
127 | 123 | parent::avg($column, $distinct); |
128 | 124 | return $this->getColumnResult(); |
129 | 125 | } |
@@ -134,8 +130,7 @@ discard block |
||
134 | 130 | * |
135 | 131 | * @return int|float |
136 | 132 | */ |
137 | - public function sum($column, bool $distinct = false) |
|
138 | - { |
|
133 | + public function sum($column, bool $distinct = false) { |
|
139 | 134 | parent::sum($column, $distinct); |
140 | 135 | return $this->getColumnResult(); |
141 | 136 | } |
@@ -146,8 +141,7 @@ discard block |
||
146 | 141 | * |
147 | 142 | * @return int|float |
148 | 143 | */ |
149 | - public function min($column, bool $distinct = false) |
|
150 | - { |
|
144 | + public function min($column, bool $distinct = false) { |
|
151 | 145 | parent::min($column, $distinct); |
152 | 146 | return $this->getColumnResult(); |
153 | 147 | } |
@@ -158,8 +152,7 @@ discard block |
||
158 | 152 | * |
159 | 153 | * @return int|float |
160 | 154 | */ |
161 | - public function max($column, bool $distinct = false) |
|
162 | - { |
|
155 | + public function max($column, bool $distinct = false) { |
|
163 | 156 | parent::max($column, $distinct); |
164 | 157 | return $this->getColumnResult(); |
165 | 158 | } |
@@ -168,8 +161,7 @@ discard block |
||
168 | 161 | * Return the result set for column |
169 | 162 | * @return mixed |
170 | 163 | */ |
171 | - protected function getColumnResult() |
|
172 | - { |
|
164 | + protected function getColumnResult() { |
|
173 | 165 | $driver = $this->connection->getDriver(); |
174 | 166 | |
175 | 167 | return $this->connection->column( |
@@ -198,10 +198,10 @@ discard block |
||
198 | 198 | return $this->appname; |
199 | 199 | } |
200 | 200 | |
201 | - /** |
|
202 | - * Return the host |
|
203 | - * @return string |
|
204 | - */ |
|
201 | + /** |
|
202 | + * Return the host |
|
203 | + * @return string |
|
204 | + */ |
|
205 | 205 | public function getHostname(): string |
206 | 206 | { |
207 | 207 | return $this->hostname; |
@@ -399,12 +399,12 @@ discard block |
||
399 | 399 | public function getDriverClassName(): string |
400 | 400 | { |
401 | 401 | $maps = [ |
402 | - 'mysql' => MySQL::class, |
|
403 | - 'pgsql' => PostgreSQL::class, |
|
404 | - 'sqlsrv' => SQLServer::class, |
|
405 | - 'oci' => Oracle::class, |
|
406 | - 'oracle' => Oracle::class, |
|
407 | - 'sqlite' => SQLite::class, |
|
402 | + 'mysql' => MySQL::class, |
|
403 | + 'pgsql' => PostgreSQL::class, |
|
404 | + 'sqlsrv' => SQLServer::class, |
|
405 | + 'oci' => Oracle::class, |
|
406 | + 'oracle' => Oracle::class, |
|
407 | + 'sqlite' => SQLite::class, |
|
408 | 408 | ]; |
409 | 409 | |
410 | 410 | return isset($maps[$this->driver]) |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * Class Configuration |
60 | 60 | * @package Platine\Database |
61 | 61 | */ |
62 | -class Configuration extends AbstractConfiguration |
|
63 | -{ |
|
62 | +class Configuration extends AbstractConfiguration { |
|
64 | 63 | /** |
65 | 64 | * The connection driver to use |
66 | 65 | * @var string |
@@ -350,8 +349,7 @@ discard block |
||
350 | 349 | * |
351 | 350 | * @return mixed |
352 | 351 | */ |
353 | - public function getAttribute(string $name, $default = null) |
|
354 | - { |
|
352 | + public function getAttribute(string $name, $default = null) { |
|
355 | 353 | return $this->hasAttribute($name) |
356 | 354 | ? $this->attributes[$name] |
357 | 355 | : $default; |