Completed
Push — master ( e07689...bd6b93 )
by Rougin
02:48
created
src/Driver/CodeIgniterDriver.php 2 patches
Unused Use Statements   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,10 +3,9 @@
 block discarded – undo
3 3
 namespace Rougin\Describe\Driver;
4 4
 
5 5
 use PDO;
6
-use Rougin\Describe\Column;
6
+use Rougin\Describe\Driver\DriverInterface;
7 7
 use Rougin\Describe\Driver\MySQLDriver;
8 8
 use Rougin\Describe\Driver\SQLiteDriver;
9
-use Rougin\Describe\Driver\DriverInterface;
10 9
 
11 10
 /**
12 11
  * CodeIgniter Driver Class
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@
 block discarded – undo
48 48
                 $database = $database[$connection]['database'];
49 49
 
50 50
                 $pdo = new PDO(
51
-                    'mysql:host=' . $database[$connection]['hostname'] .
52
-                    ';dbname=' . $database[$connection]['database'],
51
+                    'mysql:host='.$database[$connection]['hostname'].
52
+                    ';dbname='.$database[$connection]['database'],
53 53
                     $database[$connection]['username'],
54 54
                     $database[$connection]['password']
55 55
                 );
Please login to merge, or discard this patch.
src/Driver/SQLiteDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         $columns = [];
38 38
 
39 39
         $information = $this->pdo->prepare(
40
-            'PRAGMA table_info("' . $table . '");'
40
+            'PRAGMA table_info("'.$table.'");'
41 41
         );
42 42
 
43 43
         $information->execute();
Please login to merge, or discard this patch.
src/Driver/MySQLDriver.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     {
41 41
         $this->columns = [];
42 42
 
43
-        $information = $this->pdo->prepare('DESCRIBE ' . $table);
43
+        $information = $this->pdo->prepare('DESCRIBE '.$table);
44 44
         $information->execute();
45 45
         $information->setFetchMode(PDO::FETCH_OBJ);
46 46
 
@@ -88,15 +88,15 @@  discard block
 block discarded – undo
88 88
                 $column->setDataType($row->Type);
89 89
             }
90 90
 
91
-            $query = 'SELECT COLUMN_NAME as "column",' .
92
-                'REFERENCED_COLUMN_NAME as "referenced_column",' .
93
-                'CONCAT(' .
94
-                    'REFERENCED_TABLE_SCHEMA, ".",' .
95
-                    'REFERENCED_TABLE_NAME' .
96
-                ') as "referenced_table"' .
97
-                'FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE ' .
98
-                'WHERE CONSTRAINT_SCHEMA = "' . $this->database . '" ' .
99
-                'AND TABLE_NAME = "' . $table . '";';
91
+            $query = 'SELECT COLUMN_NAME as "column",'.
92
+                'REFERENCED_COLUMN_NAME as "referenced_column",'.
93
+                'CONCAT('.
94
+                    'REFERENCED_TABLE_SCHEMA, ".",'.
95
+                    'REFERENCED_TABLE_NAME'.
96
+                ') as "referenced_table"'.
97
+                'FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE '.
98
+                'WHERE CONSTRAINT_SCHEMA = "'.$this->database.'" '.
99
+                'AND TABLE_NAME = "'.$table.'";';
100 100
 
101 101
             $foreignTable = $this->pdo->prepare($query);
102 102
             $foreignTable->execute();
Please login to merge, or discard this patch.