Completed
Branch develop (32cfca)
by Oyebanji Jacob
03:26
created
src/DatabaseConnectionStringFactory.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,9 +22,13 @@
 block discarded – undo
22 22
                 break;
23 23
             case 'mysql':
24 24
             case 'postgres':
25
-                if(strcasecmp($driver, 'postgres') == 0) $driver="pgsql";
25
+                if(strcasecmp($driver, 'postgres') == 0) {
26
+                    $driver="pgsql";
27
+                }
26 28
                 $dsn = $driver.':host='.$config['HOSTNAME'].';dbname='.$config['DBNAME'];
27
-                if(isset($config['PORT'])) $dsn .= ';port='.$config['PORT'];
29
+                if(isset($config['PORT'])) {
30
+                    $dsn .= ';port='.$config['PORT'];
31
+                }
28 32
                 break;
29 33
             default:
30 34
                 throw new DatabaseDriverNotSupportedException;
Please login to merge, or discard this patch.
src/Model.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,7 +114,9 @@  discard block
 block discarded – undo
114 114
         $update = "UPDATE " . $this->getTableName() . " SET " ;
115 115
         foreach ($this->properties as $key => $val) {
116 116
             $count++;
117
-            if(($key == 'id')) continue;
117
+            if(($key == 'id')) {
118
+                continue;
119
+            }
118 120
             $update .= "$key = '$val'";
119 121
             if ($count < count($this->properties) )
120 122
             {
@@ -124,7 +126,9 @@  discard block
 block discarded – undo
124 126
         $update .= " WHERE id = " . $this->properties['id'];
125 127
         $stmt = $connection->prepare($update);
126 128
             foreach ($this->properties as $key => $val) {
127
-                if($key == 'id') continue;
129
+                if($key == 'id') {
130
+                    continue;
131
+                }
128 132
             }
129 133
         $stmt->execute();
130 134
         return $stmt->rowCount();
Please login to merge, or discard this patch.
potatoTest.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -250,7 +250,9 @@  discard block
 block discarded – undo
250 250
         $update = "UPDATE " . $this->getTableName() . " SET " ;
251 251
         foreach ($this->properties as $key => $val) {
252 252
             $count++;
253
-            if(($key == 'id')) continue;
253
+            if(($key == 'id')) {
254
+                continue;
255
+            }
254 256
             $update .= "$key = '$val'";
255 257
             if ($count < count($this->properties) )
256 258
             {
@@ -260,7 +262,9 @@  discard block
 block discarded – undo
260 262
         $update .= " WHERE id = " . $this->properties['id'];
261 263
         $stmt = $connection->prepare($update);
262 264
             foreach ($this->properties as $key => $val) {
263
-                if($key == 'id') continue;
265
+                if($key == 'id') {
266
+                    continue;
267
+                }
264 268
             }
265 269
         $stmt->execute();
266 270
         return $stmt->rowCount();
@@ -395,9 +399,13 @@  discard block
 block discarded – undo
395 399
                 break;
396 400
             case 'mysql':
397 401
             case 'postgres':
398
-                if(strcasecmp($driver, 'postgres') == 0) $driver="pgsql";
402
+                if(strcasecmp($driver, 'postgres') == 0) {
403
+                    $driver="pgsql";
404
+                }
399 405
                 $dsn = $driver.':host='.$config['HOSTNAME'].';dbname='.$config['DBNAME'];
400
-                if(isset($config['PORT'])) $dsn .= ';port='.$config['PORT'];
406
+                if(isset($config['PORT'])) {
407
+                    $dsn .= ';port='.$config['PORT'];
408
+                }
401 409
                 break;
402 410
             default:
403 411
                 throw new DatabaseDriverNotSupportedException;
Please login to merge, or discard this patch.