@@ -22,9 +22,13 @@ |
||
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; |
@@ -116,7 +116,9 @@ |
||
116 | 116 | $bindNameParameters = []; |
117 | 117 | $sqlUpdate = "UPDATE " . $this->getTableName() . " SET " ; |
118 | 118 | foreach ($this->properties as $columnName => $columnValue) { |
119 | - if($key == 'id') continue; |
|
119 | + if($key == 'id') { |
|
120 | + continue; |
|
121 | + } |
|
120 | 122 | $bindColumnName = ':' . $columnName; |
121 | 123 | $sqlUpdate .= "$columnName = $bindColumnName,"; |
122 | 124 | $bindNameParameters[$bindColumnName] = $columnValue |