Passed
Push — master ( 47732f...7569b4 )
by refat
03:20
created
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.
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.
Core/System/Loader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
   {
31 31
     $controller = $this->getControllerName($controller);
32 32
 
33
-    if (! $this->hasController($controller)) {
33
+    if (!$this->hasController($controller)) {
34 34
       $this->addController($controller);
35 35
     }
36 36
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
     $controller = str_replace('/', DS, $controller);
62 62
 
63
-    $controller = 'App' . DS .'Controllers' . DS . $controller;
63
+    $controller = 'App' . DS . 'Controllers' . DS . $controller;
64 64
 
65 65
     return $controller;
66 66
   }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
   {
70 70
     $model = $this->getModelName($model);
71 71
 
72
-    if (! $this->hasModel($model)) {
72
+    if (!$this->hasModel($model)) {
73 73
       $this->addModel($model);
74 74
     }
75 75
 
Please login to merge, or discard this patch.
Core/System/Route.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
   public function getProperRoute()
123 123
   {
124
-    foreach($this->routes as $route) {
124
+    foreach ($this->routes as $route) {
125 125
 
126 126
         if ($this->isMatching($route['pattern']) && $this->isMatchingRequestMethod($route['method'])) {
127 127
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
             if (is_array($route['middleware'])) {
135 135
 
136
-              foreach($route['middleware'] as $middleware) {
136
+              foreach ($route['middleware'] as $middleware) {
137 137
 
138 138
                 $output = $this->middleware($middleware);
139 139
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
     $middlewareClass = $middlewares[$middleware];
227 227
 
228
-    if (! in_array($middlewareInterface, class_implements($middlewareClass))) {
228
+    if (!in_array($middlewareInterface, class_implements($middlewareClass))) {
229 229
       throw new Exception("$middlewareClass not Implement");
230 230
     }
231 231
 
Please login to merge, or discard this patch.
Core/System/PugView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 
30 30
     //File Path
31 31
     $file = str_replace('/', DS, $path);
32
-    $file = $dir . DS . 'template' . DS  . $file . '.pug';
32
+    $file = $dir . DS . 'template' . DS . $file . '.pug';
33 33
 
34 34
     //Css Path
35 35
     $css = $this->app->file->css();
Please login to merge, or discard this patch.
Core/System/Http/Request.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
     if (strpos($requestUri, '?')) list($requestUri, $queryString) = explode('?', $requestUri);
31 31
 
32
-    if (! in_array($script, ['/', '\\'])) {
32
+    if (!in_array($script, ['/', '\\'])) {
33 33
 
34 34
       $this->url = preg_replace('#^' . $script . '#', '', $requestUri);
35 35
     } else {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
       $isSecure = true;
47 47
 
48 48
     }
49
-    elseif (! empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || ! empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') {
49
+    elseif (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || !empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') {
50 50
       $isSecure = true;
51 51
     }
52 52
 
Please login to merge, or discard this patch.
Core/System/Http/UploadeFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
   public function exists()
64 64
   {
65
-    return ! empty($this->file);
65
+    return !empty($this->file);
66 66
   }
67 67
 
68 68
   public function getFileName()
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
     $newName .= '.' . $this->extension;
108 108
 
109
-    if (! is_dir($target)) mkdir($target, 0777, true);
109
+    if (!is_dir($target)) mkdir($target, 0777, true);
110 110
 
111 111
     $filePath = $target . $newName;
112 112
 
Please login to merge, or discard this patch.