@@ -664,7 +664,7 @@ |
||
664 | 664 | |
665 | 665 | return preg_replace_callback( |
666 | 666 | '/\?/', |
667 | - function () use ($driver, &$params) { |
|
667 | + function() use ($driver, &$params) { |
|
668 | 668 | $param = array_shift($params); |
669 | 669 | $param = is_object($param) ? get_class($param) : $param; |
670 | 670 | if (is_int($param) || is_float($param)) { |
@@ -64,8 +64,7 @@ discard block |
||
64 | 64 | * Class Connection |
65 | 65 | * @package Platine\Database |
66 | 66 | */ |
67 | -class Connection |
|
68 | -{ |
|
67 | +class Connection { |
|
69 | 68 | |
70 | 69 | /** |
71 | 70 | * The PDO instance |
@@ -544,8 +543,7 @@ discard block |
||
544 | 543 | * @return mixed |
545 | 544 | * @throws QueryException |
546 | 545 | */ |
547 | - public function exec(string $sql, array $params = []) |
|
548 | - { |
|
546 | + public function exec(string $sql, array $params = []) { |
|
549 | 547 | return $this->execute($this->prepare($sql, $params)); |
550 | 548 | } |
551 | 549 | |
@@ -575,8 +573,7 @@ discard block |
||
575 | 573 | * @return mixed |
576 | 574 | * @throws QueryException |
577 | 575 | */ |
578 | - public function column(string $sql, array $params = []) |
|
579 | - { |
|
576 | + public function column(string $sql, array $params = []) { |
|
580 | 577 | $prepared = $this->prepare($sql, $params); |
581 | 578 | $this->execute($prepared); |
582 | 579 |
@@ -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 |
@@ -50,8 +50,7 @@ discard block |
||
50 | 50 | * Class AlterTable |
51 | 51 | * @package Platine\Database\Schema |
52 | 52 | */ |
53 | -class AlterTable |
|
54 | -{ |
|
53 | +class AlterTable { |
|
55 | 54 | |
56 | 55 | /** |
57 | 56 | * The name of table |
@@ -69,8 +68,7 @@ discard block |
||
69 | 68 | * Class constructor |
70 | 69 | * @param string $table |
71 | 70 | */ |
72 | - public function __construct(string $table) |
|
73 | - { |
|
71 | + public function __construct(string $table) { |
|
74 | 72 | $this->table = $table; |
75 | 73 | } |
76 | 74 |
@@ -50,8 +50,7 @@ discard block |
||
50 | 50 | * Class BaseColumn |
51 | 51 | * @package Platine\Database\Schema |
52 | 52 | */ |
53 | -class BaseColumn |
|
54 | -{ |
|
53 | +class BaseColumn { |
|
55 | 54 | |
56 | 55 | /** |
57 | 56 | * The name of the column |
@@ -76,8 +75,7 @@ discard block |
||
76 | 75 | * @param string $name |
77 | 76 | * @param string|null $type |
78 | 77 | */ |
79 | - public function __construct(string $name, ?string $type = null) |
|
80 | - { |
|
78 | + public function __construct(string $name, ?string $type = null) { |
|
81 | 79 | $this->name = $name; |
82 | 80 | $this->type = $type; |
83 | 81 | } |
@@ -151,8 +149,7 @@ discard block |
||
151 | 149 | * @param string $name |
152 | 150 | * @param mixed|null $default |
153 | 151 | */ |
154 | - public function get(string $name, $default = null) |
|
155 | - { |
|
152 | + public function get(string $name, $default = null) { |
|
156 | 153 | return isset($this->properties[$name]) ? $this->properties[$name] : $default; |
157 | 154 | } |
158 | 155 |
@@ -50,8 +50,7 @@ discard block |
||
50 | 50 | * Class ForeignKey |
51 | 51 | * @package Platine\Database\Schema |
52 | 52 | */ |
53 | -class ForeignKey |
|
54 | -{ |
|
53 | +class ForeignKey { |
|
55 | 54 | |
56 | 55 | /** |
57 | 56 | * The referenced table |
@@ -81,8 +80,7 @@ discard block |
||
81 | 80 | * Class constructor |
82 | 81 | * @param array $columns |
83 | 82 | */ |
84 | - public function __construct(array $columns) |
|
85 | - { |
|
83 | + public function __construct(array $columns) { |
|
86 | 84 | $this->columns = $columns; |
87 | 85 | } |
88 | 86 |
@@ -50,8 +50,7 @@ discard block |
||
50 | 50 | * Class CreateColumn |
51 | 51 | * @package Platine\Database\Schema |
52 | 52 | */ |
53 | -class CreateColumn extends BaseColumn |
|
54 | -{ |
|
53 | +class CreateColumn extends BaseColumn { |
|
55 | 54 | |
56 | 55 | /** |
57 | 56 | * The associated table instance |
@@ -65,8 +64,7 @@ discard block |
||
65 | 64 | * @param string $name |
66 | 65 | * @param string|null $type |
67 | 66 | */ |
68 | - public function __construct(CreateTable $table, string $name, ?string $type = null) |
|
69 | - { |
|
67 | + public function __construct(CreateTable $table, string $name, ?string $type = null) { |
|
70 | 68 | $this->table = $table; |
71 | 69 | parent::__construct($name, $type); |
72 | 70 | } |
@@ -50,8 +50,7 @@ discard block |
||
50 | 50 | * Class AlterColumn |
51 | 51 | * @package Platine\Database\Schema |
52 | 52 | */ |
53 | -class AlterColumn extends BaseColumn |
|
54 | -{ |
|
53 | +class AlterColumn extends BaseColumn { |
|
55 | 54 | |
56 | 55 | /** |
57 | 56 | * The alter table |
@@ -65,8 +64,7 @@ discard block |
||
65 | 64 | * @param string $name |
66 | 65 | * @param string|null $type |
67 | 66 | */ |
68 | - public function __construct(AlterTable $table, string $name, ?string $type = null) |
|
69 | - { |
|
67 | + public function __construct(AlterTable $table, string $name, ?string $type = null) { |
|
70 | 68 | $this->table = $table; |
71 | 69 | parent::__construct($name, $type); |
72 | 70 | } |
@@ -55,8 +55,7 @@ |
||
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 | /** |
62 | 61 | * @inheritDoc |
@@ -60,8 +60,7 @@ discard block |
||
60 | 60 | * |
61 | 61 | * @package Platine\Database\Driver |
62 | 62 | */ |
63 | -class Driver |
|
64 | -{ |
|
63 | +class Driver { |
|
65 | 64 | |
66 | 65 | /** |
67 | 66 | * The driver default date format |
@@ -126,8 +125,7 @@ discard block |
||
126 | 125 | * Class constructor |
127 | 126 | * @param Connection $connection |
128 | 127 | */ |
129 | - public function __construct(Connection $connection) |
|
130 | - { |
|
128 | + public function __construct(Connection $connection) { |
|
131 | 129 | $this->connection = $connection; |
132 | 130 | } |
133 | 131 | |
@@ -454,8 +452,7 @@ discard block |
||
454 | 452 | * @return mixed |
455 | 453 | * |
456 | 454 | */ |
457 | - protected function value($value) |
|
458 | - { |
|
455 | + protected function value($value) { |
|
459 | 456 | if (is_numeric($value)) { |
460 | 457 | return $value; |
461 | 458 | } |