Passed
Branch master (7ba29e)
by refat
03:38
created
App/Models/LoginModel.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,9 @@
 block discarded – undo
42 42
 
43 43
     $user = $this->where('code = ? ', $code)->fetch($this->table);
44 44
 
45
-    if (!$user) return false;
45
+    if (!$user) {
46
+      return false;
47
+    }
46 48
 
47 49
     $this->user = $user;
48 50
 
Please login to merge, or discard this patch.
App/Models/UserModel.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,8 @@
 block discarded – undo
82 82
     ', $this->table, [['address', 'id', 'user_id'], ['activity', 'id', 'user_id']])->where($sql, $wheres)->orderBy('users.registration', 'DESC')->fetchAll();
83 83
   }
84 84
 
85
-  public function insert() {
85
+  public function insert()
86
+  {
86 87
 
87 88
   }
88 89
 }
Please login to merge, or discard this patch.
App/Middlewares/AuthenticateMiddleware.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,9 +23,13 @@
 block discarded – undo
23 23
     ];
24 24
 
25 25
     if ($login->isLogged()) {
26
-      if (in_array($request, $pagesWhenLogout)) return $app->url->redirectTo('/admin');
26
+      if (in_array($request, $pagesWhenLogout)) {
27
+        return $app->url->redirectTo('/admin');
28
+      }
27 29
     } else {
28
-      if (!in_array($request, $pagesWhenLogout)) return $app->url->redirectTo('/admin/login');
30
+      if (!in_array($request, $pagesWhenLogout)) {
31
+        return $app->url->redirectTo('/admin/login');
32
+      }
29 33
     }
30 34
     return $next;
31 35
   }
Please login to merge, or discard this patch.
App/Middlewares/AjaxMiddleware.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,9 @@
 block discarded – undo
9 9
 {
10 10
   public function handle(Application $app, $next)
11 11
   {
12
-    if(empty($_SERVER['HTTP_X_REQUESTED_WITH'])) return $app->url->redirectTo('404');
12
+    if(empty($_SERVER['HTTP_X_REQUESTED_WITH'])) {
13
+      return $app->url->redirectTo('404');
14
+    }
13 15
     return $next;
14 16
   }
15 17
 }
Please login to merge, or discard this patch.
routes/website/index.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,9 @@
 block discarded – undo
33 33
 $app->pages->add('not found', '/404', 'fas fa-times');
34 34
 
35 35
 // == Website's routes
36
-if ($app->request->isRequestToAdminManagement()) return;
36
+if ($app->request->isRequestToAdminManagement()) {
37
+  return;
38
+}
37 39
 
38 40
 $app->route->add('/', 'Website/Home');
39 41
 $app->route->add('/home', 'Website/Home', 'GET');
Please login to merge, or discard this patch.
routes/admin/index.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,9 @@
 block discarded – undo
2 2
 
3 3
 $app = app();
4 4
 
5
-if (!$app->request->isRequestToAdminManagement()) return;
5
+if (!$app->request->isRequestToAdminManagement()) {
6
+  return;
7
+}
6 8
 // Rotes admins
7 9
 
8 10
 $adminOptions = [
Please login to merge, or discard this patch.
Core/System/Cookie.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,9 @@
 block discarded – undo
98 98
    */
99 99
   public function destroy()
100 100
   {
101
-    foreach (array_keys($this->all()) as $key) $this->remove($key);
101
+    foreach (array_keys($this->all()) as $key) {
102
+      $this->remove($key);
103
+    }
102 104
     unset($_COOKIE);
103 105
   }
104 106
 }
Please login to merge, or discard this patch.
Core/System/View.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,9 @@
 block discarded – undo
103 103
     $public = assets();
104 104
     $public = str_replace($dir, $host, $public);
105 105
     $public = str_replace('\\', '/', $public);
106
-    if (substr($public, -1) !== '/') $public = $public . '/';
106
+    if (substr($public, -1) !== '/') {
107
+      $public = $public . '/';
108
+    }
107 109
 
108 110
     return $public;
109 111
   }
Please login to merge, or discard this patch.
Core/System/Session.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,9 @@
 block discarded – undo
28 28
   {
29 29
     ini_set('session.use_only_cookies', 1);
30 30
 
31
-    if (! session_id()) session_start();
31
+    if (! session_id()) {
32
+      session_start();
33
+    }
32 34
   }
33 35
 
34 36
   /**
Please login to merge, or discard this patch.