@@ -16,9 +16,9 @@ |
||
| 16 | 16 | { |
| 17 | 17 | $this->useDbEnv(); |
| 18 | 18 | |
| 19 | - $dsn = 'mysql:host='.$this->_host; |
|
| 20 | - $dsn .= (isset($this->_port)) ? ';port='.$this->_port : ''; |
|
| 21 | - $dsn .= ';dbname='.$this->_database; |
|
| 19 | + $dsn = 'mysql:host=' . $this->_host; |
|
| 20 | + $dsn .= (isset($this->_port)) ? ';port=' . $this->_port : ''; |
|
| 21 | + $dsn .= ';dbname=' . $this->_database; |
|
| 22 | 22 | |
| 23 | 23 | try { |
| 24 | 24 | $this->_pdo = new PDO($dsn, $this->_username, $this->_password); |
@@ -16,11 +16,11 @@ |
||
| 16 | 16 | { |
| 17 | 17 | $this->useDbEnv(); |
| 18 | 18 | |
| 19 | - $dsn = 'pgsql:host='.$this->_host; |
|
| 20 | - $dsn .= (isset($this->_port)) ? ';port='.$this->_port : ''; |
|
| 21 | - $dsn .= ';dbname='.$this->_database; |
|
| 22 | - $dsn .= ';user='.$this->_username; |
|
| 23 | - $dsn .= ';password='.$this->_password; |
|
| 19 | + $dsn = 'pgsql:host=' . $this->_host; |
|
| 20 | + $dsn .= (isset($this->_port)) ? ';port=' . $this->_port : ''; |
|
| 21 | + $dsn .= ';dbname=' . $this->_database; |
|
| 22 | + $dsn .= ';user=' . $this->_username; |
|
| 23 | + $dsn .= ';password=' . $this->_password; |
|
| 24 | 24 | |
| 25 | 25 | try { |
| 26 | 26 | $this->_pdo = new PDO($dsn); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | if (is_null($table)) { |
| 49 | - $this->setTable(get_class($this).'-table'); |
|
| 49 | + $this->setTable(get_class($this) . '-table'); |
|
| 50 | 50 | } else { |
| 51 | 51 | $this->setTable($table); |
| 52 | 52 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public function __set($property, $value) |
| 74 | 74 | { |
| 75 | - if (! is_scalar($value)) |
|
| 75 | + if (!is_scalar($value)) |
|
| 76 | 76 | { |
| 77 | 77 | throw new Exception("Error Processing Request", 1); |
| 78 | 78 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $hasAttributes = false; |
| 126 | 126 | |
| 127 | 127 | foreach ($this->_attributes as $key => $value) { |
| 128 | - if (! is_null($value)) { |
|
| 128 | + if (!is_null($value)) { |
|
| 129 | 129 | $hasAttributes = true; |
| 130 | 130 | } |
| 131 | 131 | } |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | throw new Exception("Error Processing Request", 1); |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | - if (! $this->hasAttributes()) { |
|
| 150 | + if (!$this->hasAttributes()) { |
|
| 151 | 151 | throw new Exception("Error Processing Request", 1); |
| 152 | 152 | } |
| 153 | 153 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | $this->_table = $table; |
| 177 | 177 | |
| 178 | 178 | $columns = $this->_connection->getColumns($table); |
| 179 | - for ($i=0; $i < count($columns); $i++) { |
|
| 179 | + for ($i = 0; $i < count($columns); $i++) { |
|
| 180 | 180 | array_push($this->_attributes, $columns[i][key($columns[i])]); |
| 181 | 181 | } |
| 182 | 182 | |