Passed
Push — RefactoringPosts ( 524f9b...ccb44d )
by Stone
02:19
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.
Core/Traits/StringFunctions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         //Searching for the page break tag
86 86
         $breakTagPosition = strpos($text, "<!-- EndOfExcerptBlogOc -->");
87
-        if($breakTagPosition > 0){
87
+        if ($breakTagPosition > 0) {
88 88
             return $this->completeDom(substr($text, 0, $breakTagPosition));
89 89
         }
90 90
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $string = preg_split('/(<img[^>]+\>)|(<p[^>]+\>)|(<span[^>]+\>)|\s/', $text, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
93 93
 
94 94
         //The preg split can return false, probably will never happen but just in case.
95
-        if(!$string)
95
+        if (!$string)
96 96
         {
97 97
             throw new \Error("excerpt generation failed");
98 98
         }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             $trimed .= $string[$wordCounter];
106 106
             if ($wordCounter < $count - 1) {
107 107
                 $trimed .= " ";
108
-            } else {
108
+            }else {
109 109
                 $trimed .= "[...]";
110 110
             }
111 111
         }
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.