@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->columns = []; |
52 | 52 | |
53 | 53 | try { |
54 | - $information = $this->pdo->prepare('DESCRIBE ' . $tableName); |
|
54 | + $information = $this->pdo->prepare('DESCRIBE '.$tableName); |
|
55 | 55 | |
56 | 56 | $information->execute(); |
57 | 57 | $information->setFetchMode(\PDO::FETCH_OBJ); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | * @param \Rougin\Describe\Column &$column |
123 | 123 | * @return void |
124 | 124 | */ |
125 | - protected function setKey($row, Column &$column) |
|
125 | + protected function setKey($row, Column & $column) |
|
126 | 126 | { |
127 | 127 | switch ($row->Key) { |
128 | 128 | case 'PRI': |
@@ -150,14 +150,14 @@ discard block |
||
150 | 150 | * @param \Rougin\Describe\Column &$column |
151 | 151 | * @return void |
152 | 152 | */ |
153 | - protected function setForeignColumn($tableName, $row, Column &$column) |
|
153 | + protected function setForeignColumn($tableName, $row, Column & $column) |
|
154 | 154 | { |
155 | - $query = 'SELECT COLUMN_NAME as "column",' . |
|
156 | - 'REFERENCED_COLUMN_NAME as "referenced_column",' . |
|
157 | - 'CONCAT(REFERENCED_TABLE_SCHEMA, ".", REFERENCED_TABLE_NAME) as "referenced_table"' . |
|
158 | - 'FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE ' . |
|
159 | - 'WHERE CONSTRAINT_SCHEMA = "' . $this->database . '" ' . |
|
160 | - 'AND TABLE_NAME = "' . $tableName . '";'; |
|
155 | + $query = 'SELECT COLUMN_NAME as "column",'. |
|
156 | + 'REFERENCED_COLUMN_NAME as "referenced_column",'. |
|
157 | + 'CONCAT(REFERENCED_TABLE_SCHEMA, ".", REFERENCED_TABLE_NAME) as "referenced_table"'. |
|
158 | + 'FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE '. |
|
159 | + 'WHERE CONSTRAINT_SCHEMA = "'.$this->database.'" '. |
|
160 | + 'AND TABLE_NAME = "'.$tableName.'";'; |
|
161 | 161 | |
162 | 162 | $foreignTable = $this->pdo->prepare($query); |
163 | 163 | |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | * @param \Rougin\Describe\Column &$column |
182 | 182 | * @return void |
183 | 183 | */ |
184 | - protected function setProperties($row, Column &$column) |
|
184 | + protected function setProperties($row, Column & $column) |
|
185 | 185 | { |
186 | 186 | $null = 'Null'; |
187 | 187 |