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
Branch development (1144d9)
by butschster
09:48
created
src/Http/Controllers/AdminController.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 
51 51
         $admin->navigation()->setCurrentUrl($request->url());
52 52
 
53
-        if (! $this->breadcrumbs->exists('home')) {
54
-            $this->breadcrumbs->register('home', function ($breadcrumbs) {
53
+        if (!$this->breadcrumbs->exists('home')) {
54
+            $this->breadcrumbs->register('home', function($breadcrumbs) {
55 55
                 $breadcrumbs->push(trans('sleeping_owl::lang.dashboard'), route('admin.dashboard'));
56 56
             });
57 57
         }
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
         }
73 73
 
74 74
         foreach ($breadcrumbs as  $breadcrumb) {
75
-            if (! $this->breadcrumbs->exists($breadcrumb['id'])) {
76
-                $this->breadcrumbs->register($breadcrumb['id'], function ($breadcrumbs) use ($breadcrumb) {
75
+            if (!$this->breadcrumbs->exists($breadcrumb['id'])) {
76
+                $this->breadcrumbs->register($breadcrumb['id'], function($breadcrumbs) use ($breadcrumb) {
77 77
                     $breadcrumbs->parent($breadcrumb['parent']);
78 78
                     $breadcrumbs->push($breadcrumb['title'], $breadcrumb['url']);
79 79
                 });
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function getDisplay(ModelConfigurationInterface $model)
119 119
     {
120
-        if (! $model->isDisplayable()) {
120
+        if (!$model->isDisplayable()) {
121 121
             abort(404);
122 122
         }
123 123
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function getCreate(ModelConfigurationInterface $model)
135 135
     {
136
-        if (! $model->isCreatable()) {
136
+        if (!$model->isCreatable()) {
137 137
             abort(404);
138 138
         }
139 139
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function postStore(ModelConfigurationInterface $model, Request $request)
154 154
     {
155
-        if (! $model->isCreatable()) {
155
+        if (!$model->isCreatable()) {
156 156
             abort(404);
157 157
         }
158 158
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
             $redirectPolicy = $model->getRedirect();
189 189
 
190 190
             /* Make redirect when use in model config && Fix editable redirect */
191
-            if ($redirectPolicy->get('create') == 'display' || ! $model->isEditable($newModel)) {
191
+            if ($redirectPolicy->get('create') == 'display' || !$model->isEditable($newModel)) {
192 192
                 $redirectUrl = $model->getDisplayUrl();
193 193
             }
194 194
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     {
226 226
         $item = $model->getRepository()->find($id);
227 227
 
228
-        if (is_null($item) || ! $model->isEditable($item)) {
228
+        if (is_null($item) || !$model->isEditable($item)) {
229 229
             abort(404);
230 230
         }
231 231
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         $editForm = $model->fireEdit($id);
250 250
         $item = $editForm->getModel();
251 251
 
252
-        if (is_null($item) || ! $model->isEditable($item)) {
252
+        if (is_null($item) || !$model->isEditable($item)) {
253 253
             abort(404);
254 254
         }
255 255
 
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
         $display = $model->fireDisplay();
323 323
 
324 324
         /** @var ColumnEditableInterface|null $column */
325
-        $column = $display->getColumns()->all()->filter(function ($column) use ($field) {
325
+        $column = $display->getColumns()->all()->filter(function($column) use ($field) {
326 326
             return ($column instanceof ColumnEditableInterface) and $field == $column->getName();
327 327
         })->first();
328 328
 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
         $repository = $model->getRepository();
334 334
         $item = $repository->find($id);
335 335
 
336
-        if (is_null($item) || ! $model->isEditable($item)) {
336
+        if (is_null($item) || !$model->isEditable($item)) {
337 337
             abort(404);
338 338
         }
339 339
 
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
     {
361 361
         $item = $model->getRepository()->find($id);
362 362
 
363
-        if (is_null($item) || ! $model->isDeletable($item)) {
363
+        if (is_null($item) || !$model->isDeletable($item)) {
364 364
             abort(404);
365 365
         }
366 366
 
@@ -389,13 +389,13 @@  discard block
 block discarded – undo
389 389
      */
390 390
     public function deleteDestroy(ModelConfigurationInterface $model, Request $request, $id)
391 391
     {
392
-        if (! $model->isRestorableModel()) {
392
+        if (!$model->isRestorableModel()) {
393 393
             abort(404);
394 394
         }
395 395
 
396 396
         $item = $model->getRepository()->findOnlyTrashed($id);
397 397
 
398
-        if (is_null($item) || ! $model->isRestorable($item)) {
398
+        if (is_null($item) || !$model->isRestorable($item)) {
399 399
             abort(404);
400 400
         }
401 401
 
@@ -424,13 +424,13 @@  discard block
 block discarded – undo
424 424
      */
425 425
     public function postRestore(ModelConfigurationInterface $model, Request $request, $id)
426 426
     {
427
-        if (! $model->isRestorableModel()) {
427
+        if (!$model->isRestorableModel()) {
428 428
             abort(404);
429 429
         }
430 430
 
431 431
         $item = $model->getRepository()->findOnlyTrashed($id);
432 432
 
433
-        if (is_null($item) || ! $model->isRestorable($item)) {
433
+        if (is_null($item) || !$model->isRestorable($item)) {
434 434
             abort(404);
435 435
         }
436 436
 
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
      */
557 557
     protected function registerBreadcrumb($title, $parent)
558 558
     {
559
-        $this->breadcrumbs->register('render', function ($breadcrumbs) use ($title, $parent) {
559
+        $this->breadcrumbs->register('render', function($breadcrumbs) use ($title, $parent) {
560 560
             $breadcrumbs->parent($parent);
561 561
             $breadcrumbs->push($title);
562 562
         });
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
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
         $display = $model->fireDisplay();
60 60
 
61 61
         if ($display instanceof DisplayTabbed) {
62
-            $display->getTabs()->each(function ($tab) use($request) {
62
+            $display->getTabs()->each(function($tab) use($request) {
63 63
                 $content = $tab->getContent();
64 64
                 if ($content instanceof DisplayTree) {
65 65
                     $content->getRepository()->reorder(
Please login to merge, or discard this patch.
src/Model/ModelCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      */
13 13
     public function aliases()
14 14
     {
15
-        return $this->map(function (ModelConfigurationInterface $model) {
15
+        return $this->map(function(ModelConfigurationInterface $model) {
16 16
             return $model->getAlias();
17 17
         });
18 18
     }
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function keyByAlias()
24 24
     {
25
-        return $this->keyBy(function (ModelConfigurationInterface $model) {
25
+        return $this->keyBy(function(ModelConfigurationInterface $model) {
26 26
             return $model->getAlias();
27 27
         });
28 28
     }
Please login to merge, or discard this patch.
src/Model/ModelConfiguration.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      */
201 201
     public function isCreatable()
202 202
     {
203
-        if (! is_callable($this->getCreate())) {
203
+        if (!is_callable($this->getCreate())) {
204 204
             return false;
205 205
         }
206 206
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      */
225 225
     public function isEditable(Model $model)
226 226
     {
227
-        if (! is_callable($this->getEdit())) {
227
+        if (!is_callable($this->getEdit())) {
228 228
             return false;
229 229
         }
230 230
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
      */
347 347
     public function fireDisplay()
348 348
     {
349
-        if (! is_callable($this->getDisplay())) {
349
+        if (!is_callable($this->getDisplay())) {
350 350
             return;
351 351
         }
352 352
 
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
      */
388 388
     public function fireCreate()
389 389
     {
390
-        if (! is_callable($this->getCreate())) {
390
+        if (!is_callable($this->getCreate())) {
391 391
             return;
392 392
         }
393 393
 
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
      */
435 435
     public function fireEdit($id)
436 436
     {
437
-        if (! is_callable($this->getEdit())) {
437
+        if (!is_callable($this->getEdit())) {
438 438
             return;
439 439
         }
440 440
 
Please login to merge, or discard this patch.
src/Form/FormDefault.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
 
100 100
         parent::initialize();
101 101
 
102
-        if (! $this->hasHtmlAttribute('enctype')) {
102
+        if (!$this->hasHtmlAttribute('enctype')) {
103 103
             // Try to find upload element
104
-            $this->getElements()->each(function ($element) {
104
+            $this->getElements()->each(function($element) {
105 105
 
106 106
                 // TODO: this not works withs nested elements
107
-                if ($element instanceof Upload and ! $this->hasHtmlAttribute('enctype')) {
107
+                if ($element instanceof Upload and !$this->hasHtmlAttribute('enctype')) {
108 108
                     $this->setHtmlAttribute('enctype', 'multipart/form-data');
109 109
                 }
110 110
             });
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      */
208 208
     public function setItems($items)
209 209
     {
210
-        if (! is_array($items)) {
210
+        if (!is_array($items)) {
211 211
             $items = func_get_args();
212 212
         }
213 213
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public function setId($id)
236 236
     {
237
-        if (is_null($this->id) and ! is_null($id) and ($model = $this->getRepository()->find($id))) {
237
+        if (is_null($this->id) and !is_null($id) and ($model = $this->getRepository()->find($id))) {
238 238
             $this->id = $id;
239 239
 
240 240
             $this->setModel($model);
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
      */
302 302
     public function saveForm(\Illuminate\Http\Request $request, ModelConfigurationInterface $modelConfiguration = null)
303 303
     {
304
-        if (! $this->validModelConfiguration($modelConfiguration)) {
304
+        if (!$this->validModelConfiguration($modelConfiguration)) {
305 305
             return false;
306 306
         }
307 307
 
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
     protected function saveBelongsToRelations(Model $model)
342 342
     {
343 343
         foreach ($model->getRelations() as $name => $relation) {
344
-            if ($model->{$name}() instanceof BelongsTo && ! is_null($relation)) {
344
+            if ($model->{$name}() instanceof BelongsTo && !is_null($relation)) {
345 345
                 $relation->save();
346 346
                 $model->{$name}()->associate($relation);
347 347
             }
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
     protected function saveHasOneRelations(Model $model)
357 357
     {
358 358
         foreach ($model->getRelations() as $name => $relation) {
359
-            if ($model->{$name}() instanceof HasOneOrMany && ! is_null($relation)) {
359
+            if ($model->{$name}() instanceof HasOneOrMany && !is_null($relation)) {
360 360
                 if (is_array($relation) || $relation instanceof \Traversable) {
361 361
                     $model->{$name}()->saveMany($relation);
362 362
                 } else {
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
      */
375 375
     public function validateForm(\Illuminate\Http\Request $request, ModelConfigurationInterface $modelConfiguration = null)
376 376
     {
377
-        if (! $this->validModelConfiguration($modelConfiguration)) {
377
+        if (!$this->validModelConfiguration($modelConfiguration)) {
378 378
             return;
379 379
         }
380 380
 
Please login to merge, or discard this patch.
src/Form/Element/File.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $routeName = 'admin.form.element.'.static::$route;
28 28
 
29
-        if (! $router->has($routeName)) {
29
+        if (!$router->has($routeName)) {
30 30
             $router->post('{adminModel}/'.static::$route.'/{field}/{id?}', [
31 31
                 'as' => $routeName,
32 32
                 'uses' => 'SleepingOwl\Admin\Http\Controllers\UploadController@fromField'
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function getUploadPath(UploadedFile $file)
97 97
     {
98
-        if (! is_callable($this->uploadPath)) {
98
+        if (!is_callable($this->uploadPath)) {
99 99
             return $this->defaultUploadPath($file);
100 100
         }
101 101
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function getUploadFileName(UploadedFile $file)
123 123
     {
124
-        if (! is_callable($this->uploadFileName)) {
124
+        if (!is_callable($this->uploadFileName)) {
125 125
             return $this->defaultUploadFilename($file);
126 126
         }
127 127
 
Please login to merge, or discard this patch.
src/Form/Element/DependentSelect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     {
18 18
         $routeName = 'admin.form.element.dependent-select';
19 19
 
20
-        if (! $router->has($routeName)) {
20
+        if (!$router->has($routeName)) {
21 21
             $router->post('{adminModel}/dependent-select/{field}/{id?}', [
22 22
                 'as' => $routeName,
23 23
                 'uses' => 'SleepingOwl\Admin\Http\Controllers\FormElementController@dependentSelect'
Please login to merge, or discard this patch.
src/Form/Element/NamedFormElement.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     {
83 83
         $name = array_shift($parts);
84 84
 
85
-        while (! empty($parts)) {
85
+        while (!empty($parts)) {
86 86
             $part = array_shift($parts);
87 87
             $name .= "[$part]";
88 88
         }
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     {
236 236
         $this->addValidationRule('_unique');
237 237
 
238
-        if (! is_null($message)) {
238
+        if (!is_null($message)) {
239 239
             $this->addValidationMessage('unique', $message);
240 240
         }
241 241
 
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
      */
344 344
     public function getValueFromRequest(\Illuminate\Http\Request $request)
345 345
     {
346
-        if ($request->hasSession() && ! is_null($value = $request->old($this->getPath()))) {
346
+        if ($request->hasSession() && !is_null($value = $request->old($this->getPath()))) {
347 347
             return $value;
348 348
         }
349 349
 
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
      */
356 356
     public function getValueFromModel()
357 357
     {
358
-        if (! is_null($value = $this->getValueFromRequest(request()))) {
358
+        if (!is_null($value = $this->getValueFromRequest(request()))) {
359 359
             return $value;
360 360
         }
361 361
 
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
         $path = $this->getPath();
364 364
         $value = $this->getDefaultValue();
365 365
 
366
-        if (is_null($model) or ! $model->exists) {
366
+        if (is_null($model) or !$model->exists) {
367 367
             return $value;
368 368
         }
369 369
 
Please login to merge, or discard this patch.
src/Form/Element/Select.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function getOptions()
56 56
     {
57
-        if (! is_null($this->getModelForOptions()) && ! is_null($this->getDisplay())) {
57
+        if (!is_null($this->getModelForOptions()) && !is_null($this->getDisplay())) {
58 58
             $this->setOptions(
59 59
                 $this->loadOptions()
60 60
             );
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      */
136 136
     public function exclude($keys)
137 137
     {
138
-        if (! is_array($keys)) {
138
+        if (!is_array($keys)) {
139 139
             $keys = func_get_args();
140 140
         }
141 141
 
Please login to merge, or discard this patch.