Completed
Pull Request — master (#11)
by Elisha-Wigwe Chijioke
03:32
created
tests/PotatoConnectorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/PotatoQuery.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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, ', ');
Please login to merge, or discard this patch.
src/PotatoConnector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.