Passed
Push — master ( 2f1a4c...b86d82 )
by refat
04:28
created
routes/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     'middleware' => ['admin']
28 28
 ];
29 29
 
30
-$app->route->group($adminOptions, function ($route) {
30
+$app->route->group($adminOptions, function($route) {
31 31
 
32 32
     $route->add('/', 'Home');
33 33
 
Please login to merge, or discard this patch.
App/Models/LoginModel.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function isValidLogin($email, $password)
14 14
     {
15
-        $user = $this->where('email=?' , $email)->fetch($this->table);
15
+        $user = $this->where('email=?', $email)->fetch($this->table);
16 16
 
17
-        if (! $user) return false;
17
+        if (!$user) return false;
18 18
 
19 19
         $this->user = $user;
20 20
 
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
             return false;
42 42
         }
43 43
 
44
-        $user = $this->where('code=?' , $code)->fetch($this->table);
44
+        $user = $this->where('code=?', $code)->fetch($this->table);
45 45
 
46
-        if (! $user) return false;
46
+        if (!$user) return false;
47 47
         
48 48
         $this->user = $user;
49 49
 
Please login to merge, or discard this patch.
App/Models/UsersGroupsModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
             $userGroup->pages = [];
20 20
     
21
-            foreach($userGroupInfos as $userGroupInfo) {
21
+            foreach ($userGroupInfos as $userGroupInfo) {
22 22
             
23 23
                 $userGroup->pages[] = $userGroupInfo->page;
24 24
             }
Please login to merge, or discard this patch.
App/Models/SettingsModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
     public function loadAll()
14 14
     {
15
-        foreach($this->all() as $setting) {
15
+        foreach ($this->all() as $setting) {
16 16
 
17 17
             $this->settings[$setting->key] = $setting->value;
18 18
         }
Please login to merge, or discard this patch.
App/Middleware/Admin/AuthenticateMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
     } else {
28 28
 
29
-      if (! in_array($request, $pagesWhenLogout)) $app->url->redirectTo('/');
29
+      if (!in_array($request, $pagesWhenLogout)) $app->url->redirectTo('/');
30 30
     }
31 31
 
32 32
     return $next;
Please login to merge, or discard this patch.
App/Middleware/Admin/RedirectMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     public function handle(Application $app, $next)
11 11
     {
12 12
 
13
-       if (! $this->session->has('error') || $this->session->get('error') != true) {
13
+       if (!$this->session->has('error') || $this->session->get('error') != true) {
14 14
 
15 15
             $this->url->redirectTo('/');
16 16
 
Please login to merge, or discard this patch.
Core/System/Session.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
   {
16 16
     ini_set('session.use_only_cookies', 1);
17 17
 
18
-    if (! session_id()) {
18
+    if (!session_id()) {
19 19
       session_start();
20 20
     }
21 21
   }
Please login to merge, or discard this patch.
Core/System/Cookie.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     setcookie($key, $value, $expireTime, $this->path, '', false, true);
23 23
   }
24 24
 
25
-  public function get($key , $default = null)
25
+  public function get($key, $default = null)
26 26
   {
27 27
     return array_get($_COOKIE, $key, $default);
28 28
   }
Please login to merge, or discard this patch.
Core/System/Model.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
 
36 36
   public function get($value, $coulmn = 'id')
37 37
   {
38
-    return $this->where($coulmn . ' = ?' , $value)->fetch($this->table);
38
+    return $this->where($coulmn . ' = ?', $value)->fetch($this->table);
39 39
   }
40 40
 
41 41
   public function getEnable($value, $coulmn = 'id')
42 42
   {
43
-    return $this->where($coulmn . ' = ? AND enable = ?' , [$value, 1])->fetch($this->table);
43
+    return $this->where($coulmn . ' = ? AND enable = ?', [$value, 1])->fetch($this->table);
44 44
   }
45 45
 
46 46
   public function selectTable($coulmn)
@@ -50,23 +50,23 @@  discard block
 block discarded – undo
50 50
 
51 51
   public function exists($value, $key = 'id')
52 52
   {
53
-    return (bool) $this->select($key)->where($key .'=?' , $value)->fetch($this->table);
53
+    return (bool) $this->select($key)->where($key . '=?', $value)->fetch($this->table);
54 54
   }
55 55
 
56 56
   public function delete($id)
57 57
   {
58
-    return $this->where('id = ?' , $id)->delete($this->table);
58
+    return $this->where('id = ?', $id)->delete($this->table);
59 59
   }
60 60
 
61 61
   public function hasOne($join, $id = null, $select = '*', $limit = null, $localId = null, $forginId = null)
62 62
   {
63 63
     $join = rtrim($join, 'Model');
64 64
 
65
-    $file = $this->app->file->to( 'App/Models/' . $join . 'Model', '.php');
65
+    $file = $this->app->file->to('App/Models/' . $join . 'Model', '.php');
66 66
 
67 67
     $exists = $this->app->file->exists($file);
68 68
 
69
-    if (! $exists) return $join . ' Not Found';
69
+    if (!$exists) return $join . ' Not Found';
70 70
 
71 71
     $trace = debug_backtrace();
72 72
 
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
   {
82 82
     $join = rtrim($join, 'Model');
83 83
 
84
-    $file = $this->app->file->to( 'App/Models/' . $join . 'Model', '.php');
84
+    $file = $this->app->file->to('App/Models/' . $join . 'Model', '.php');
85 85
 
86 86
     $exists = $this->app->file->exists($file);
87 87
 
88
-    if (! $exists) return $join . ' Not Found';
88
+    if (!$exists) return $join . ' Not Found';
89 89
 
90 90
     $trace = debug_backtrace();
91 91
 
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
   {
101 101
     $join = rtrim($join, 'Model');
102 102
 
103
-    $file = $this->app->file->to( 'App/Models/' . $join . 'Model', '.php');
103
+    $file = $this->app->file->to('App/Models/' . $join . 'Model', '.php');
104 104
 
105 105
     $exists = $this->app->file->exists($file);
106 106
 
107
-    if (! $exists) return $join . ' Not Found';
107
+    if (!$exists) return $join . ' Not Found';
108 108
 
109 109
     $trace = debug_backtrace();
110 110
 
Please login to merge, or discard this patch.