Completed
Pull Request — master (#4)
by Rougin
02:39
created
src/Driver/MySQLDriver.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $this->columns = [];
52 52
 
53
-        $this->getQuery($tableName, 'DESCRIBE ' . $tableName);
53
+        $this->getQuery($tableName, 'DESCRIBE '.$tableName);
54 54
 
55 55
         return $this->columns;
56 56
     }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @param  \Rougin\Describe\Column &$column
112 112
      * @return void
113 113
      */
114
-    protected function setKey($row, Column &$column)
114
+    protected function setKey($row, Column & $column)
115 115
     {
116 116
         switch ($row->Key) {
117 117
             case 'PRI':
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
      * @param  \Rougin\Describe\Column &$column
140 140
      * @return void
141 141
      */
142
-    protected function setForeignColumn($tableName, $row, Column &$column)
142
+    protected function setForeignColumn($tableName, $row, Column & $column)
143 143
     {
144
-        $query = 'SELECT COLUMN_NAME as "column",' .
145
-            'REFERENCED_COLUMN_NAME as "referenced_column",' .
146
-            'CONCAT(REFERENCED_TABLE_SCHEMA, ".", REFERENCED_TABLE_NAME) as "referenced_table"' .
147
-            'FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE ' .
148
-            'WHERE CONSTRAINT_SCHEMA = "' . $this->database . '" ' .
149
-            'AND TABLE_NAME = "' . $tableName . '";';
144
+        $query = 'SELECT COLUMN_NAME as "column",'.
145
+            'REFERENCED_COLUMN_NAME as "referenced_column",'.
146
+            'CONCAT(REFERENCED_TABLE_SCHEMA, ".", REFERENCED_TABLE_NAME) as "referenced_table"'.
147
+            'FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE '.
148
+            'WHERE CONSTRAINT_SCHEMA = "'.$this->database.'" '.
149
+            'AND TABLE_NAME = "'.$tableName.'";';
150 150
 
151 151
         $foreignTable = $this->pdo->prepare($query);
152 152
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      * @param  \Rougin\Describe\Column &$column
171 171
      * @return void
172 172
      */
173
-    protected function setProperties($row, Column &$column)
173
+    protected function setProperties($row, Column & $column)
174 174
     {
175 175
         $null = 'Null';
176 176
 
Please login to merge, or discard this patch.
src/Driver/SQLiteDriver.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     {
44 44
         $this->columns = [];
45 45
 
46
-        $this->getQuery($tableName, 'PRAGMA table_info("' . $tableName . '");');
46
+        $this->getQuery($tableName, 'PRAGMA table_info("'.$tableName.'");');
47 47
 
48 48
         return $this->columns;
49 49
     }
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
      * @param  \Rougin\Describe\Column &$column
101 101
      * @return void
102 102
      */
103
-    protected function setForeignColumn($tableName, Column &$column)
103
+    protected function setForeignColumn($tableName, Column & $column)
104 104
     {
105
-        $query = $this->pdo->prepare('PRAGMA foreign_key_list("' . $tableName . '");');
105
+        $query = $this->pdo->prepare('PRAGMA foreign_key_list("'.$tableName.'");');
106 106
 
107 107
         $query->execute();
108 108
         $query->setFetchMode(\PDO::FETCH_OBJ);
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
      * @param  \Rougin\Describe\Column &$column
125 125
      * @return void
126 126
      */
127
-    protected function setProperties($row, Column &$column)
127
+    protected function setProperties($row, Column & $column)
128 128
     {
129
-        if (! $row->notnull) {
129
+        if ( ! $row->notnull) {
130 130
             $column->setNull(true);
131 131
         }
132 132
 
Please login to merge, or discard this patch.