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 ( ee0bb8...fd45eb )
by Dave
18:17
created
src/Providers/AdminServiceProvider.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
     /**
95 95
      * @param string $key
96 96
      *
97
-     * @return mixed
97
+     * @return string
98 98
      */
99 99
     protected function getConfig($key)
100 100
     {
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -42,17 +42,17 @@  discard block
 block discarded – undo
42 42
         $this->initializeNavigation();
43 43
         $this->registerAliases();
44 44
 
45
-        $this->app->singleton('sleeping_owl.widgets', function () {
45
+        $this->app->singleton('sleeping_owl.widgets', function() {
46 46
             return new WidgetsRegistry($this->app);
47 47
         });
48 48
 
49
-        $this->app->booted(function () {
49
+        $this->app->booted(function() {
50 50
             $this->app['sleeping_owl.widgets']->placeWidgets(
51 51
                 $this->app[ViewFactory::class]
52 52
             );
53 53
         });
54 54
 
55
-        $this->app->booted(function () {
55
+        $this->app->booted(function() {
56 56
             $this->registerCustomRoutes();
57 57
             $this->registerDefaultRoutes();
58 58
             $this->registerSupportRoutes();
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
 
67 67
     protected function registerTemplate()
68 68
     {
69
-        $this->app->singleton('assets.packages', function ($app) {
69
+        $this->app->singleton('assets.packages', function($app) {
70 70
             return new \KodiCMS\Assets\PackageManager();
71 71
         });
72 72
 
73
-        $this->app->singleton('sleeping_owl.meta', function ($app) {
73
+        $this->app->singleton('sleeping_owl.meta', function($app) {
74 74
             return new Meta(
75 75
                 new Assets(
76 76
                     $app['assets.packages']
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
             );
79 79
         });
80 80
 
81
-        $this->app->singleton('sleeping_owl.template', function (Application $app) {
82
-            if (! class_exists($class = $this->getConfig('template'))) {
81
+        $this->app->singleton('sleeping_owl.template', function(Application $app) {
82
+            if (!class_exists($class = $this->getConfig('template'))) {
83 83
                 throw new TemplateException("Template class [{$class}] not found");
84 84
             }
85 85
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     protected function getBootstrapPath($path = null)
110 110
     {
111
-        if (! is_null($path)) {
111
+        if (!is_null($path)) {
112 112
             $path = DIRECTORY_SEPARATOR.$path;
113 113
         }
114 114
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             $this->app[WidgetsRegistryInterface::class]->registerWidget($messageType);
137 137
         }
138 138
 
139
-        $this->app->singleton('sleeping_owl.message', function () use ($messageTypes) {
139
+        $this->app->singleton('sleeping_owl.message', function() use ($messageTypes) {
140 140
             return new MessageStack($messageTypes);
141 141
         });
142 142
     }
@@ -168,14 +168,14 @@  discard block
 block discarded – undo
168 168
             \SleepingOwl\Admin\Navigation\Badge::class
169 169
         );
170 170
 
171
-        $this->app->singleton('sleeping_owl.navigation', function () {
171
+        $this->app->singleton('sleeping_owl.navigation', function() {
172 172
             return new Navigation();
173 173
         });
174 174
     }
175 175
 
176 176
     protected function registerWysiwyg()
177 177
     {
178
-        $this->app->singleton('sleeping_owl.wysiwyg', function () {
178
+        $this->app->singleton('sleeping_owl.wysiwyg', function() {
179 179
             return new Manager($this->app);
180 180
         });
181 181
     }
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
     {
188 188
         $directory = $this->getBootstrapPath();
189 189
 
190
-        if (! is_dir($directory)) {
190
+        if (!is_dir($directory)) {
191 191
             return;
192 192
         }
193 193
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
             ->notName('routes.php')
198 198
             ->notName('navigation.php')
199 199
             ->in($directory)
200
-            ->sort(function (SplFileInfo $a) {
200
+            ->sort(function(SplFileInfo $a) {
201 201
                 return $a->getFilename() != 'bootstrap.php';
202 202
             });
203 203
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
     protected function registerCustomRoutes()
221 221
     {
222 222
         if (file_exists($file = $this->getBootstrapPath('routes.php'))) {
223
-            $this->registerRoutes(function (Router $route) use ($file) {
223
+            $this->registerRoutes(function(Router $route) use ($file) {
224 224
                 require $file;
225 225
             });
226 226
         }
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
      */
232 232
     protected function registerDefaultRoutes()
233 233
     {
234
-        $this->registerRoutes(function (Router $router) {
234
+        $this->registerRoutes(function(Router $router) {
235 235
             (new ModelRouter($this->app, $router))->register($this->app['sleeping_owl']->getModels());
236 236
 
237 237
             if (file_exists($routesFile = __DIR__.'/../Http/routes.php')) {
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
         $this->app['router']->group([
251 251
             'prefix' => $this->getConfig('url_prefix'),
252 252
 
253
-        ], function (Router $route) {
253
+        ], function(Router $route) {
254 254
             $route->get('ckeditor/upload/image', [
255 255
                 'as'   => 'admin.ckeditor.upload',
256 256
                 'uses' => 'SleepingOwl\Admin\Http\Controllers\UploadController@ckEditorStore',
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
         $this->app['router']->group([
272 272
             'prefix'     => $this->getConfig('url_prefix'),
273 273
             'middleware' => $this->getConfig('middleware'),
274
-        ], function (Router $route) use ($callback) {
274
+        ], function(Router $route) use ($callback) {
275 275
             call_user_func($callback, $route);
276 276
         });
277 277
     }
Please login to merge, or discard this patch.
src/Navigation/Page.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function getModelConfiguration()
59 59
     {
60
-        if (! $this->hasModel()) {
60
+        if (!$this->hasModel()) {
61 61
             return;
62 62
         }
63 63
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function hasModel()
71 71
     {
72
-        return ! is_null($this->model) && class_exists($this->model);
72
+        return !is_null($this->model) && class_exists($this->model);
73 73
     }
74 74
 
75 75
     /**
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function getAccessLogic()
115 115
     {
116
-        if (! is_callable($this->accessLogic)) {
116
+        if (!is_callable($this->accessLogic)) {
117 117
             if ($this->hasModel()) {
118
-                return function () {
118
+                return function() {
119 119
                     return $this->getModelConfiguration()->isDisplayable();
120 120
                 };
121 121
             }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     {
134 134
         $data = $this->toArray();
135 135
 
136
-        if (! is_null($view)) {
136
+        if (!is_null($view)) {
137 137
             return view($view, $data)->render();
138 138
         }
139 139
 
Please login to merge, or discard this patch.
src/Routing/ModelRouter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     protected function registerModelBindings(Collection $aliases)
61 61
     {
62
-        $this->router->bind('adminModel', function ($model, Route $route) use ($aliases) {
62
+        $this->router->bind('adminModel', function($model, Route $route) use ($aliases) {
63 63
             if (is_null($model = $aliases->get($model))) {
64 64
                 throw new ModelNotFoundException();
65 65
             }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     protected function runCustomController(Route $route, $controller, $action)
87 87
     {
88
-        $route->uses(function () use ($route, $controller, $action) {
88
+        $route->uses(function() use ($route, $controller, $action) {
89 89
             return (new ControllerDispatcher($this->app))->dispatch(
90 90
                 $route, $this->app->make($controller), $action
91 91
             );
Please login to merge, or discard this patch.
src/Traits/SelectOptionsFromModel.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             $modelForOptions = app($modelForOptions);
65 65
         }
66 66
 
67
-        if (! ($modelForOptions instanceof Model)) {
67
+        if (!($modelForOptions instanceof Model)) {
68 68
             throw new SelectException('Class must be instanced of Illuminate\Database\Eloquent\Model');
69 69
         }
70 70
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function setFetchColumns($columns)
123 123
     {
124
-        if (! is_array($columns)) {
124
+        if (!is_array($columns)) {
125 125
             $columns = func_get_args();
126 126
         }
127 127
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
         $options = $repository->getQuery();
218 218
 
219
-        if ($this->isEmptyRelation() && ! is_null($foreignKey = $this->getForeignKey())) {
219
+        if ($this->isEmptyRelation() && !is_null($foreignKey = $this->getForeignKey())) {
220 220
             $relation = $this->getModelAttributeKey();
221 221
             $model = $this->getModel();
222 222
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
         }
233 233
 
234 234
         // call the pre load options query preparer if has be set
235
-        if (! is_null($preparer = $this->getLoadOptionsQueryPreparer())) {
235
+        if (!is_null($preparer = $this->getLoadOptionsQueryPreparer())) {
236 236
             $options = $preparer($this, $options);
237 237
         }
238 238
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
             // iterate for all options and redefine it as
248 248
             // list of KEY and TEXT pair
249
-            $options = array_map(function ($opt) use ($key, $makeDisplay) {
249
+            $options = array_map(function($opt) use ($key, $makeDisplay) {
250 250
                 // get the KEY and make the display text
251 251
                 return [data_get($opt, $key), $makeDisplay($opt)];
252 252
             }, $options);
Please login to merge, or discard this patch.
src/Traits/FormElements.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function initializeElements()
25 25
     {
26
-        $this->getElements()->each(function ($element) {
26
+        $this->getElements()->each(function($element) {
27 27
             if ($element instanceof Initializable) {
28 28
                 $element->initialize();
29 29
             }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         foreach ($this->getElements() as $element) {
43 43
             if ($element instanceof ElementsInterface) {
44
-                if (! is_null($found = $element->getElement($path))) {
44
+                if (!is_null($found = $element->getElement($path))) {
45 45
                     return $found;
46 46
                 }
47 47
             }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     protected function setModelForElements(Model $model)
147 147
     {
148
-        $this->getElements()->each(function ($element) use ($model) {
148
+        $this->getElements()->each(function($element) use ($model) {
149 149
             $element = $this->getElementContainer($element);
150 150
 
151 151
             if ($element instanceof WithModelInterface) {
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     protected function getValidationRulesFromElements(array $rules = [])
165 165
     {
166
-        $this->getElements()->onlyActive()->each(function ($element) use (&$rules) {
166
+        $this->getElements()->onlyActive()->each(function($element) use (&$rules) {
167 167
             $element = $this->getElementContainer($element);
168 168
 
169 169
             if ($element instanceof Validable) {
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
      */
182 182
     protected function getValidationMessagesForElements(array $messages = [])
183 183
     {
184
-        $this->getElements()->onlyActive()->each(function ($element) use (&$messages) {
184
+        $this->getElements()->onlyActive()->each(function($element) use (&$messages) {
185 185
             $element = $this->getElementContainer($element);
186 186
 
187 187
             if ($element instanceof Validable) {
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
      */
200 200
     protected function getValidationLabelsForElements(array $labels = [])
201 201
     {
202
-        $this->getElements()->onlyActive()->each(function ($element) use (&$labels) {
202
+        $this->getElements()->onlyActive()->each(function($element) use (&$labels) {
203 203
             $element = $this->getElementContainer($element);
204 204
 
205 205
             if ($element instanceof Validable) {
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
      */
218 218
     protected function saveElements(\Illuminate\Http\Request $request)
219 219
     {
220
-        $this->getElements()->onlyActive()->each(function ($element) use ($request) {
220
+        $this->getElements()->onlyActive()->each(function($element) use ($request) {
221 221
             $element = $this->getElementContainer($element);
222 222
 
223 223
             if ($element instanceof FormElementInterface) {
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      */
234 234
     protected function afterSaveElements(\Illuminate\Http\Request $request)
235 235
     {
236
-        $this->getElements()->onlyActive()->each(function ($element) use ($request) {
236
+        $this->getElements()->onlyActive()->each(function($element) use ($request) {
237 237
             $element = $this->getElementContainer($element);
238 238
 
239 239
             if ($element instanceof FormElementInterface) {
Please login to merge, or discard this patch.
src/Http/routes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 use Illuminate\Routing\Router;
4 4
 
5
-$router->group(['as' => 'admin.', 'namespace' => 'SleepingOwl\Admin\Http\Controllers'], function (Router $router) {
6
-    if (! $router->has('admin.dashboard')) {
5
+$router->group(['as' => 'admin.', 'namespace' => 'SleepingOwl\Admin\Http\Controllers'], function(Router $router) {
6
+    if (!$router->has('admin.dashboard')) {
7 7
         $router->get('', ['as' => 'dashboard', 'uses' => 'AdminController@getDashboard']);
8 8
     }
9 9
 
Please login to merge, or discard this patch.
src/Http/Controllers/DisplayController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
         $display = $model->fireDisplay();
87 87
 
88 88
         if ($display instanceof DisplayTabbed) {
89
-            $display->getTabs()->each(function (DisplayTab $tab) use ($request) {
89
+            $display->getTabs()->each(function(DisplayTab $tab) use ($request) {
90 90
                 $content = $tab->getContent();
91 91
                 if ($content instanceof DisplayTree) {
92 92
                     $content->getRepository()->reorder(
Please login to merge, or discard this patch.
src/Form/Buttons/Delete.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             return false;
41 41
         }
42 42
 
43
-        $this->show = ! $this->isTrashed() && $this->getModelConfiguration()->isDeletable($this->getModel());
43
+        $this->show = !$this->isTrashed() && $this->getModelConfiguration()->isDeletable($this->getModel());
44 44
 
45 45
         return parent::canShow();
46 46
     }
Please login to merge, or discard this patch.
src/Form/Buttons/Restore.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      */
37 37
     public function canShow()
38 38
     {
39
-        if (is_null($this->getModel()->getKey()) || ! $this->show) {
39
+        if (is_null($this->getModel()->getKey()) || !$this->show) {
40 40
             return false;
41 41
         }
42 42
 
Please login to merge, or discard this patch.