Passed
Push — Accessing-and-setting-the-site... ( 1806ac...503345 )
by Stone
02:37
created
App/Models/IncludesModel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@
 block discarded – undo
22 22
         $data = [];
23 23
         //get the categories from database
24 24
         $categories = $this->getResultSet('categories');
25
-        foreach ( $categories as $category) {
26
-            $data +=[
25
+        foreach ($categories as $category) {
26
+            $data += [
27 27
                 $category->category_name => '/category/'.$category->categories_slug
28 28
             ];
29 29
         }
Please login to merge, or discard this patch.
App/Controllers/Debug.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Core\Controller;
6 6
 
7 7
 class Debug extends Controller {
8
-    public function index(){
8
+    public function index() {
9 9
 
10 10
     }
11 11
 }
12 12
\ No newline at end of file
Please login to merge, or discard this patch.
Core/Container.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
         $twigOptions = [];
48 48
         if (!Config::DEV_ENVIRONMENT) {
49 49
             $twigOptions = [
50
-                'cache' => dirname(__DIR__) . '/Cache'
50
+                'cache' => dirname(__DIR__).'/Cache'
51 51
             ];
52 52
         }
53
-        $loader = new \Twig_Loader_Filesystem(dirname(__DIR__) . '/App/Views');
53
+        $loader = new \Twig_Loader_Filesystem(dirname(__DIR__).'/App/Views');
54 54
         $twig = new \Twig_Environment($loader, $twigOptions);
55 55
 
56 56
         return $twig;
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
         if ($this->dbh) {
66 66
             return $this->dbh;
67 67
         }
68
-        $dsn = "mysql:host=" . Config::DB_HOST . ";dbname=" . Config::DB_NAME . ";charset=utf8"; //Creating the Data Source name
68
+        $dsn = "mysql:host=".Config::DB_HOST.";dbname=".Config::DB_NAME.";charset=utf8"; //Creating the Data Source name
69 69
         $opt = [
70 70
             PDO::ATTR_PERSISTENT => true,
71 71
             PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
72 72
             PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ
73 73
         ];
74
-        $this->dbh = new PDO($dsn, Config::DB_USER, Config::DB_PASSWORD, $opt);;
74
+        $this->dbh = new PDO($dsn, Config::DB_USER, Config::DB_PASSWORD, $opt); ;
75 75
         return $this->dbh;
76 76
     }
77 77
 
Please login to merge, or discard this patch.
Core/AdminController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
 
25 25
     }
26 26
 
27
-    protected function onlyAdmin(){
28
-        if(!$this->auth->isAdmin()){
27
+    protected function onlyAdmin() {
28
+        if (!$this->auth->isAdmin()) {
29 29
             $this->alertBox->setAlert("Only admins can access this", 'error');
30 30
             $this->container->getResponse()->redirect('/admin');
31 31
         }
Please login to merge, or discard this patch.