Passed
Push — master ( 8656ae...f838a9 )
by refat
03:20
created
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/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/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/Validation.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
 
25 25
   public function require($input = null, $msg = null)
26 26
   {
27
-    if (! $this->input) $this->input = $input;
27
+    if (!$this->input) $this->input = $input;
28 28
 
29 29
     $value = $this->value($this->input);
30 30
 
31
-    if (! $value) {
31
+    if (!$value) {
32 32
 
33 33
         $msg = $msg ?: 'This input is required';
34 34
 
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
 
40 40
   public function email($input = null, $msg = null)
41 41
   {
42
-    if (! $this->input) $this->input = $input;
42
+    if (!$this->input) $this->input = $input;
43 43
 
44 44
     $value = $this->value($this->input);
45 45
 
46
-    if (! filter_var($value, FILTER_VALIDATE_EMAIL)) {
46
+    if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
47 47
 
48 48
       $msg = $msg ?: sprintf('%s is not valid Email', ucfirst($this->input));
49 49
 
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
 
55 55
   public function number($input = null, $msg = null)
56 56
   {
57
-    if (! $this->input) $this->input = $input;
57
+    if (!$this->input) $this->input = $input;
58 58
 
59 59
     $value = $this->value($this->input);
60 60
 
61 61
     if ($value) {
62 62
 
63
-      if (! is_numeric($value)) {
63
+      if (!is_numeric($value)) {
64 64
 
65 65
         $msg = $msg ?: 'the Input must be number';
66 66
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
   public function text($input = null, $msg = null)
74 74
   {
75
-    if (! $this->input) $this->input = $input;
75
+    if (!$this->input) $this->input = $input;
76 76
 
77 77
     $value = $this->value($this->input);
78 78
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
     $valueConfirm = $this->value($input);
128 128
 
129
-    if ($valuePassword && $valueConfirm ) {
129
+    if ($valuePassword && $valueConfirm) {
130 130
 
131 131
       if ($valuePassword !== $valueConfirm) {
132 132
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 
199 199
   public function fails()
200 200
   {
201
-    return ! empty($this->errors);
201
+    return !empty($this->errors);
202 202
   }
203 203
 
204 204
   public function getMsgs()
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 
214 214
   public function addError($input, $msg)
215 215
   {
216
-    if (! $this->checkError($input)) {
216
+    if (!$this->checkError($input)) {
217 217
 
218 218
       $this->errors[$input] = $msg;
219 219
     }
Please login to merge, or discard this patch.
Core/helpers.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 use System\Application;
4 4
 
5
-if (! function_exists('pre')) {
5
+if (!function_exists('pre')) {
6 6
   function pre($var) {
7 7
     echo '<pre>';
8 8
     print_r($var);
@@ -10,28 +10,28 @@  discard block
 block discarded – undo
10 10
   }
11 11
 }
12 12
 
13
-if (! function_exists('array_get')) {
13
+if (!function_exists('array_get')) {
14 14
   function array_get($array, $key, $default = null)
15 15
   {
16 16
     return $array[$key] ?: $default;
17 17
   }
18 18
 }
19 19
 
20
-if (! function_exists('app')) {
20
+if (!function_exists('app')) {
21 21
   function app()
22 22
   {
23 23
     return Application::getInstance();
24 24
   }
25 25
 }
26 26
 
27
-if (! function_exists('_e')) {
27
+if (!function_exists('_e')) {
28 28
   function _e($value)
29 29
   {
30 30
     return htmlspecialchars($value);
31 31
   }
32 32
 }
33 33
 
34
-if (! function_exists('getLastIndex')) {
34
+if (!function_exists('getLastIndex')) {
35 35
   function getLastIndex($index)
36 36
   {
37 37
     $array = explode('\\', $index);
@@ -39,14 +39,14 @@  discard block
 block discarded – undo
39 39
   }
40 40
 }
41 41
 
42
-if (! function_exists('url')) {
42
+if (!function_exists('url')) {
43 43
   function url($path) {
44 44
     $app = Application::getInstance();
45 45
     return $app->url->link($path);
46 46
   }
47 47
 }
48 48
 
49
-if (! function_exists('assets')) {
49
+if (!function_exists('assets')) {
50 50
   function assets($path)
51 51
   {
52 52
     $app = Application::getInstance();
@@ -54,24 +54,24 @@  discard block
 block discarded – undo
54 54
   }
55 55
 }
56 56
 
57
-if (! function_exists('remove_space')) {
57
+if (!function_exists('remove_space')) {
58 58
   function remove_space($str) {
59 59
     return str_replace(' ', '-', $str);
60 60
   }
61 61
 }
62 62
 
63
-if (! function_exists('remove_dash')) {
63
+if (!function_exists('remove_dash')) {
64 64
   function remove_dash($str) {
65 65
     return str_replace('-', ' ', $str);
66 66
   }
67 67
 }
68 68
 
69
-if (! function_exists('clean_name_url')) {
69
+if (!function_exists('clean_name_url')) {
70 70
     function clean_name_url($class = null) {
71 71
 
72 72
       $app = Application::getInstance();
73 73
 
74
-      if (! $class) {
74
+      if (!$class) {
75 75
 
76 76
         $class = debug_backtrace()[1]['class'];
77 77
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         $class = strtolower($class);
85 85
 
86
-        $class = '/' . $class .  '/';
86
+        $class = '/' . $class . '/';
87 87
       }
88 88
 
89 89
       $url = $app->request->url();
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
   }
97 97
 }
98 98
 
99
-if (! function_exists('text_char_limit')) {
99
+if (!function_exists('text_char_limit')) {
100 100
   function text_char_limit($text, $limit) {
101 101
     if (strlen($text) > $limit) {
102 102
       return substr($text, 0, $limit) . '...';
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
   }
105 105
 }
106 106
 
107
-if (! function_exists('array_equal')) {
107
+if (!function_exists('array_equal')) {
108 108
   function array_equal($a, $b) {
109 109
     return (
110 110
       is_array($a)
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
   }
116 116
 }
117 117
 
118
-if (! function_exists('redirect_after')) {
118
+if (!function_exists('redirect_after')) {
119 119
   function redirect_after($num) {
120 120
     $app = Application::getInstance();
121 121
     $app->url->redirectTo('/', $num);
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.
routes/admin/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.