@@ -164,7 +164,7 @@ |
||
164 | 164 | */ |
165 | 165 | public function setName($name) |
166 | 166 | { |
167 | - parent::setName($this->prefix . $name); |
|
167 | + parent::setName($this->prefix.$name); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | /** |
@@ -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}"; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * |
83 | 83 | * @param int $expiration Current expiration time value in seconds (reference). |
84 | 84 | */ |
85 | - public function get(string $name, int &$expiration = null) |
|
85 | + public function get(string $name, int & $expiration = null) |
|
86 | 86 | { |
87 | 87 | if (!$this->files->exists($filename = $this->makeFilename($name))) { |
88 | 88 | return null; |
@@ -179,6 +179,6 @@ discard block |
||
179 | 179 | */ |
180 | 180 | protected function makeFilename(string $name): string |
181 | 181 | { |
182 | - return $this->directory . md5($name) . '.' . $this->extension; |
|
182 | + return $this->directory.md5($name).'.'.$this->extension; |
|
183 | 183 | } |
184 | 184 | } |