@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | * |
264 | 264 | * @see AbstractWhere |
265 | 265 | * |
266 | - * @param string|mixed $joined Joined column or expression. |
|
266 | + * @param string $joined Joined column or expression. |
|
267 | 267 | * @param mixed $variousA Operator or value. |
268 | 268 | * @param mixed $variousB Value, if operator specified. |
269 | 269 | * @param mixed $variousC Required only in between statements. |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | * @param string $joiner Boolean joiner (AND | OR). |
347 | 347 | * @param array $parameters Set of parameters collected from where functions. |
348 | 348 | * @param array $tokens Array to aggregate compiled tokens. Reference. |
349 | - * @param \Closure|null|callable $wrapper Callback or closure used to wrap/collect every |
|
349 | + * @param callable $wrapper Callback or closure used to wrap/collect every |
|
350 | 350 | * potential parameter. |
351 | 351 | * |
352 | 352 | * @throws BuilderException |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | */ |
167 | 167 | public function references(string $table, string $column = 'id'): AbstractReference |
168 | 168 | { |
169 | - $this->foreignTable = $this->table->getPrefix() . $table; |
|
169 | + $this->foreignTable = $this->table->getPrefix().$table; |
|
170 | 170 | $this->foreignKey = $column; |
171 | 171 | |
172 | 172 | return $this; |
@@ -212,10 +212,10 @@ discard block |
||
212 | 212 | $statement[] = 'CONSTRAINT'; |
213 | 213 | $statement[] = $this->getName(true); |
214 | 214 | $statement[] = 'FOREIGN KEY'; |
215 | - $statement[] = '(' . $this->table->getDriver()->identifier($this->column) . ')'; |
|
215 | + $statement[] = '('.$this->table->getDriver()->identifier($this->column).')'; |
|
216 | 216 | |
217 | - $statement[] = 'REFERENCES ' . $this->table->getDriver()->identifier($this->foreignTable); |
|
218 | - $statement[] = '(' . $this->table->getDriver()->identifier($this->foreignKey) . ')'; |
|
217 | + $statement[] = 'REFERENCES '.$this->table->getDriver()->identifier($this->foreignTable); |
|
218 | + $statement[] = '('.$this->table->getDriver()->identifier($this->foreignKey).')'; |
|
219 | 219 | |
220 | 220 | $statement[] = "ON DELETE {$this->deleteRule}"; |
221 | 221 | $statement[] = "ON UPDATE {$this->updateRule}"; |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | */ |
246 | 246 | protected function generateName(): string |
247 | 247 | { |
248 | - $name = $this->table->getName() . '_foreign_' . $this->column . '_' . uniqid(); |
|
248 | + $name = $this->table->getName().'_foreign_'.$this->column.'_'.uniqid(); |
|
249 | 249 | |
250 | 250 | if (strlen($name) > 64) { |
251 | 251 | //Many dbs has limitations on identifier length |
@@ -23,10 +23,10 @@ |
||
23 | 23 | $statement = []; |
24 | 24 | |
25 | 25 | $statement[] = 'FOREIGN KEY'; |
26 | - $statement[] = '(' . $this->table->getDriver()->identifier($this->column) . ')'; |
|
26 | + $statement[] = '('.$this->table->getDriver()->identifier($this->column).')'; |
|
27 | 27 | |
28 | - $statement[] = 'REFERENCES ' . $this->table->getDriver()->identifier($this->foreignTable); |
|
29 | - $statement[] = '(' . $this->table->getDriver()->identifier($this->foreignKey) . ')'; |
|
28 | + $statement[] = 'REFERENCES '.$this->table->getDriver()->identifier($this->foreignTable); |
|
29 | + $statement[] = '('.$this->table->getDriver()->identifier($this->foreignKey).')'; |
|
30 | 30 | |
31 | 31 | $statement[] = "ON DELETE {$this->deleteRule}"; |
32 | 32 | $statement[] = "ON UPDATE {$this->updateRule}"; |