@@ -55,8 +55,7 @@ discard block |
||
55 | 55 | * Class QueryBuilder |
56 | 56 | * @package Platine\Database |
57 | 57 | */ |
58 | -class QueryBuilder |
|
59 | -{ |
|
58 | +class QueryBuilder { |
|
60 | 59 | |
61 | 60 | /** |
62 | 61 | * The Connection instance |
@@ -74,8 +73,7 @@ discard block |
||
74 | 73 | * Class constructor |
75 | 74 | * @param Connection $connection |
76 | 75 | */ |
77 | - public function __construct(Connection $connection) |
|
78 | - { |
|
76 | + public function __construct(Connection $connection) { |
|
79 | 77 | $this->connection = $connection; |
80 | 78 | $this->schema = $this->connection->getSchema(); |
81 | 79 | } |
@@ -114,8 +112,7 @@ discard block |
||
114 | 112 | * @param callable $callback |
115 | 113 | * @return mixed |
116 | 114 | */ |
117 | - public function transaction(callable $callback) |
|
118 | - { |
|
115 | + public function transaction(callable $callback) { |
|
119 | 116 | return $this->connection->transaction($callback, $this); |
120 | 117 | } |
121 | 118 |
@@ -38,7 +38,6 @@ |
||
38 | 38 | * Class QueryException |
39 | 39 | * @package Platine\Database\Exception |
40 | 40 | */ |
41 | -class QueryException extends RuntimeException |
|
42 | -{ |
|
41 | +class QueryException extends RuntimeException { |
|
43 | 42 | |
44 | 43 | } |
@@ -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( |