@@ -3,14 +3,14 @@ discard block |
||
3 | 3 | |
4 | 4 | use Core\Model; |
5 | 5 | |
6 | -class CategoryModel extends Model{ |
|
6 | +class CategoryModel extends Model { |
|
7 | 7 | |
8 | 8 | /** |
9 | 9 | * get the list of categories and return all the data |
10 | 10 | * @return array the categories |
11 | 11 | * @throws \ReflectionException |
12 | 12 | */ |
13 | - public function getCategories(){ |
|
13 | + public function getCategories() { |
|
14 | 14 | return $this->getResultSet('categories'); |
15 | 15 | } |
16 | 16 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $categories = $this->getCategories(); |
27 | 27 | foreach ($categories as $category) { |
28 | 28 | $data += [ |
29 | - $category->category_name => '/category/' . $category->categories_slug |
|
29 | + $category->category_name => '/category/'.$category->categories_slug |
|
30 | 30 | ]; |
31 | 31 | } |
32 | 32 | return $data; |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | use App\Models\CategoryModel; |
5 | 5 | use Core\AdminController; |
6 | 6 | |
7 | -class Post extends AdminController{ |
|
7 | +class Post extends AdminController { |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * page for new post |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * Shows the post to modify and update |
29 | 29 | * @param $idPost |
30 | 30 | */ |
31 | - public function modify($idPost){ |
|
31 | + public function modify($idPost) { |
|
32 | 32 | $this->onlyAdmin(); |
33 | 33 | |
34 | 34 | } |