Completed
Pull Request — master (#5)
by Rougin
02:15
created
src/Describe.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
         $result = $this;
112 112
 
113 113
         if (method_exists($this, $method)) {
114
-            $result = call_user_func_array([ $this, $method ], $parameters);
114
+            $result = call_user_func_array([$this, $method], $parameters);
115 115
         }
116 116
 
117 117
         return $result;
Please login to merge, or discard this patch.
src/Driver/SQLiteDriver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function getColumns($tableName)
44 44
     {
45
-        return $this->getColumnsFromQuery($tableName, 'PRAGMA table_info("' . $tableName . '");');
45
+        return $this->getColumnsFromQuery($tableName, 'PRAGMA table_info("'.$tableName.'");');
46 46
     }
47 47
 
48 48
     /**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     protected function setForeignColumn($tableName, Column $column)
124 124
     {
125
-        $query = $this->pdo->prepare('PRAGMA foreign_key_list("' . $tableName . '");');
125
+        $query = $this->pdo->prepare('PRAGMA foreign_key_list("'.$tableName.'");');
126 126
 
127 127
         $query->execute();
128 128
         $query->setFetchMode(\PDO::FETCH_OBJ);
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     protected function setProperties($row, Column $column)
150 150
     {
151
-        if (! $row->notnull) {
151
+        if ( ! $row->notnull) {
152 152
             $column->setNull(true);
153 153
         }
154 154
 
Please login to merge, or discard this patch.
src/Column.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -211,8 +211,8 @@  discard block
 block discarded – undo
211 211
      */
212 212
     public function setDataType($dataType)
213 213
     {
214
-        $dataTypes = [ 'integer', 'string', 'string' ];
215
-        $shortHand = [ 'int', 'varchar', 'text' ];
214
+        $dataTypes = ['integer', 'string', 'string'];
215
+        $shortHand = ['int', 'varchar', 'text'];
216 216
 
217 217
         $index = array_search($dataType, $shortHand);
218 218
 
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
         $method = \Doctrine\Common\Inflector\Inflector::camelize($method);
352 352
 
353 353
         if (method_exists($this, $method)) {
354
-            return call_user_func_array([ $this, $method ], $parameters);
354
+            return call_user_func_array([$this, $method], $parameters);
355 355
         }
356 356
 
357 357
         return $this;
Please login to merge, or discard this patch.
src/Driver/MySQLDriver.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public function getColumns($tableName)
46 46
     {
47
-        return $this->getColumnsFromQuery($tableName, 'DESCRIBE ' . $tableName);
47
+        return $this->getColumnsFromQuery($tableName, 'DESCRIBE '.$tableName);
48 48
     }
49 49
 
50 50
     /**
@@ -159,18 +159,18 @@  discard block
 block discarded – undo
159 159
      */
160 160
     protected function setForeignColumn($tableName, $row, Column $column)
161 161
     {
162
-        $query = 'SELECT COLUMN_NAME as "column", REFERENCED_COLUMN_NAME as "referenced_column",' .
163
-            'CONCAT(REFERENCED_TABLE_SCHEMA, ".", REFERENCED_TABLE_NAME) as "referenced_table"' .
164
-            'FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE ' .
165
-            'WHERE CONSTRAINT_SCHEMA = "' . $this->database . '" ' .
166
-            'AND TABLE_NAME = "' . $tableName . '";';
162
+        $query = 'SELECT COLUMN_NAME as "column", REFERENCED_COLUMN_NAME as "referenced_column",'.
163
+            'CONCAT(REFERENCED_TABLE_SCHEMA, ".", REFERENCED_TABLE_NAME) as "referenced_table"'.
164
+            'FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE '.
165
+            'WHERE CONSTRAINT_SCHEMA = "'.$this->database.'" '.
166
+            'AND TABLE_NAME = "'.$tableName.'";';
167 167
 
168 168
         $statement = $this->pdo->prepare($query);
169 169
 
170 170
         $statement->execute();
171 171
         $statement->setFetchMode(\PDO::FETCH_OBJ);
172 172
 
173
-        $callback = function ($item) use ($row) {
173
+        $callback = function($item) use ($row) {
174 174
             return $item->column == $row->Field;
175 175
         };
176 176
 
Please login to merge, or discard this patch.