Passed
Push — Security_and_bug_fixes ( e32250...a665d5 )
by Stone
04:19 queued 01:50
created
Core/Model.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             $table = $reflect->getShortName(); //this is to only get the model name, otherwise we get the full namespace
160 160
             //since our models all end with Model, we should remove it.
161 161
             $table = $this->removeFromEnd($table, 'Model');
162
-            $table = $table . 's'; //adding the s since the table should be plural. Might be some special case where the plural isn't just with an s
162
+            $table = $table.'s'; //adding the s since the table should be plural. Might be some special case where the plural isn't just with an s
163 163
             $table = strtolower($table); //the database names are in lowercase
164 164
         }
165 165
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         }
183 183
 
184 184
         //if we are here, then table doesn't exist, check for view
185
-        $view = 'v_' . $table;
185
+        $view = 'v_'.$table;
186 186
         $stmt->bindValue(':table', $view, PDO::PARAM_STR);
187 187
         $stmt->execute();
188 188
         $exists = $stmt->rowCount() > 0; //will return 1 if table exists or 0 if non existant
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     protected function getTablePrefix($table)
207 207
     {
208 208
         if (Config::TABLE_PREFIX != '') {
209
-            $table = Config::TABLE_PREFIX . '_' . $table;
209
+            $table = Config::TABLE_PREFIX.'_'.$table;
210 210
         }
211 211
         return $table;
212 212
     }
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
     protected function getRowById($rowId, $table = null)
276 276
     {
277 277
         $tableName = $this->getTable($table);
278
-        $idName = 'id' . str_replace(Config::TABLE_PREFIX."_","",$tableName);
278
+        $idName = 'id'.str_replace(Config::TABLE_PREFIX."_", "", $tableName);
279 279
         $sql = "SELECT * FROM $tableName WHERE $idName = :rowId";
280 280
         $this->query($sql);
281 281
         $this->bind(':rowId', $rowId);
Please login to merge, or discard this patch.