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.
Completed
Push — master ( c71fa3...4d4222 )
by Andrea
11:07
created
src/app/Http/ViewComposers/AdminMenuComposer.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
           <a href="%s"><i class="%s text-red"></i><span>%s</span></a>
92 92
         ' // url, icon, title
93 93
         ];
94
-        $traverse = function ($rows) use (&$traverse, $templates, $user) {
94
+        $traverse = function($rows) use (&$traverse, $templates, $user) {
95 95
             $menuString = "";
96 96
             $hasActive = false;
97 97
             foreach ($rows as $menu) {
Please login to merge, or discard this patch.
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function __construct(MenuRepository $menuRepository)
14 14
     {
15
-      $this->menuRepository = $menuRepository;
15
+        $this->menuRepository = $menuRepository;
16 16
     }
17 17
 
18 18
     public function compose(View $view)
@@ -95,22 +95,22 @@  discard block
 block discarded – undo
95 95
             $menuString = "";
96 96
             $hasActive = false;
97 97
             foreach ($rows as $menu) {
98
-              if (!empty($menu->permission) and !$user->hasPermission($menu->permission)) {
99
-                  continue;
100
-              }
98
+                if (!empty($menu->permission) and !$user->hasPermission($menu->permission)) {
99
+                    continue;
100
+                }
101 101
 
102
-              $hasActive = false;
103
-              $link = sprintf($templates['menu_link'],
102
+                $hasActive = false;
103
+                $link = sprintf($templates['menu_link'],
104 104
                 (!empty($menu->route) ? url($menu->route) : '#'),
105 105
                 (!empty($menu->icon) ? $menu->icon : 'fa fa-circle-o'),
106 106
                 //trans('back-project::base.dashboard')
107 107
                 \Lang::has('back-project::menu.'.$menu->title) ? __('back-project::menu.'.$menu->title) : $menu->title
108
-              );
108
+                );
109 109
 
110
-              $submenu = "";
111
-              $authorized = true;
110
+                $submenu = "";
111
+                $authorized = true;
112 112
 
113
-              if ($menu->children->count() > 0) {
113
+                if ($menu->children->count() > 0) {
114 114
                 list($submenuString, $hasActive) = $traverse($menu->children);
115 115
                 $submenu = "";
116 116
                 if (!empty($submenuString)) {
@@ -118,19 +118,19 @@  discard block
 block discarded – undo
118 118
                 } else {
119 119
                     $authorized = false;
120 120
                 }
121
-              }
121
+                }
122 122
 
123
-              $class = (!empty($submenu) ? 'treeview' : '');
124
-              $current_url = \Route::current()->uri();
123
+                $class = (!empty($submenu) ? 'treeview' : '');
124
+                $current_url = \Route::current()->uri();
125 125
 
126
-              if ($authorized) {
127
-                  $menuString .= sprintf($templates['menu_row'], $class, $link.$submenu);
128
-              }
126
+                if ($authorized) {
127
+                    $menuString .= sprintf($templates['menu_row'], $class, $link.$submenu);
128
+                }
129 129
         }
130 130
 
131 131
         return [
132
-              $menuString,
133
-              $hasActive
132
+                $menuString,
133
+                $hasActive
134 134
             ];
135 135
         };
136 136
 
Please login to merge, or discard this patch.
src/app/Repositories/Base.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         return $this->model->create($data);
49 49
     }
50 50
 
51
-    public function update(array $data, $id, $attribute="id")
51
+    public function update(array $data, $id, $attribute = "id")
52 52
     {
53 53
         $model_data = $this->model->where($attribute, '=', $id)->first();
54 54
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         return $this;
124 124
     }
125 125
 
126
-    public function skipCriteria($status = true){
126
+    public function skipCriteria($status = true) {
127 127
         $this->skipCriteria = $status;
128 128
         return $this;
129 129
     }
@@ -143,11 +143,11 @@  discard block
 block discarded – undo
143 143
     }
144 144
 
145 145
     public function  applyCriteria() {
146
-        if($this->skipCriteria === true)
146
+        if ($this->skipCriteria === true)
147 147
             return $this;
148 148
 
149
-        foreach($this->getCriteria() as $criteria) {
150
-            if($criteria instanceof Criteria)
149
+        foreach ($this->getCriteria() as $criteria) {
150
+            if ($criteria instanceof Criteria)
151 151
                 $this->model = $criteria->apply($this->model, $this);
152 152
         }
153 153
 
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -29,6 +29,9 @@  discard block
 block discarded – undo
29 29
         $this->makeModel();
30 30
     }
31 31
 
32
+    /**
33
+     * @return string
34
+     */
32 35
     abstract public function model();
33 36
 
34 37
     public function all($columns = ['*'])
@@ -96,6 +99,9 @@  discard block
 block discarded – undo
96 99
         return $this->model->findOrCreate($data);
97 100
     }
98 101
 
102
+    /**
103
+     * @param string $attribute
104
+     */
99 105
     public function findBy($attribute, $value, $columns = array('*'))
100 106
     {
101 107
         $this->applyCriteria();
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -107,8 +107,9 @@  discard block
 block discarded – undo
107 107
         $model = $this->app->make($this->model());
108 108
         //$model = app()->make($this->model());
109 109
 
110
-        if (!$model instanceof Model)
111
-            throw new RepositoryException("Class {$this->model()} must be an instance of Illuminate\\Database\\Eloquent\\Model");
110
+        if (!$model instanceof Model) {
111
+                    throw new RepositoryException("Class {$this->model()} must be an instance of Illuminate\\Database\\Eloquent\\Model");
112
+        }
112 113
 
113 114
         return $this->model = $model;
114 115
     }
@@ -143,12 +144,14 @@  discard block
 block discarded – undo
143 144
     }
144 145
 
145 146
     public function  applyCriteria() {
146
-        if($this->skipCriteria === true)
147
-            return $this;
147
+        if($this->skipCriteria === true) {
148
+                    return $this;
149
+        }
148 150
 
149 151
         foreach($this->getCriteria() as $criteria) {
150
-            if($criteria instanceof Criteria)
151
-                $this->model = $criteria->apply($this->model, $this);
152
+            if($criteria instanceof Criteria) {
153
+                            $this->model = $criteria->apply($this->model, $this);
154
+            }
152 155
         }
153 156
 
154 157
         return $this;
Please login to merge, or discard this patch.
src/routes/web.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-Route::group(['namespace' => '\Afrittella\BackProject\Http\Controllers'], function () {
3
-    Route::group(['middleware' => 'web'], function () {
2
+Route::group(['namespace' => '\Afrittella\BackProject\Http\Controllers'], function() {
3
+    Route::group(['middleware' => 'web'], function() {
4 4
         Route::get('confirm/{code}/{user}', 'Auth\RegisterController@confirm')->name('users.confirm');
5 5
         Route::auth();
6 6
 
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
         Route::get('auth/{provider}/callback', 'Auth\SocialLoginController@handleProviderCallback')->name('social_callback');
9 9
     });
10 10
 
11
-    Route::group(['middleware' => 'web', 'prefix' => config('back-project.route_prefix')], function () {
11
+    Route::group(['middleware' => 'web', 'prefix' => config('back-project.route_prefix')], function() {
12 12
         Route::get('dashboard', 'AdminController@dashboard')->name('admin.dashboard');
13 13
         Route::get('account', 'UsersController@account')->name('admin.account');
14 14
         Route::put('account', 'UsersController@accountStore')->name('admin.add-account');
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         Route::get('attachments/{attachment}/main', 'AttachmentsController@setMain')->name('attachments.main');
19 19
         Route::resource('attachments', 'AttachmentsController', ['except' => ['destroy', 'show']]);
20 20
         // Users
21
-        Route::group(['middleware' => 'role:administrator'], function () {
21
+        Route::group(['middleware' => 'role:administrator'], function() {
22 22
             Route::get('users/{user}/delete', 'UsersController@delete')->name('users.delete'); // Implementing delete avoiding DELETE method
23 23
             Route::resource('users', 'UsersController', ['except' => ['destroy', 'show']]);
24 24
 
Please login to merge, or discard this patch.
src/app/Http/Controllers/AttachmentsController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Afrittella\BackProject\Http\Controllers;
4 4
 
5
-use Afrittella\BackProject\Exceptions\NotFoundException;
6 5
 use Afrittella\BackProject\Http\Requests\AttachmentAdd;
7 6
 use Afrittella\BackProject\Repositories\Attachments;
8 7
 use Afrittella\BackProject\Repositories\Criteria\Attachments\ByUser;
Please login to merge, or discard this patch.
src/app/Traits/Attachable.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php namespace Afrittella\BackProject\Traits;
2 2
 
3 3
 use Afrittella\BackProject\Models\Attachment;
4
-use Illuminate\Support\Facades\Storage;
5 4
 
6 5
 trait Attachable
7 6
 {
Please login to merge, or discard this patch.
src/app/BackProjectServiceProvider.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
         // - first the published views (in case they have any changes)
34 34
         $this->loadViewsFrom(resource_path('views/vendor/back-project/base'), 'back-project');
35 35
         // - then the stock views that come with the package, in case a published view might be missing
36
-        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'back-project');
36
+        $this->loadViewsFrom(__DIR__.'/../resources/views', 'back-project');
37 37
         // Load Translations
38
-        $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'back-project');
38
+        $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'back-project');
39 39
 
40 40
         // use the vendor configuration file as fallback
41 41
         $this->mergeConfigFrom(
42
-            __DIR__ . '/../config/config.php', 'back-project'
42
+            __DIR__.'/../config/config.php', 'back-project'
43 43
         );
44 44
 
45 45
         $this->routes($router);
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
             return new BackProject($app);
64 64
         });*/
65 65
 
66
-        $this->app->singleton('attachments-manager', function ($app) {
66
+        $this->app->singleton('attachments-manager', function($app) {
67 67
             return new MediaManager();
68 68
         });
69 69
 
70
-        $this->app->singleton('back-project', function ($app) {
70
+        $this->app->singleton('back-project', function($app) {
71 71
             return new BackProject();
72 72
         });
73 73
 
@@ -104,15 +104,15 @@  discard block
 block discarded – undo
104 104
     public function publishFiles()
105 105
     {
106 106
         // publish config file
107
-        $this->publishes([__DIR__ . '/../config/config.php' => config_path() . '/back-project.php'], 'config');
107
+        $this->publishes([__DIR__.'/../config/config.php' => config_path().'/back-project.php'], 'config');
108 108
         // publish lang files
109
-        $this->publishes([__DIR__ . '/../resources/lang' => resource_path('lang/vendor/back-project')], 'lang');
109
+        $this->publishes([__DIR__.'/../resources/lang' => resource_path('lang/vendor/back-project')], 'lang');
110 110
         // publish public BackProject assets
111
-        $this->publishes([__DIR__ . '/../public' => public_path('vendor/back-project')], 'public');
111
+        $this->publishes([__DIR__.'/../public' => public_path('vendor/back-project')], 'public');
112 112
         // publish views
113
-        $this->publishes([__DIR__ . '/../resources/views' => resource_path('views/vendor/back-project')], 'views');
113
+        $this->publishes([__DIR__.'/../resources/views' => resource_path('views/vendor/back-project')], 'views');
114 114
         // publish error views
115
-        $this->publishes([__DIR__ . '/../resources/error_views' => resource_path('views/errors')], 'errors');
115
+        $this->publishes([__DIR__.'/../resources/error_views' => resource_path('views/errors')], 'errors');
116 116
         // publish public AdminLTE assets
117 117
         $this->publishes(['vendor/almasaeed2010/adminlte/bootstrap' => public_path('vendor/adminlte/bootstrap')], 'adminlte');
118 118
         $this->publishes(['vendor/almasaeed2010/adminlte/dist' => public_path('vendor/adminlte/dist')], 'adminlte');
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         //$router->aliasMiddleware('guest', \Afrittella\BackProject\Http\Middleware\RedirectIfAuthenticated::class);
128 128
         $router->aliasMiddleware('role', \Afrittella\BackProject\Http\Middleware\Role::class);
129 129
 
130
-        $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');
130
+        $this->loadRoutesFrom(__DIR__.'/../routes/web.php');
131 131
     }
132 132
 
133 133
     public function handleMigrations()
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
                 $timestamp = date('Y_m_d_His', time());
138 138
 
139 139
                 $this->publishes([
140
-                    __DIR__ . '/../database/migrations/' . $file . '.php' =>
141
-                        database_path('migrations/' . $timestamp . '_' . $file . '.php')
140
+                    __DIR__.'/../database/migrations/'.$file.'.php' =>
141
+                        database_path('migrations/'.$timestamp.'_'.$file.'.php')
142 142
                 ], 'migrations');
143 143
             }
144 144
         }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     public function loadHelpers()
179 179
     {
180 180
         foreach ($this->helpers as $helper):
181
-            $file = __DIR__ . '/Helpers/' . $helper . '.php';
181
+            $file = __DIR__.'/Helpers/'.$helper.'.php';
182 182
 
183 183
             if (file_exists($file)) {
184 184
                 require_once($file);
Please login to merge, or discard this patch.