Passed
Push — Auth ( 9ea218...52ac6b )
by Stone
02:22
created
App/Modules/SiteConfig.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $categories = $categoryModel->getCategories();
51 51
         foreach ($categories as $category) {
52 52
             $data += [
53
-                $category->category_name => '/category/posts/' . $category->categories_slug
53
+                $category->category_name => '/category/posts/'.$category->categories_slug
54 54
             ];
55 55
         }
56 56
         return $data;
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
         $session = $this->container->getSession();
69 69
 
70 70
         $userToken = $cookie->getCookie("rememberMe");
71
-        if($userToken && $this->isHexa($userToken))
71
+        if ($userToken && $this->isHexa($userToken))
72 72
         {
73 73
             //we have a rememberMe Hash, login
74 74
             $rememberedLogin = $rememberedLoginModel->findByToken($userToken);
75
-            if($rememberedLogin){
75
+            if ($rememberedLogin) {
76 76
                 //we have a hash, login
77 77
                 $user = $userModel->getUserDetailsById($rememberedLogin->users_idusers);
78 78
                 $session->regenerateSessionId(); //regenerate the ID to avoid session ghosting
Please login to merge, or discard this patch.
Core/Traits/StringFunctions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         //Searching for the page break tag
85 85
         $breakTagPosition = strpos($text, "<!-- EndOfExcerptBlogOc -->");
86
-        if($breakTagPosition > 0){
86
+        if ($breakTagPosition > 0) {
87 87
             return $this->completeDom(substr($text, 0, $breakTagPosition));
88 88
         }
89 89
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $string = preg_split('/(<img[^>]+\>)|(<p[^>]+\>)|(<span[^>]+\>)|\s/', $text, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
92 92
 
93 93
         //The preg split can return false, probably will never happen but just in case.
94
-        if(!$string)
94
+        if (!$string)
95 95
         {
96 96
             throw new \Error("excerpt generation failed");
97 97
         }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             $trimed .= $string[$wordCounter];
105 105
             if ($wordCounter < $count - 1) {
106 106
                 $trimed .= " ";
107
-            } else {
107
+            }else {
108 108
                 $trimed .= "[...]";
109 109
             }
110 110
         }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         $result = true;
156 156
         foreach ($strings as $string)
157 157
         {
158
-            if(!$this->isAlphaNum($string))
158
+            if (!$this->isAlphaNum($string))
159 159
             {
160 160
                 $result = false;
161 161
             }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function isHexa(string $string)
172 172
     {
173
-        return preg_match("/[\da-f]/",$string);
173
+        return preg_match("/[\da-f]/", $string);
174 174
     }
175 175
 
176 176
     public function isInt($int)
Please login to merge, or discard this patch.