@@ -101,7 +101,7 @@ |
||
| 101 | 101 | 'adaptar = sqlite', |
| 102 | 102 | ]; |
| 103 | 103 | foreach ($configData as $cfg) { |
| 104 | - fwrite($file, $cfg."\n"); |
|
| 104 | + fwrite($file, $cfg . "\n"); |
|
| 105 | 105 | } |
| 106 | 106 | fclose($file); |
| 107 | 107 | $result = $this->connector->getConfigurations($this->configFile); |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | { |
| 82 | 82 | $columnsString = $this->getColumns($data); |
| 83 | 83 | $count = (int) count($data); |
| 84 | - $sql = "INSERT INTO $table $columnsString VALUES (".$this->putQuesMarks($count).')'; |
|
| 84 | + $sql = "INSERT INTO $table $columnsString VALUES (" . $this->putQuesMarks($count) . ')'; |
|
| 85 | 85 | $statement = $this->connection->prepare($sql); |
| 86 | 86 | $statement == false ? $this->throwFaultyOrNoTableException($table) : ''; |
| 87 | 87 | $this->setBindForInsert($statement, array_values($data)); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | */ |
| 131 | 131 | public function getColumns(array $data) |
| 132 | 132 | { |
| 133 | - return '('.implode(', ', array_keys($data)).')'; |
|
| 133 | + return '(' . implode(', ', array_keys($data)) . ')'; |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | /** |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | $id = (int) $data['id']; // store the id in a variable. |
| 180 | 180 | unset($data['id']); |
| 181 | 181 | $upd = (string) $this->makeModify(array_keys($data)); // genertate the columns for the update statement. |
| 182 | - $sql = "UPDATE {$table} SET ".$upd.' WHERE id = :id_val'; |
|
| 182 | + $sql = "UPDATE {$table} SET " . $upd . ' WHERE id = :id_val'; |
|
| 183 | 183 | $statement = $this->connection->prepare($sql); |
| 184 | 184 | $statement == false ? $this->throwFaultyOrNoTableException($table) : ''; |
| 185 | 185 | $this->setBindForUpdate($statement, $data); |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | { |
| 200 | 200 | $count = count($data); |
| 201 | 201 | foreach ($data as $key => $value) { |
| 202 | - $statement->bindValue(":$key".'_val', $value); |
|
| 202 | + $statement->bindValue(":$key" . '_val', $value); |
|
| 203 | 203 | } |
| 204 | 204 | } |
| 205 | 205 | |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | $count = count($columns); |
| 216 | 216 | $updateString = ''; // Start with an empty string |
| 217 | 217 | foreach ($columns as $column) { |
| 218 | - $updateString .= $column.' = '.':'.$column.'_val, '; |
|
| 218 | + $updateString .= $column . ' = ' . ':' . $column . '_val, '; |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | return $updateString = trim($updateString, ', '); |
@@ -171,7 +171,7 @@ |
||
| 171 | 171 | */ |
| 172 | 172 | public function getConfigFilePath($path = null) |
| 173 | 173 | { |
| 174 | - return $path == null ? __DIR__.'/../config.ini' : $path; |
|
| 174 | + return $path == null ? __DIR__ . '/../config.ini' : $path; |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | /** |