@@ -34,7 +34,7 @@ |
||
34 | 34 | $categories = $categoryModel->getCategories(); |
35 | 35 | foreach ($categories as $category) { |
36 | 36 | $data += [ |
37 | - $category->category_name => '/category/posts/' . $category->categories_slug |
|
37 | + $category->category_name => '/category/posts/'.$category->categories_slug |
|
38 | 38 | ]; |
39 | 39 | } |
40 | 40 | return $data; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $table = $reflect->getShortName(); //this is to only get the model name, otherwise we get the full namespace |
139 | 139 | //since our models all end with Model, we should remove it. |
140 | 140 | $table = $this->removeFromEnd($table, 'Model'); |
141 | - $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 |
|
141 | + $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 |
|
142 | 142 | $table = strtolower($table); //the database names are in lowercase |
143 | 143 | } |
144 | 144 | |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | //if we are here, then table doesn't exist, check for view |
164 | - $view = 'v_' . $table; |
|
164 | + $view = 'v_'.$table; |
|
165 | 165 | $stmt->bindValue(':table', $view, PDO::PARAM_STR); |
166 | 166 | $stmt->execute(); |
167 | 167 | $exists = $stmt->rowCount() > 0; //will return 1 if table exists or 0 if non existant |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | protected function getTablePrefix($table) |
186 | 186 | { |
187 | 187 | if (Config::TABLE_PREFIX != '') { |
188 | - $table = Config::TABLE_PREFIX . '_' . $table; |
|
188 | + $table = Config::TABLE_PREFIX.'_'.$table; |
|
189 | 189 | } |
190 | 190 | return $table; |
191 | 191 | } |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | protected function getRowById($rowId, $table = null) |
255 | 255 | { |
256 | 256 | $tableName = $this->getTable($table); |
257 | - $idName = 'id' . $tableName; |
|
257 | + $idName = 'id'.$tableName; |
|
258 | 258 | $sql = "SELECT * FROM $tableName WHERE $idName = :rowId"; |
259 | 259 | $this->query($sql); |
260 | 260 | $this->bind(':rowId', $rowId); |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | protected function getRowBySlug(String $slug, $table = null): array |
299 | 299 | { |
300 | 300 | $tableName = $this->getTable($table); |
301 | - $slugName = $tableName . '_slug'; |
|
301 | + $slugName = $tableName.'_slug'; |
|
302 | 302 | $sql = "SELECT * FROM $tableName WHERE $slugName = :slug"; |
303 | 303 | $this->query($sql); |
304 | 304 | $this->bind(':slug', $slug); |