Passed
Pull Request — master (#7)
by Kris
02:47
created
lib/Query/QueryBuilder.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function escape(string $str): string
113 113
     {
114
-       return $this->driver->escape($str);
114
+        return $this->driver->escape($str);
115 115
     }
116 116
 
117 117
     /**
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      */
189 189
     public function prepare()
190 190
     {
191
-         try {
191
+            try {
192 192
             // prepare is in a try catch block because sqlite for example could raise 
193 193
             // an exception when prepareing the statement (with invalid table name for example)
194 194
             // when mysql and postres wont. 
@@ -253,9 +253,9 @@  discard block
 block discarded – undo
253 253
         try {
254 254
             // prepare bind execute
255 255
             if (!isset($this->pdoStatement)){
256
-               if (!$this->prepare()){
257
-                   return false;
258
-               }
256
+                if (!$this->prepare()){
257
+                    return false;
258
+                }
259 259
             }
260 260
             $this->bindValues();
261 261
             return $this->pdoStatement ? $this->pdoStatement->execute() : false;
Please login to merge, or discard this patch.
lib/Query/CreateTable.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function column()
105 105
     {
106
-       $this->columns[] = func_get_args();
107
-       return $this;
106
+        $this->columns[] = func_get_args();
107
+        return $this;
108 108
     }
109 109
      
110 110
     /**
@@ -122,15 +122,15 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public function fk(string $fkName, string $srcColumn, string $refTable, string $refColumn, ?string $onUpdate = 'CASCADE', ?string $onDelete = 'RESTRICT')
124 124
     {
125
-       $this->foreignKeys[] = array(
125
+        $this->foreignKeys[] = array(
126 126
             'name'          => $fkName,
127 127
             'src_column'    => $srcColumn,
128 128
             'ref_table'     => $refTable,
129 129
             'ref_column'    => $refColumn,
130 130
             'on_update'     => $onUpdate,
131 131
             'on_delete'     => $onDelete
132
-       );
133
-       return $this;
132
+        );
133
+        return $this;
134 134
     }
135 135
 
136 136
     /**
@@ -233,11 +233,11 @@  discard block
 block discarded – undo
233 233
             // PK ?, UNIQUE ?, NULL? (PK cannot be null), DEFAULT?
234 234
             // AI is handle with sqltype
235 235
             $result[] = trim(implode(' ', [$sqlName, 
236
-                                           $sqlType, 
237
-                                           $isPk ? 'NOT NULL' : $sqlConstraintNullable,
238
-                                           $isPk ? 'PRIMARY KEY' : '',
239
-                                           $sqlConstraintUnique,
240
-                                           $sqlDefault]));
236
+                                            $sqlType, 
237
+                                            $isPk ? 'NOT NULL' : $sqlConstraintNullable,
238
+                                            $isPk ? 'PRIMARY KEY' : '',
239
+                                            $sqlConstraintUnique,
240
+                                            $sqlDefault]));
241 241
         }
242 242
 
243 243
         // FK CONSTRANT
Please login to merge, or discard this patch.
lib/Table.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -170,8 +170,8 @@
 block discarded – undo
170 170
      */
171 171
     public function rename(string $newName): bool
172 172
     {
173
-       $result = $this->database->renameTable($this->name, $newName);
174
-       if ($result){
173
+        $result = $this->database->renameTable($this->name, $newName);
174
+        if ($result){
175 175
             $this->name = $newName;
176 176
         }
177 177
         return $result;
Please login to merge, or discard this patch.
lib/Server.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
  *
27 27
  * Represents a connection to SQL database server
28 28
  */
29
- class Server extends Datasource
29
+    class Server extends Datasource
30 30
 {
31 31
     /**
32 32
      * @access protected
Please login to merge, or discard this patch.