@@ -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 | * The referenced table |
57 | 56 | * @var string |
@@ -80,8 +79,7 @@ discard block |
||
80 | 79 | * Class constructor |
81 | 80 | * @param array<int, string> $columns |
82 | 81 | */ |
83 | - public function __construct(array $columns) |
|
84 | - { |
|
82 | + public function __construct(array $columns) { |
|
85 | 83 | $this->columns = $columns; |
86 | 84 | } |
87 | 85 |
@@ -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 | * The list of CreateColumn |
57 | 56 | * @var array<string, CreateColumn> |
@@ -104,8 +103,7 @@ discard block |
||
104 | 103 | * Class constructor |
105 | 104 | * @param string $table |
106 | 105 | */ |
107 | - public function __construct(string $table) |
|
108 | - { |
|
106 | + public function __construct(string $table) { |
|
109 | 107 | $this->table = $table; |
110 | 108 | } |
111 | 109 | |
@@ -131,8 +129,7 @@ discard block |
||
131 | 129 | * |
132 | 130 | * @return mixed |
133 | 131 | */ |
134 | - public function getPrimaryKey() |
|
135 | - { |
|
132 | + public function getPrimaryKey() { |
|
136 | 133 | return $this->primaryKey; |
137 | 134 | } |
138 | 135 |
@@ -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 | * The associated table instance |
57 | 56 | * @var CreateTable |
@@ -64,8 +63,7 @@ discard block |
||
64 | 63 | * @param string $name |
65 | 64 | * @param string|null $type |
66 | 65 | */ |
67 | - public function __construct(CreateTable $table, string $name, ?string $type = null) |
|
68 | - { |
|
66 | + public function __construct(CreateTable $table, string $name, ?string $type = null) { |
|
69 | 67 | $this->table = $table; |
70 | 68 | parent::__construct($name, $type); |
71 | 69 | } |
@@ -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 | * The name of table |
57 | 56 | * @var string |
@@ -68,8 +67,7 @@ discard block |
||
68 | 67 | * Class constructor |
69 | 68 | * @param string $table |
70 | 69 | */ |
71 | - public function __construct(string $table) |
|
72 | - { |
|
70 | + public function __construct(string $table) { |
|
73 | 71 | $this->table = $table; |
74 | 72 | } |
75 | 73 |
@@ -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 | * The name of the column |
57 | 56 | * @var string |
@@ -75,8 +74,7 @@ discard block |
||
75 | 74 | * @param string $name |
76 | 75 | * @param string|null $type |
77 | 76 | */ |
78 | - public function __construct(string $name, ?string $type = null) |
|
79 | - { |
|
77 | + public function __construct(string $name, ?string $type = null) { |
|
80 | 78 | $this->name = $name; |
81 | 79 | $this->type = $type; |
82 | 80 | } |
@@ -151,8 +149,7 @@ discard block |
||
151 | 149 | * @param mixed|null $default |
152 | 150 | * @return mixed |
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]) |
157 | 154 | ? $this->properties[$name] |
158 | 155 | : $default; |
@@ -53,8 +53,7 @@ discard block |
||
53 | 53 | * Class Schema |
54 | 54 | * @package Platine\Database |
55 | 55 | */ |
56 | -class Schema |
|
57 | -{ |
|
56 | +class Schema { |
|
58 | 57 | /** |
59 | 58 | * The Connection instance |
60 | 59 | * @var Connection |
@@ -83,8 +82,7 @@ discard block |
||
83 | 82 | * Class constructor |
84 | 83 | * @param Connection $connection |
85 | 84 | */ |
86 | - public function __construct(Connection $connection) |
|
87 | - { |
|
85 | + public function __construct(Connection $connection) { |
|
88 | 86 | $this->connection = $connection; |
89 | 87 | } |
90 | 88 |
@@ -52,8 +52,7 @@ discard block |
||
52 | 52 | * Class HavingStatement |
53 | 53 | * @package Platine\Database\Query |
54 | 54 | */ |
55 | -class HavingStatement |
|
56 | -{ |
|
55 | +class HavingStatement { |
|
57 | 56 | /** |
58 | 57 | * The Query statement instance |
59 | 58 | * @var QueryStatement |
@@ -70,8 +69,7 @@ discard block |
||
70 | 69 | * HavingStatement constructor. |
71 | 70 | * @param QueryStatement|null $queryStatement |
72 | 71 | */ |
73 | - public function __construct(QueryStatement $queryStatement = null) |
|
74 | - { |
|
72 | + public function __construct(QueryStatement $queryStatement = null) { |
|
75 | 73 | if ($queryStatement === null) { |
76 | 74 | $queryStatement = new QueryStatement(); |
77 | 75 | } |
@@ -110,8 +108,7 @@ discard block |
||
110 | 108 | /** |
111 | 109 | * @inheritDoc |
112 | 110 | */ |
113 | - public function __clone() |
|
114 | - { |
|
111 | + public function __clone() { |
|
115 | 112 | $this->queryStatement = clone $this->queryStatement; |
116 | 113 | $this->expression = new HavingExpression($this->queryStatement); |
117 | 114 | } |
@@ -52,8 +52,7 @@ |
||
52 | 52 | * Class Join |
53 | 53 | * @package Platine\Database\Query |
54 | 54 | */ |
55 | -class Join |
|
56 | -{ |
|
55 | +class Join { |
|
57 | 56 | /** |
58 | 57 | * The Join conditions |
59 | 58 | * @var array<int, mixed> |
@@ -52,8 +52,7 @@ discard block |
||
52 | 52 | * Class WhereStatement |
53 | 53 | * @package Platine\Database\Query |
54 | 54 | */ |
55 | -class WhereStatement |
|
56 | -{ |
|
55 | +class WhereStatement { |
|
57 | 56 | /** |
58 | 57 | * The Query statement instance |
59 | 58 | * @var QueryStatement |
@@ -70,8 +69,7 @@ discard block |
||
70 | 69 | * WhereStatement constructor. |
71 | 70 | * @param QueryStatement|null $queryStatement |
72 | 71 | */ |
73 | - public function __construct(QueryStatement $queryStatement = null) |
|
74 | - { |
|
72 | + public function __construct(QueryStatement $queryStatement = null) { |
|
75 | 73 | if ($queryStatement === null) { |
76 | 74 | $queryStatement = new QueryStatement(); |
77 | 75 | } |
@@ -93,8 +91,7 @@ discard block |
||
93 | 91 | * |
94 | 92 | * @return WhereStatement|Where|Select|Delete|Update |
95 | 93 | */ |
96 | - public function where($column, bool $isExpression = false) |
|
97 | - { |
|
94 | + public function where($column, bool $isExpression = false) { |
|
98 | 95 | return $this->addWhereCondition($column, 'AND', $isExpression); |
99 | 96 | } |
100 | 97 | |
@@ -104,8 +101,7 @@ discard block |
||
104 | 101 | * |
105 | 102 | * @return WhereStatement|Where|Select|Delete|Update |
106 | 103 | */ |
107 | - public function orWhere($column, bool $isExpression = false) |
|
108 | - { |
|
104 | + public function orWhere($column, bool $isExpression = false) { |
|
109 | 105 | return $this->addWhereCondition($column, 'OR', $isExpression); |
110 | 106 | } |
111 | 107 | |
@@ -148,8 +144,7 @@ discard block |
||
148 | 144 | /** |
149 | 145 | * @inheritDoc |
150 | 146 | */ |
151 | - public function __clone() |
|
152 | - { |
|
147 | + public function __clone() { |
|
153 | 148 | $this->queryStatement = clone $this->queryStatement; |
154 | 149 | $this->where = new Where($this, $this->queryStatement); |
155 | 150 | } |
@@ -161,8 +156,7 @@ discard block |
||
161 | 156 | * |
162 | 157 | * @return WhereStatement|Where |
163 | 158 | */ |
164 | - protected function addWhereCondition($column, string $separator = 'AND', bool $isExpression = false) |
|
165 | - { |
|
159 | + protected function addWhereCondition($column, string $separator = 'AND', bool $isExpression = false) { |
|
166 | 160 | if (($column instanceof Closure) && !$isExpression) { |
167 | 161 | $this->queryStatement->addWhereGroup($column, $separator); |
168 | 162 |