Passed
Branch master (7ba29e)
by refat
03:38
created
Core/System/Loader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
   {
118 118
     $controller .= strpos($controller, 'Controller') ? '' : 'Controller';
119 119
 
120
-    $controller = 'App\\Controllers\\'. $controller;
120
+    $controller = 'App\\Controllers\\' . $controller;
121 121
 
122 122
     return $controller;
123 123
   }
Please login to merge, or discard this patch.
Core/System/Paginatio.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     // just to make sure that the passed query string parameter page
64 64
     // must be number and should be more or equal than 1
65 65
 
66
-    if (!is_numeric($page) OR $page < 1) {
66
+    if (!is_numeric($page) or $page < 1) {
67 67
 
68 68
       $page = 1;
69 69
     }
Please login to merge, or discard this patch.
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 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 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'])) return $app->url->redirectTo('404');
13 13
     return $next;
14 14
   }
15 15
 }
Please login to merge, or discard this 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.
App/Controllers/Admin/UsersController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     $gender = $posts['gender'];
322 322
     $birthday = date('Y-m-d', strtotime($posts['birthday']));
323 323
     $email = $posts['email'];
324
-    $registration =  $this->changeFormatDate(microtime(true), ['U.u', 'Y-m-d H:i:s']);
324
+    $registration = $this->changeFormatDate(microtime(true), ['U.u', 'Y-m-d H:i:s']);
325 325
 
326 326
     $insertInUser = $this->db->data([
327 327
       'id' => $user_id,
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 
375 375
   private function isUserNew($date)
376 376
   {
377
-    if (!$date) {return;}
377
+    if (!$date) {return; }
378 378
 
379 379
     $register_year = $this->changeFormatDate($date, ['Y-m-d H:i:s', 'Y']);
380 380
     $register_month = $this->changeFormatDate($date, ['Y-m-d H:i:s', 'm']);
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -215,7 +215,9 @@  discard block
 block discarded – undo
215 215
 
216 216
     $current_value = $this->db->select($name)->from($table)->where($user_id_table_name . ' = ?', [$id])->fetch()->$name;
217 217
 
218
-    if ($value == '') $value = null;
218
+    if ($value == '') {
219
+      $value = null;
220
+    }
219 221
 
220 222
     if (($current_value === strtolower($value)) || ($value == null && $current_value == null)) {
221 223
       $msg['same'] = $value ? strtolower($value) : '';
@@ -246,7 +248,9 @@  discard block
 block discarded – undo
246 248
       return json_encode($msg);
247 249
     }
248 250
 
249
-    if (isset($filters->date)) $value = date('Y-m-d', strtotime($value));
251
+    if (isset($filters->date)) {
252
+      $value = date('Y-m-d', strtotime($value));
253
+    }
250 254
 
251 255
     $update = $this->db->data($name, $value)->where($user_id_table_name . ' = ?', $id)->update($table);
252 256
 
Please login to merge, or discard this patch.
App/Controllers/Admin/LoginController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@
 block discarded – undo
35 35
       return json_encode($msg);
36 36
     }
37 37
 
38
-    $username =  $this->request->post('username');
39
-    $password =  $this->request->post('password');
38
+    $username = $this->request->post('username');
39
+    $password = $this->request->post('password');
40 40
     $remember = false;
41 41
 
42 42
     if (in_array('remeberme', array_keys($posts))) {
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.