@@ -91,7 +91,7 @@ |
||
| 91 | 91 | * return the entire session superglobal. mainly for debugging purposes |
| 92 | 92 | * @return mixed |
| 93 | 93 | */ |
| 94 | - public function getAllSessionVars(){ |
|
| 94 | + public function getAllSessionVars() { |
|
| 95 | 95 | return $_SESSION; |
| 96 | 96 | } |
| 97 | 97 | |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | } |
| 37 | 37 | if ($success) { |
| 38 | 38 | $this->alertBox->setAlert('Configuration updates successfully'); |
| 39 | - } else { |
|
| 39 | + }else { |
|
| 40 | 40 | $this->alertBox->setAlert('error in configuration update', 'error'); |
| 41 | 41 | } |
| 42 | 42 | $this->container->getResponse()->redirect('admin/config'); |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | if (!$configModel->updateConfig($update->name, $update->value)) { |
| 39 | 39 | $result['success'] = false; |
| 40 | 40 | $result['errorId'][] = $update->name; |
| 41 | - } else { |
|
| 41 | + }else { |
|
| 42 | 42 | $result['successId'][] = $update->name; |
| 43 | 43 | } |
| 44 | 44 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | { |
| 25 | 25 | $this->session->set('user_role_name', 'Admin'); |
| 26 | 26 | $this->session->set('user_role_level', 2); |
| 27 | - $this->session->set('user_id',1); |
|
| 27 | + $this->session->set('user_id', 1); |
|
| 28 | 28 | $this->alertBox->setAlert('Connected as admin'); |
| 29 | 29 | $this->container->getResponse()->redirect('/admin/'); |
| 30 | 30 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $this->query($sql); |
| 88 | 88 | if ($select != null) { |
| 89 | 89 | foreach ($select as $col => $val) { |
| 90 | - $this->bind(":" . $col, $val); |
|
| 90 | + $this->bind(":".$col, $val); |
|
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | $this->bind(":limit", $limit); |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $this->query($sql); |
| 122 | 122 | if ($select != null) { |
| 123 | 123 | foreach ($select as $col => $val) { |
| 124 | - $this->bind(":" . $col, $val); |
|
| 124 | + $this->bind(":".$col, $val); |
|
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | 127 | $this->execute(); |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | |
| 292 | 292 | $this->execute(); |
| 293 | 293 | |
| 294 | - return (int)$this->dbh->lastInsertId(); |
|
| 294 | + return (int) $this->dbh->lastInsertId(); |
|
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | /** |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | $this->query($sql); |
| 68 | 68 | $this->bind(":tag", $tag); |
| 69 | 69 | $this->execute(); |
| 70 | - return (int)$this->dbh->lastInsertId(); |
|
| 70 | + return (int) $this->dbh->lastInsertId(); |
|
| 71 | 71 | |
| 72 | 72 | } |
| 73 | 73 | |
@@ -23,5 +23,5 @@ |
||
| 23 | 23 | const POSTS_PER_PAGE = 4; |
| 24 | 24 | const LIST_PER_PAGE = 10; |
| 25 | 25 | |
| 26 | - const EXCERPT_WORD_COUNT =50; |
|
| 26 | + const EXCERPT_WORD_COUNT = 50; |
|
| 27 | 27 | } |
| 28 | 28 | \ No newline at end of file |
@@ -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; |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | $table = $reflect->getShortName(); //this is to only get the model name, otherwise we get the full namespace |
| 140 | 140 | //since our models all end with Model, we should remove it. |
| 141 | 141 | $table = $this->removeFromEnd($table, 'Model'); |
| 142 | - $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 | + $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 |
|
| 143 | 143 | $table = strtolower($table); //the database names are in lowercase |
| 144 | 144 | } |
| 145 | 145 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | //if we are here, then table doesn't exist, check for view |
| 165 | - $view = 'v_' . $table; |
|
| 165 | + $view = 'v_'.$table; |
|
| 166 | 166 | $stmt->bindValue(':table', $view, PDO::PARAM_STR); |
| 167 | 167 | $stmt->execute(); |
| 168 | 168 | $exists = $stmt->rowCount() > 0; //will return 1 if table exists or 0 if non existant |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | protected function getTablePrefix($table) |
| 187 | 187 | { |
| 188 | 188 | if (Config::TABLE_PREFIX != '') { |
| 189 | - $table = Config::TABLE_PREFIX . '_' . $table; |
|
| 189 | + $table = Config::TABLE_PREFIX.'_'.$table; |
|
| 190 | 190 | } |
| 191 | 191 | return $table; |
| 192 | 192 | } |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | protected function getRowById($rowId, $table = null) |
| 256 | 256 | { |
| 257 | 257 | $tableName = $this->getTable($table); |
| 258 | - $idName = 'id' . $tableName; |
|
| 258 | + $idName = 'id'.$tableName; |
|
| 259 | 259 | $sql = "SELECT * FROM $tableName WHERE $idName = :rowId"; |
| 260 | 260 | $this->query($sql); |
| 261 | 261 | $this->bind(':rowId', $rowId); |