Passed
Push — master ( 8656ae...f838a9 )
by refat
03:20
created
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) {
69
+    if (!$exists) {
70 70
       return $join . ' Not Found';
71 71
     }
72 72
 
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
   {
84 84
     $join = rtrim($join, 'Model');
85 85
 
86
-    $file = $this->app->file->to( 'App/Models/' . $join . 'Model', '.php');
86
+    $file = $this->app->file->to('App/Models/' . $join . 'Model', '.php');
87 87
 
88 88
     $exists = $this->app->file->exists($file);
89 89
 
90
-    if (! $exists) {
90
+    if (!$exists) {
91 91
       return $join . ' Not Found';
92 92
     }
93 93
 
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
   {
105 105
     $join = rtrim($join, 'Model');
106 106
 
107
-    $file = $this->app->file->to( 'App/Models/' . $join . 'Model', '.php');
107
+    $file = $this->app->file->to('App/Models/' . $join . 'Model', '.php');
108 108
 
109 109
     $exists = $this->app->file->exists($file);
110 110
 
111
-    if (! $exists) {
111
+    if (!$exists) {
112 112
       return $join . ' Not Found';
113 113
     }
114 114
 
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
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
       list($requestUri, $queryString) = explode('?', $requestUri);
33 33
     }
34 34
 
35
-    if (! in_array($script, ['/', '\\'])) {
35
+    if (!in_array($script, ['/', '\\'])) {
36 36
 
37 37
       $this->url = preg_replace('#^' . $script . '#', '', $requestUri);
38 38
     } else {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
       $isSecure = true;
53 53
 
54
-    } 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')) {
54
+    } 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')) {
55 55
       $isSecure = true;
56 56
     }
57 57
 
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
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
   public function exists()
68 68
   {
69
-    return ! empty($this->file);
69
+    return !empty($this->file);
70 70
   }
71 71
 
72 72
   public function getFileName()
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
     $newName .= '.' . $this->extension;
112 112
 
113
-    if (! is_dir($target)) {
113
+    if (!is_dir($target)) {
114 114
 
115 115
       mkdir($target, 0777, true);
116 116
     }
Please login to merge, or discard this patch.
Core/System/Database.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
   {
43 43
     $this->app = $app;
44 44
 
45
-    if (! $this->isConnected()) {
45
+    if (!$this->isConnected()) {
46 46
       $this->connect();
47 47
     }
48 48
   }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     extract($data);
60 60
 
61 61
     try {
62
-      self::$connection  = new PDO('mysql:host=' . $server . ';dbname=' . $dbname, $dbuser, $dbpass);
62
+      self::$connection = new PDO('mysql:host=' . $server . ';dbname=' . $dbname, $dbuser, $dbpass);
63 63
 
64 64
       self::$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
65 65
 
@@ -94,14 +94,14 @@  discard block
 block discarded – undo
94 94
 
95 95
   public function join($join, $localId = null, $forginId = null)
96 96
   {
97
-    if (! $localId) {
97
+    if (!$localId) {
98 98
 
99
-      $localId =  trim($join, 's' ). '_id';
99
+      $localId = trim($join, 's') . '_id';
100 100
     }
101 101
 
102
-    if (! $forginId) {
102
+    if (!$forginId) {
103 103
 
104
-      $forginId =  'id';
104
+      $forginId = 'id';
105 105
     }
106 106
 
107 107
     $sql = $join . ' ON ' . $this->table . '.' . $localId . ' = ' . $join . '.' . $forginId;
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 
228 228
     if (!empty($this->orderBy)) {
229 229
 
230
-      $sql .= ' ORDER BY ' . implode (' ', $this->orderBy);
230
+      $sql .= ' ORDER BY ' . implode(' ', $this->orderBy);
231 231
     }
232 232
 
233 233
     if ($this->limit) {
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
     }
242 242
 
243 243
     if (!empty($this->groupBy)) {
244
-      $sql .= ' GROUP BY ' . implode(' ' , $this->groupBy);
244
+      $sql .= ' GROUP BY ' . implode(' ', $this->groupBy);
245 245
     }
246 246
 
247 247
     return $sql;
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
   {
334 334
     $sql = '';
335 335
 
336
-    foreach($this->data as $key => $value) {
336
+    foreach ($this->data as $key => $value) {
337 337
 
338 338
       $sql .= '`' . $key . '` = ? ,';
339 339
     }
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
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
     } else {
30 30
 
31
-      if (! in_array($request, $pagesWhenLogout)) {
31
+      if (!in_array($request, $pagesWhenLogout)) {
32 32
         $app->url->redirectTo('/');
33 33
       }
34 34
     }
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) {
17
+    if (!$user) {
18 18
 
19 19
       return false;
20 20
     }
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
       return false;
45 45
     }
46 46
 
47
-    $user = $this->where('code=?' , $code)->fetch($this->table);
47
+    $user = $this->where('code=?', $code)->fetch($this->table);
48 48
 
49
-    if (! $user) {
49
+    if (!$user) {
50 50
       return false;
51 51
     }
52 52
 
Please login to merge, or discard this patch.