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/Form/Element/NamedFormElement.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@
 block discarded – undo
181 181
     }
182 182
 
183 183
     /**
184
-     * @param mixed $defaultValue
184
+     * @param string $defaultValue
185 185
      *
186 186
      * @return $this
187 187
      */
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     {
86 86
         $name = array_shift($parts);
87 87
 
88
-        while (! empty($parts)) {
88
+        while (!empty($parts)) {
89 89
             $part = array_shift($parts);
90 90
             $name .= "[$part]";
91 91
         }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     {
239 239
         $this->addValidationRule('_unique');
240 240
 
241
-        if (! is_null($message)) {
241
+        if (!is_null($message)) {
242 242
             $this->addValidationMessage('unique', $message);
243 243
         }
244 244
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
      */
347 347
     public function getValueFromRequest(\Illuminate\Http\Request $request)
348 348
     {
349
-        if ($request->hasSession() && ! is_null($value = $request->old($this->getPath()))) {
349
+        if ($request->hasSession() && !is_null($value = $request->old($this->getPath()))) {
350 350
             return $value;
351 351
         }
352 352
 
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
      */
359 359
     public function getValueFromModel()
360 360
     {
361
-        if (! is_null($value = $this->getValueFromRequest(request()))) {
361
+        if (!is_null($value = $this->getValueFromRequest(request()))) {
362 362
             return $value;
363 363
         }
364 364
 
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
         $path = $this->getPath();
367 367
         $value = $this->getDefaultValue();
368 368
 
369
-        if (is_null($model) || ! $model->exists) {
369
+        if (is_null($model) || !$model->exists) {
370 370
             return $value;
371 371
         }
372 372
 
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
         if ($count === 1) {
397 397
             $attribute = $model->getAttribute($this->getModelAttributeKey());
398 398
 
399
-            if (! empty($attribute) || $attribute === 0 || is_null($value)) {
399
+            if (!empty($attribute) || $attribute === 0 || is_null($value)) {
400 400
                 return $attribute;
401 401
             }
402 402
         }
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
             if ($count === 2) {
411 411
                 $attribute = $model->getAttribute($relation);
412 412
 
413
-                if (! empty($attribute) || is_null($value)) {
413
+                if (!empty($attribute) || is_null($value)) {
414 414
                     return $attribute;
415 415
                 }
416 416
             }
Please login to merge, or discard this patch.
src/Templates/Template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
      */
102 102
     public function assetPath($path = null)
103 103
     {
104
-        return ! is_null($path) ? $this->assetDir().'/'.ltrim($path, '/') : $this->assetDir();
104
+        return !is_null($path) ? $this->assetDir().'/'.ltrim($path, '/') : $this->assetDir();
105 105
     }
106 106
 
107 107
     /**
Please login to merge, or discard this patch.
src/Model/ModelConfiguration.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
      */
205 205
     public function can($action, Model $model)
206 206
     {
207
-        if (! $this->checkAccess) {
207
+        if (!$this->checkAccess) {
208 208
             return true;
209 209
         }
210 210
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
      */
217 217
     public function isCreatable()
218 218
     {
219
-        if (! is_callable($this->getCreate())) {
219
+        if (!is_callable($this->getCreate())) {
220 220
             return false;
221 221
         }
222 222
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
      */
241 241
     public function isEditable(Model $model)
242 242
     {
243
-        if (! is_callable($this->getEdit())) {
243
+        if (!is_callable($this->getEdit())) {
244 244
             return false;
245 245
         }
246 246
 
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
      */
364 364
     public function fireDisplay(array $payload = [])
365 365
     {
366
-        if (! is_callable($this->getDisplay())) {
366
+        if (!is_callable($this->getDisplay())) {
367 367
             return;
368 368
         }
369 369
 
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
      */
410 410
     public function fireCreate()
411 411
     {
412
-        if (! is_callable($this->getCreate())) {
412
+        if (!is_callable($this->getCreate())) {
413 413
             return;
414 414
         }
415 415
 
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
      */
457 457
     public function fireEdit($id)
458 458
     {
459
-        if (! is_callable($this->getEdit())) {
459
+        if (!is_callable($this->getEdit())) {
460 460
             return;
461 461
         }
462 462
 
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -108,6 +108,9 @@
 block discarded – undo
108 108
 
109 109
     protected $breadcrumbs = null;
110 110
 
111
+    /**
112
+     * @param string $class
113
+     */
111 114
     public function __construct(\Illuminate\Contracts\Foundation\Application $app, $class)
112 115
     {
113 116
         parent::__construct($app, $class);
Please login to merge, or discard this patch.
src/Model/SectionModelConfiguration.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function fireDisplay(array $payload = [])
35 35
     {
36
-        if (! method_exists($this, 'onDisplay')) {
36
+        if (!method_exists($this, 'onDisplay')) {
37 37
             return;
38 38
         }
39 39
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function fireCreate()
58 58
     {
59
-        if (! method_exists($this, 'onCreate')) {
59
+        if (!method_exists($this, 'onCreate')) {
60 60
             return;
61 61
         }
62 62
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function fireEdit($id)
85 85
     {
86
-        if (! method_exists($this, 'onEdit')) {
86
+        if (!method_exists($this, 'onEdit')) {
87 87
             return;
88 88
         }
89 89
 
Please login to merge, or discard this patch.
src/Form/Buttons/Destroy.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.
src/Display/Column/Editable/EditableColumn.php 3 patches
Doc Comments   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,9 +40,8 @@  discard block
 block discarded – undo
40 40
     }
41 41
 
42 42
     /**
43
-     * @param bool $sortable
44 43
      *
45
-     * @return $this
44
+     * @return string
46 45
      */
47 46
     public function getTitle()
48 47
     {
@@ -54,7 +53,6 @@  discard block
 block discarded – undo
54 53
     }
55 54
 
56 55
     /**
57
-     * @param bool $sortable
58 56
      *
59 57
      * @return $this
60 58
      */
@@ -79,7 +77,7 @@  discard block
 block discarded – undo
79 77
 
80 78
     /**
81 79
      * @param $url
82
-     * @return string
80
+     * @return EditableColumn
83 81
      */
84 82
     public function setUrl($url)
85 83
     {
@@ -98,7 +96,7 @@  discard block
 block discarded – undo
98 96
 
99 97
     /**
100 98
      * @param $url
101
-     * @return string
99
+     * @return EditableColumn
102 100
      */
103 101
     public function setEditableMode($mode)
104 102
     {
Please login to merge, or discard this 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 SleepingOwl\Admin\Display\Column\Editable;
4 4
 
5
-use Illuminate\Http\Request;
6 5
 use SleepingOwl\Admin\Display\Column\NamedColumn;
7 6
 
8 7
 class EditableColumn extends NamedColumn
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
      */
71 71
     public function getUrl()
72 72
     {
73
-        if (! $this->url) {
73
+        if (!$this->url) {
74 74
             return request()->url();
75 75
         }
76 76
 
Please login to merge, or discard this patch.
src/Display/Column/NamedColumn.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
     /**
100 100
      * Get column value from instance.
101 101
      *
102
-     * @param Collection|Model|Closure $instance
102
+     * @param Model $instance
103 103
      * @param string $name
104 104
      *
105 105
      * @return mixed
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function setOrderable($orderable = true)
77 77
     {
78
-        if ($orderable !== false && ! $orderable instanceof OrderByClauseInterface) {
79
-            if (! is_string($orderable) && ! $orderable instanceof Closure) {
78
+        if ($orderable !== false && !$orderable instanceof OrderByClauseInterface) {
79
+            if (!is_string($orderable) && !$orderable instanceof Closure) {
80 80
                 $orderable = $this->getName();
81 81
             }
82 82
         }
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
             if ($instance === null) {
145 145
                 $instance = collect();
146 146
             }
147
-        } elseif (! is_null($instance)) {
147
+        } elseif (!is_null($instance)) {
148 148
             $instance = $instance->getAttribute($part);
149 149
         }
150 150
 
151
-        if (! empty($parts) && ! is_null($instance)) {
151
+        if (!empty($parts) && !is_null($instance)) {
152 152
             return $this->getValueFromObject($instance, implode('.', $parts));
153 153
         }
154 154
 
Please login to merge, or discard this patch.
src/Form/FormDefault.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@
 block discarded – undo
192 192
      * @deprecated 4.5.0
193 193
      * @see getElements()
194 194
      *
195
-     * @return Collection[]
195
+     * @return FormElementsCollection
196 196
      */
197 197
     public function getItems()
198 198
     {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
 
101 101
         parent::initialize();
102 102
 
103
-        if (! $this->hasHtmlAttribute('enctype')) {
103
+        if (!$this->hasHtmlAttribute('enctype')) {
104 104
             // Try to find upload element
105
-            $this->getElements()->each(function ($element) {
105
+            $this->getElements()->each(function($element) {
106 106
                 // Try to get nested - will be implemented
107
-                if ($element instanceof Upload && ! $this->hasHtmlAttribute('enctype')) {
107
+                if ($element instanceof Upload && !$this->hasHtmlAttribute('enctype')) {
108 108
                     $this->setHtmlAttribute('enctype', 'multipart/form-data');
109 109
                 }
110 110
             });
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
      */
210 210
     public function setItems($items)
211 211
     {
212
-        if (! is_array($items)) {
212
+        if (!is_array($items)) {
213 213
             $items = func_get_args();
214 214
         }
215 215
 
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
      */
237 237
     public function setId($id)
238 238
     {
239
-        if (is_null($this->id) && ! is_null($id) && ($model = $this->getRepository()->find($id))) {
239
+        if (is_null($this->id) && !is_null($id) && ($model = $this->getRepository()->find($id))) {
240 240
             $this->id = $id;
241 241
 
242 242
             parent::setModel($model);
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
      */
298 298
     public function saveForm(\Illuminate\Http\Request $request, ModelConfigurationInterface $modelConfiguration = null)
299 299
     {
300
-        if (! $this->validModelConfiguration($modelConfiguration)) {
300
+        if (!$this->validModelConfiguration($modelConfiguration)) {
301 301
             return false;
302 302
         }
303 303
 
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
     protected function saveBelongsToRelations(Model $model)
338 338
     {
339 339
         foreach ($model->getRelations() as $name => $relation) {
340
-            if ($model->{$name}() instanceof BelongsTo && ! is_null($relation)) {
340
+            if ($model->{$name}() instanceof BelongsTo && !is_null($relation)) {
341 341
                 $relation->save();
342 342
                 $model->{$name}()->associate($relation);
343 343
             }
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
     protected function saveHasOneRelations(Model $model)
353 353
     {
354 354
         foreach ($model->getRelations() as $name => $relation) {
355
-            if ($model->{$name}() instanceof HasOneOrMany && ! is_null($relation)) {
355
+            if ($model->{$name}() instanceof HasOneOrMany && !is_null($relation)) {
356 356
                 if (is_array($relation) || $relation instanceof \Traversable) {
357 357
                     $model->{$name}()->saveMany($relation);
358 358
                 } else {
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
      */
371 371
     public function validateForm(\Illuminate\Http\Request $request, ModelConfigurationInterface $modelConfiguration = null)
372 372
     {
373
-        if (! $this->validModelConfiguration($modelConfiguration)) {
373
+        if (!$this->validModelConfiguration($modelConfiguration)) {
374 374
             return;
375 375
         }
376 376
 
Please login to merge, or discard this patch.
src/Http/Controllers/FormElementController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 {
14 14
     /**
15 15
      * @param ModelConfigurationInterface $model
16
-     * @param null $id
16
+     * @param integer|null $id
17 17
      * @return JsonResponse|mixed
18 18
      */
19 19
     public function getModelLogic(ModelConfigurationInterface $model, $id = null)
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public function getModelLogic(ModelConfigurationInterface $model, $id = null)
20 20
     {
21
-        if (! is_null($id)) {
21
+        if (!is_null($id)) {
22 22
             $item = $model->getRepository()->find($id);
23
-            if (is_null($item) || ! $model->isEditable($item)) {
23
+            if (is_null($item) || !$model->isEditable($item)) {
24 24
                 return new JsonResponse([
25 25
                     'message' => trans('lang.message.access_denied'),
26 26
                 ], 403);
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
             return $model->fireEdit($id);
30 30
         }
31 31
 
32
-        if (! $model->isCreatable()) {
32
+        if (!$model->isCreatable()) {
33 33
             return new JsonResponse([
34 34
                 'message' => trans('lang.message.access_denied'),
35 35
             ], 403);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         }
75 75
 
76 76
         return new JsonResponse([
77
-            'output'   => collect($options)->map(function ($value, $key) {
77
+            'output'   => collect($options)->map(function($value, $key) {
78 78
                 return ['id' => $key, 'name' => $value];
79 79
             }),
80 80
             'selected' => $element->getValueFromModel(),
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             return new JsonResponse(
127 127
                 $model::where($request->search, 'like', "%{$request->q}%")
128 128
                     ->get()
129
-                    ->map(function (Model $item) use ($field) {
129
+                    ->map(function(Model $item) use ($field) {
130 130
                         return [
131 131
                             'tag_name'    => $item->{$field},
132 132
                             'id'          => $item->id,
Please login to merge, or discard this patch.