Passed
Push — RefactoringPosts ( 744e11...92981d )
by Stone
01:58
created
Core/Dependency/Session.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
App/Controllers/Admin/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
App/Controllers/Ajax/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
App/Controllers/Login.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
App/Controllers/Author.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 use Core\Controller;
8 8
 use Core\Container;
9 9
 
10
-class Author extends Controller{
10
+class Author extends Controller {
11 11
 
12 12
 
13 13
     protected $siteConfig;
Please login to merge, or discard this patch.
App/Controllers/Tag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 use Core\Controller;
7 7
 use Core\Container;
8 8
 
9
-class Tag extends Controller{
9
+class Tag extends Controller {
10 10
 
11 11
     protected $siteConfig;
12 12
     protected $pagination;
Please login to merge, or discard this patch.
App/Models/PostModel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
App/Controllers/Ajax/ImageUpload.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
     private function getFilename(string $folder, string $file):string
44 44
     {
45 45
 
46
-        $fileUrl = $folder . $file;
46
+        $fileUrl = $folder.$file;
47 47
         $docRoot = $this->request->getDocumentRoot();
48 48
         $filePath = $docRoot."/public/".$fileUrl;
49
-        if(file_exists($filePath) !== 1)
49
+        if (file_exists($filePath) !== 1)
50 50
         {
51 51
             $fileNum = 0;
52
-            while(file_exists($filePath))
52
+            while (file_exists($filePath))
53 53
             {
54 54
                 $fileUrl = $folder.$fileNum."_".$file;
55 55
                 $filePath = $docRoot."/public/".$fileUrl;
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
             // Respond to the successful upload with JSON.
78 78
             echo json_encode(array('location' => $filetowrite));
79
-        } else {
79
+        }else {
80 80
             // Notify editor that the upload failed
81 81
             echo json_encode(array('error' => 'Upload failed, file might be too big'));
82 82
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
             // Respond to the successful upload with JSON.
112 112
             echo json_encode(array('location' => $filetowrite));
113
-        } else {
113
+        }else {
114 114
             // Notify editor that the upload failed
115 115
             header("HTTP/1.1 500 Server Error");
116 116
         }
Please login to merge, or discard this patch.
App/Models/UserModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Core\Model;
6 6
 
7
-class UserModel extends Model{
7
+class UserModel extends Model {
8 8
 
9 9
     public function getAuthorDetails(int $authorId)
10 10
     {
Please login to merge, or discard this patch.