@@ -38,6 +38,5 @@ |
||
| 38 | 38 | * Class ConnectionException |
| 39 | 39 | * @package Platine\Database\Exception |
| 40 | 40 | */ |
| 41 | -class ConnectionException extends Exception |
|
| 42 | -{ |
|
| 41 | +class ConnectionException extends Exception { |
|
| 43 | 42 | } |
@@ -50,16 +50,14 @@ discard block |
||
| 50 | 50 | * Class DeleteStatement |
| 51 | 51 | * @package Platine\Database\Query |
| 52 | 52 | */ |
| 53 | -class DeleteStatement extends BaseStatement |
|
| 54 | -{ |
|
| 53 | +class DeleteStatement extends BaseStatement { |
|
| 55 | 54 | |
| 56 | 55 | /** |
| 57 | 56 | * DeleteStatement constructor. |
| 58 | 57 | * @param string|array<string> $from |
| 59 | 58 | * @param QueryStatement|null $queryStatement |
| 60 | 59 | */ |
| 61 | - public function __construct($from, QueryStatement $queryStatement = null) |
|
| 62 | - { |
|
| 60 | + public function __construct($from, QueryStatement $queryStatement = null) { |
|
| 63 | 61 | parent::__construct($queryStatement); |
| 64 | 62 | |
| 65 | 63 | if (!is_array($from)) { |
@@ -73,8 +71,7 @@ discard block |
||
| 73 | 71 | * @param string|array<string> $tables |
| 74 | 72 | * @return mixed |
| 75 | 73 | */ |
| 76 | - public function delete($tables = []) |
|
| 77 | - { |
|
| 74 | + public function delete($tables = []) { |
|
| 78 | 75 | if (!is_array($tables)) { |
| 79 | 76 | /** @var array<string> $tables */ |
| 80 | 77 | $tables = [$tables]; |
@@ -38,6 +38,5 @@ |
||
| 38 | 38 | * Class ConnectionNotFoundException |
| 39 | 39 | * @package Platine\Database\Exception |
| 40 | 40 | */ |
| 41 | -class ConnectionNotFoundException extends Exception |
|
| 42 | -{ |
|
| 41 | +class ConnectionNotFoundException extends Exception { |
|
| 43 | 42 | } |
@@ -38,6 +38,5 @@ |
||
| 38 | 38 | * Class ConnectionAlreadyExistsException |
| 39 | 39 | * @package Platine\Database\Exception |
| 40 | 40 | */ |
| 41 | -class ConnectionAlreadyExistsException extends Exception |
|
| 42 | -{ |
|
| 41 | +class ConnectionAlreadyExistsException extends Exception { |
|
| 43 | 42 | } |
@@ -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 | } |
@@ -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; |
@@ -61,8 +61,7 @@ discard block |
||
| 61 | 61 | * Class Connection |
| 62 | 62 | * @package Platine\Database |
| 63 | 63 | */ |
| 64 | -class Connection |
|
| 65 | -{ |
|
| 64 | +class Connection { |
|
| 66 | 65 | /** |
| 67 | 66 | * The PDO instance |
| 68 | 67 | * @var PDO |
@@ -346,8 +345,7 @@ discard block |
||
| 346 | 345 | * @return mixed |
| 347 | 346 | * @throws QueryException |
| 348 | 347 | */ |
| 349 | - public function column(string $sql, array $params = []) |
|
| 350 | - { |
|
| 348 | + public function column(string $sql, array $params = []) { |
|
| 351 | 349 | $prepared = $this->prepare($sql, $params); |
| 352 | 350 | $this->execute($prepared); |
| 353 | 351 | |
@@ -400,8 +398,7 @@ discard block |
||
| 400 | 398 | /** |
| 401 | 399 | * {@inheritdoc} |
| 402 | 400 | */ |
| 403 | - public function __sleep() |
|
| 404 | - { |
|
| 401 | + public function __sleep() { |
|
| 405 | 402 | return [ |
| 406 | 403 | 'dsn', |
| 407 | 404 | 'driver', |
@@ -415,8 +412,7 @@ discard block |
||
| 415 | 412 | /** |
| 416 | 413 | * {@inheritdoc} |
| 417 | 414 | */ |
| 418 | - public function __wakeup() |
|
| 419 | - { |
|
| 415 | + public function __wakeup() { |
|
| 420 | 416 | $this->createPDO(); |
| 421 | 417 | } |
| 422 | 418 | |