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.
App/Middlewares/AjaxMiddleware.php 1 patch
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.
App/Controllers/Admin/UsersController.php 1 patch
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.
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.
Core/System/View.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -120,17 +120,17 @@
 block discarded – undo
120 120
    */
121 121
   private function parameters()
122 122
   {
123
-    $url =  $this->app->request->url();
123
+    $url = $this->app->request->url();
124 124
 
125
-    if ($url === '/') {return;}
126
-    $parameters =  explode('/', $url);
125
+    if ($url === '/') {return; }
126
+    $parameters = explode('/', $url);
127 127
     array_shift($parameters);
128 128
     $return = [];
129 129
 
130 130
     foreach ($parameters as $parameter) {
131 131
       $name = $parameter;
132
-      $length =  strpos($url, $parameter) + strlen($parameter);
133
-      $link =  substr($url, 0, $length);
132
+      $length = strpos($url, $parameter) + strlen($parameter);
133
+      $link = substr($url, 0, $length);
134 134
 
135 135
       $return[] = [
136 136
         'name' => $name,
Please login to merge, or discard this patch.
Core/System/Session.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
   {
29 29
     ini_set('session.use_only_cookies', 1);
30 30
 
31
-    if (! session_id()) session_start();
31
+    if (!session_id()) session_start();
32 32
   }
33 33
 
34 34
   /**
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
    * @param mixed $default
51 51
    * @return mixed
52 52
    */
53
-  public function get($key , $default = null)
53
+  public function get($key, $default = null)
54 54
   {
55 55
     return array_get($_SESSION, $key, $default);
56 56
   }
Please login to merge, or discard this patch.
Core/System/Database.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
   {
93 93
     $args = func_get_args()[0];
94 94
 
95
-    foreach($args as $join) {
95
+    foreach ($args as $join) {
96 96
       $sql[] = $join[0] . ' ON ' . $this->table . '.' . $join[1] . ' = ' . $join[0] . '.' . $join[2];
97 97
     }
98 98
     $this->joins = $sql;
Please login to merge, or discard this patch.
Core/System/Validation.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
     $msg = null;
224 224
     if ($options->start && $options->end) {
225 225
       $method = 'isDateBetween';
226
-      $msg = 'this field must be between ' . $options->start  . ' and ' . $options->end;
226
+      $msg = 'this field must be between ' . $options->start . ' and ' . $options->end;
227 227
     } elseif ($options->start) {
228 228
       $method = 'minimum';
229 229
       $msg = 'the date can\'t be under ' . $options->start;
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
       $method = 'maximum';
232 232
       $msg = 'the date can\'t be above ' . $options->end;
233 233
     }
234
-    return array ('method' => $method,'msg'=> $msg);
234
+    return array('method' => $method, 'msg'=> $msg);
235 235
   }
236 236
 
237 237
   /**
@@ -346,14 +346,14 @@  discard block
 block discarded – undo
346 346
       }
347 347
 
348 348
       if (is_array($excepts->languages)) {
349
-        foreach($excepts->languages as $language) {
349
+        foreach ($excepts->languages as $language) {
350 350
           $langsRegex .= $this->languages(trim($language));
351 351
           $languages .= "$language, ";
352 352
         }
353 353
         $languages = rtrim($languages, ", ");
354 354
       } else if (is_string($excepts->languages)) {
355 355
         if (preg_match('/,/', $excepts->languages) && preg_match_all('/,/', $excepts->languages)) {
356
-          foreach(explode(',', $excepts->languages) as $language) {
356
+          foreach (explode(',', $excepts->languages) as $language) {
357 357
             $langsRegex .= $this->languages(trim($language));
358 358
             $languages .= "$language, ";
359 359
           }
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         $splitChars = str_split($splitChars);
387 387
         $splitChars = "\\" . implode('|\\', $splitChars);
388 388
       }
389
-      $re2 = "/^($splitChars"."|\\s+\\$splitChars)/";
389
+      $re2 = "/^($splitChars" . "|\\s+\\$splitChars)/";
390 390
       if (preg_match_all($re2, $value)) {
391 391
         $msg = $msg ?: 'charachters cant be in the first';
392 392
 
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
         $splitChars = str_split($splitChars);
402 402
         $splitChars = "\\" . implode('|\\', $splitChars);
403 403
       }
404
-      $re3 = "/($splitChars"."|\\$splitChars\\s+)$/";
404
+      $re3 = "/($splitChars" . "|\\$splitChars\\s+)$/";
405 405
       if (preg_match_all($re3, $value)) {
406 406
         $msg = $msg ?: 'charachters cant be in the end';
407 407
 
@@ -437,8 +437,8 @@  discard block
 block discarded – undo
437 437
 
438 438
     $re5 = "/^[0-9\\s$chars$langsRegex]*$/u";
439 439
     if (!preg_match($re5, $value)) {
440
-      $chars =  explode('\\', $chars);
441
-      $chars =  implode('', $chars);
440
+      $chars = explode('\\', $chars);
441
+      $chars = implode('', $chars);
442 442
       $chars = $chars ? "[ $chars ] and" : '';
443 443
       $languages = $languages ? "[ $languages ]" : '';
444 444
       $msg = $msg ?: "just $chars $languages letters can be used";
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
     $files = [];
496 496
     $final = [];
497 497
 
498
-    foreach($characters as $key => $character) {
498
+    foreach ($characters as $key => $character) {
499 499
       if (strpos($character, 'path:') === 0) {
500 500
         unset($characters[$key]);
501 501
 
Please login to merge, or discard this patch.