GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( e292ee...f70a3e )
by Piyapan
02:41
created
src/Traits/DataViewer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
       'f.*.query_2'     => 'required_if:f.*.operator,between,not_between'
46 46
     ]);
47 47
 
48
-    if($v->fails()) {
48
+    if ($v->fails()) {
49 49
       return dd($v->messages()->all());
50 50
       throw new ValidationException;      
51 51
     }
Please login to merge, or discard this patch.
src/Traits/HasMeta.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
         // dd($meta);
19 19
         $metaModel = new $this->meta_model();
20 20
 
21
-        if($this->meta_global == true) {
22
-            $metaModel->model_type  = __class__;
21
+        if ($this->meta_global == true) {
22
+            $metaModel->model_type = __class__;
23 23
         }
24 24
         $metaModel->{$this->meta_key_name}    = $meta[$this->meta_key_name];
25 25
         $metaModel->{$this->meta_value_name}  = $meta[$this->meta_value_name];
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
         if (is_null($value)) {
60 60
             try {
61
-                if(isset($this->getMeta()->$key)) {
61
+                if (isset($this->getMeta()->$key)) {
62 62
                     $value = $this->getMeta()->$key->{$this->meta_value_name};
63 63
                 } else {
64 64
                     $value = NULL;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             }
93 93
         } catch (Exception $e) { }
94 94
 
95
-        if(\Config::get('database.default') === 'sqlite') {
95
+        if (\Config::get('database.default') === 'sqlite') {
96 96
             $columns = \DB::select('PRAGMA table_info('.$this->table.')');
97 97
 
98 98
             foreach ($columns as $column) {
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
                 $data->{$this->meta_foreign_key} = $this->$primaryKey;
176 176
             }
177 177
 
178
-            if(!is_null($data->{$this->meta_value_name})) {
178
+            if ( ! is_null($data->{$this->meta_value_name})) {
179 179
                 $data->save();
180 180
             }
181 181
         }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     protected function deleteMeta() 
187 187
     {
188 188
         foreach ((array)$this->getMeta() as $data) {
189
-            if(is_null($data->{$this->meta_value_name})) {
189
+            if (is_null($data->{$this->meta_value_name})) {
190 190
                 $dataID = $this->meta_primary_key;
191 191
                 $data->destroy($data->$dataID);
192 192
             }
Please login to merge, or discard this patch.
src/Traits/ImageTrait.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
    |------------------------------------------------------------
19 19
    */
20 20
   private function imageResize($image, $width, $height = null, $mode = 'expand', $quality = 85) {
21
-    if($height == null && $mode == 'expand') {
21
+    if ($height == null && $mode == 'expand') {
22 22
       $height = $width;
23 23
     }
24 24
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     /*
34 34
     *  canvas
35 35
     */
36
-    $dimension  = $width;
36
+    $dimension = $width;
37 37
     $desire_width = $width;
38 38
     $desire_height = $height;
39 39
 
@@ -41,25 +41,25 @@  discard block
 block discarded – undo
41 41
     $horizontal = ($img_width > $img_height);
42 42
     $square     = ($img_width = $img_height);
43 43
 
44
-    if($mode == 'expand') {
44
+    if ($mode == 'expand') {
45 45
       if ($vertical) {
46 46
         $top = $bottom = $margin;
47 47
         $newHeight = ($dimension) - ($bottom + $top);
48
-        $img->resize(null, $newHeight, function ($constraint) {
48
+        $img->resize(null, $newHeight, function($constraint) {
49 49
           $constraint->aspectRatio();
50 50
         });
51 51
 
52 52
       } else if ($horizontal) {
53 53
         $right = $left = $margin;
54 54
         $newWidth = ($dimension) - ($right + $left);
55
-        $img->resize($newWidth, null, function ($constraint) {
55
+        $img->resize($newWidth, null, function($constraint) {
56 56
           $constraint->aspectRatio();
57 57
         });
58 58
 
59 59
       } else if ($square) {
60 60
         $right = $left = $margin;
61 61
         $newWidth = ($dimension) - ($left + $right);
62
-        $img->resize($newWidth, null, function ($constraint) {
62
+        $img->resize($newWidth, null, function($constraint) {
63 63
           $constraint->aspectRatio();
64 64
         });
65 65
 
@@ -68,25 +68,25 @@  discard block
 block discarded – undo
68 68
       $img->resizeCanvas($dimension, $dimension, 'center', false, '#ffffff');
69 69
       $img->encode('jpg', $quality);
70 70
 
71
-    } else if($mode == 'constrain') {
71
+    } else if ($mode == 'constrain') {
72 72
       if ($vertical) {
73 73
         $top = $bottom = $margin;
74 74
         $newHeight = ($desire_height) - ($bottom + $top);
75
-        $img->resize(null, $newHeight, function ($constraint) {
75
+        $img->resize(null, $newHeight, function($constraint) {
76 76
           $constraint->aspectRatio();
77 77
         });
78 78
 
79 79
       } else if ($horizontal) {
80 80
         $right = $left = $margin;
81 81
         $newWidth = ($desire_width) - ($right + $left);
82
-        $img->resize($newWidth, null, function ($constraint) {
82
+        $img->resize($newWidth, null, function($constraint) {
83 83
           $constraint->aspectRatio();
84 84
         });
85 85
 
86 86
       } else if ($square) {
87 87
         $right = $left = $margin;
88 88
         $newWidth = ($desire_width) - ($left + $right);
89
-        $img->resize($newWidth, null, function ($constraint) {
89
+        $img->resize($newWidth, null, function($constraint) {
90 90
           $constraint->aspectRatio();
91 91
         });
92 92
 
Please login to merge, or discard this patch.
src/Supports/CustomQueryBuilder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
       $this->makeFilter($query, $filter_prep);
23 23
     }
24 24
 
25
-    if(isset($data['f'])) {
25
+    if (isset($data['f'])) {
26 26
       foreach ($data['f'] as $filter) {
27 27
         $filter['match'] = $data['filter_match'] ?? 'and';
28 28
         $this->makeFilter($query, $filter);
@@ -34,17 +34,17 @@  discard block
 block discarded – undo
34 34
   }
35 35
 
36 36
   public function makeFilter($query, $filter) {
37
-    if(strpos($filter['column'], '.') !== false) {
37
+    if (strpos($filter['column'], '.') !== false) {
38 38
       // nested column
39 39
       list($relation, $filter['column']) = explode('.', $filter['column']);
40 40
       $filter['match'] = 'and';
41 41
       // $filter['match'] = 'or';
42 42
 
43
-      if($filter['column'] == 'count') {
43
+      if ($filter['column'] == 'count') {
44 44
         $this->{camel_case($filter['operator'])}($filter, $query, $relation);
45 45
 
46 46
       } else {
47
-        if($this->relation_counter == 0) {
47
+        if ($this->relation_counter == 0) {
48 48
           $query->whereHas($relation, function($q) use ($filter) {
49 49
             $this->{camel_case($filter['operator'])}($filter, $q);
50 50
           });
Please login to merge, or discard this patch.
src/Models/Term.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     return [
22 22
       'slug' => [
23 23
         'source' => 'name',
24
-        'method' => function ($string, $separator) {
24
+        'method' => function($string, $separator) {
25 25
           return $this->slugify_th($string, $separator);
26 26
         }
27 27
       ]
Please login to merge, or discard this patch.
src/Models/Media.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
       'Cache-Control'       => 'must-revalidate, post-check=0, pre-check=0',
23 23
       'Content-Type'        => $this->mime_type,
24 24
       'Content-Length'      => $this->size,
25
-      'Content-Disposition' => 'attachment; filename="' . $this->file_name . '"',
25
+      'Content-Disposition' => 'attachment; filename="'.$this->file_name.'"',
26 26
       'Pragma'              => 'public',
27 27
     ];
28 28
 
29
-    return response()->stream(function () {
29
+    return response()->stream(function() {
30 30
       $stream = $this->stream();
31 31
 
32 32
       fpassthru($stream);
Please login to merge, or discard this patch.
src/Models/Post.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,27 +23,27 @@  discard block
 block discarded – undo
23 23
   {
24 24
     parent::boot();
25 25
 
26
-    self::creating(function($model){
26
+    self::creating(function($model) {
27 27
       // ... code here
28 28
     });
29 29
 
30
-    self::created(function($model){
30
+    self::created(function($model) {
31 31
       // ... code here
32 32
     });
33 33
 
34
-    self::updating(function($model){
34
+    self::updating(function($model) {
35 35
       // ... code here
36 36
     });
37 37
 
38
-    self::updated(function($model){
38
+    self::updated(function($model) {
39 39
       // ... code here
40 40
     });
41 41
 
42
-    self::deleting(function($model){
42
+    self::deleting(function($model) {
43 43
       // ... code here
44 44
     });
45 45
 
46
-    self::deleted(function($model){
46
+    self::deleted(function($model) {
47 47
       // ... code here
48 48
     });
49 49
   }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     return [
54 54
       'post_name' => [
55 55
         'source' => 'post_title',
56
-        'method' => function ($string, $separator) {
56
+        'method' => function($string, $separator) {
57 57
           return $this->slugify_th($string, $separator);
58 58
         }
59 59
       ]
Please login to merge, or discard this patch.
src/StarterKitServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
     // Publishing the configuration file.
65 65
     echo "Publishing StarterKit Config ...\n";
66 66
     $this->publishes([
67
-      __DIR__ . '/../config/starter-kit.php' => config_path('starter-kit.php'),
67
+      __DIR__.'/../config/starter-kit.php' => config_path('starter-kit.php'),
68 68
     ], 'config');
69 69
 
70
-    $this->mergeConfigFrom(__DIR__ . '/../config/starter-kit.php', 'StarterKit');
70
+    $this->mergeConfigFrom(__DIR__.'/../config/starter-kit.php', 'StarterKit');
71 71
   }
72 72
 
73 73
   /**
@@ -78,14 +78,14 @@  discard block
 block discarded – undo
78 78
   public function register()
79 79
   {
80 80
     // Register the service the package provides.
81
-    $this->app->singleton('StarterKit', function ($app) {
81
+    $this->app->singleton('StarterKit', function($app) {
82 82
       return new StarterKit;
83 83
     });
84 84
 
85 85
     $this->app->alias(StarterKit::class, 'starter-kit');
86 86
 
87 87
     // Register Flash Class
88
-    $this->app->singleton('flash', function () {
88
+    $this->app->singleton('flash', function() {
89 89
       return $this->app->make('Raystech\StarterKit\Supports\FlashToast');
90 90
     });
91 91
   }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
   }
102 102
 
103 103
   public function loadHelpers() {
104
-    foreach (glob(__DIR__ . '/Helpers/*.php') as $filename) {
104
+    foreach (glob(__DIR__.'/Helpers/*.php') as $filename) {
105 105
       require_once($filename);
106 106
     }
107 107
   }
Please login to merge, or discard this patch.
src/Supports/FlashToast.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
     {
82 82
         // If no message was provided, we should update
83 83
         // the most recently added message.
84
-      if (! $message) {
84
+      if ( ! $message) {
85 85
         return $this->updateLastMessage(compact('level'));
86 86
       }
87
-      if (! $message instanceof Message) {
87
+      if ( ! $message instanceof Message) {
88 88
         $message = new Message(compact('message', 'level'));
89 89
       }
90 90
       $this->messages->push($message);
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      */
111 111
     public function overlay($message = null, $title = 'Notice')
112 112
     {
113
-      if (! $message) {
113
+      if ( ! $message) {
114 114
         return $this->updateLastMessage(['title' => $title, 'overlay' => true]);
115 115
       }
116 116
       return $this->message(
Please login to merge, or discard this patch.