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 ( bdd454...fdafab )
by butschster
05:37
created
src/Display/DisplayTree.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
     public static function registerRoutes(Router $router)
24 24
     {
25 25
         $routeName = 'admin.display.tree.reorder';
26
-        if (! $router->has($routeName)) {
27
-            $router->post('{adminModel}/reorder', ['as' => $routeName, function (ModelConfigurationInterface $model) {
26
+        if (!$router->has($routeName)) {
27
+            $router->post('{adminModel}/reorder', [ 'as' => $routeName, function(ModelConfigurationInterface $model) {
28 28
                 $model->fireDisplay()->getRepository()->reorder(
29 29
                     Request::input('data')
30 30
                 );
31
-            }]);
31
+            } ]);
32 32
         }
33 33
     }
34 34
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     /**
41 41
      * @var array
42 42
      */
43
-    protected $parameters = [];
43
+    protected $parameters = [ ];
44 44
 
45 45
     /**
46 46
      * @var bool
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      */
209 209
     public function setParameter($key, $value)
210 210
     {
211
-        $this->parameters[$key] = $value;
211
+        $this->parameters[ $key ] = $value;
212 212
 
213 213
         return $this;
214 214
     }
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
             'value' => $this->getValue(),
256 256
             'creatable' => $model->isCreatable(),
257 257
             'createUrl' => $model->getCreateUrl($this->getParameters() + Request::all()),
258
-            'controls' => [app('sleeping_owl.table.column')->treeControl()],
258
+            'controls' => [ app('sleeping_owl.table.column')->treeControl() ],
259 259
         ];
260 260
     }
261 261
 
@@ -273,11 +273,11 @@  discard block
 block discarded – undo
273 273
      */
274 274
     public function getCollection()
275 275
     {
276
-        if (! $this->isInitialized()) {
276
+        if (!$this->isInitialized()) {
277 277
             throw new \Exception('Display is not initialized');
278 278
         }
279 279
 
280
-        if (! is_null($this->collection)) {
280
+        if (!is_null($this->collection)) {
281 281
             return $this->collection;
282 282
         }
283 283
 
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
      */
294 294
     protected function modifyQuery(\Illuminate\Database\Eloquent\Builder $query)
295 295
     {
296
-        $this->extensions->each(function (DisplayExtensionInterface $extension) use ($query) {
296
+        $this->extensions->each(function(DisplayExtensionInterface $extension) use ($query) {
297 297
             $extension->modifyQuery($query);
298 298
         });
299 299
     }
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
     {
307 307
         $repository = parent::makeRepository();
308 308
 
309
-        if (! ($repository instanceof TreeRepositoryInterface)) {
309
+        if (!($repository instanceof TreeRepositoryInterface)) {
310 310
             throw new \Exception('Repository class must be instanced of [TreeRepositoryInterface]');
311 311
         }
312 312
 
Please login to merge, or discard this patch.
src/Display/Filter/FilterField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@
 block discarded – undo
38 38
             $relationName = implode('.', $parts);
39 39
         }
40 40
 
41
-        if (! is_null($relationName)) {
42
-            $query->whereHas($relationName, function ($q) use ($name, $value) {
41
+        if (!is_null($relationName)) {
42
+            $query->whereHas($relationName, function($q) use ($name, $value) {
43 43
                 $this->buildQuery($q, $name, $value);
44 44
             });
45 45
         } else {
Please login to merge, or discard this patch.
src/Display/Filter/FilterBase.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $this->setName($name);
38 38
         $this->setAlias($name);
39 39
 
40
-        if (! is_null($title)) {
40
+        if (!is_null($title)) {
41 41
             $this->setTitle($title);
42 42
         }
43 43
     }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             return call_user_func($this->title, $this->getValue());
104 104
         }
105 105
 
106
-        return strtr($this->title, [':value' => $this->getValue()]);
106
+        return strtr($this->title, [ ':value' => $this->getValue() ]);
107 107
     }
108 108
 
109 109
     /**
@@ -143,6 +143,6 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function isActive()
145 145
     {
146
-        return ! is_null($this->getValue());
146
+        return !is_null($this->getValue());
147 147
     }
148 148
 }
Please login to merge, or discard this patch.
src/Display/Filter/FilterCustom.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     public function __construct(Closure $callback = null)
26 26
     {
27
-        if (! is_null($callback)) {
27
+        if (!is_null($callback)) {
28 28
             $this->setCallback($callback);
29 29
         }
30 30
 
Please login to merge, or discard this patch.
src/Display/DisplayTabbed.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     {
44 44
         $this->initializeElements();
45 45
 
46
-        $activeTabs = $this->getTabs()->filter(function (TabInterface $tab) {
46
+        $activeTabs = $this->getTabs()->filter(function(TabInterface $tab) {
47 47
             return $tab->isActive();
48 48
         })->count();
49 49
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function setModelClass($class)
59 59
     {
60
-        $this->getTabs()->each(function (TabInterface $tab) use ($class) {
60
+        $this->getTabs()->each(function(TabInterface $tab) use ($class) {
61 61
             if ($tab instanceof DisplayInterface) {
62 62
                 $tab->setModelClass($class);
63 63
             }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      */
138 138
     public function setAction($action)
139 139
     {
140
-        $this->getTabs()->each(function (TabInterface $tab) use ($action) {
140
+        $this->getTabs()->each(function(TabInterface $tab) use ($action) {
141 141
             if ($tab instanceof FormInterface) {
142 142
                 $tab->setAction($action);
143 143
             }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      */
150 150
     public function setId($id)
151 151
     {
152
-        $this->getTabs()->each(function (TabInterface $tab) use ($id) {
152
+        $this->getTabs()->each(function(TabInterface $tab) use ($id) {
153 153
             if ($tab instanceof FormInterface) {
154 154
                 $tab->setId($id);
155 155
             }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         foreach ($this->getTabs() as $tab) {
167 167
             if ($tab instanceof FormInterface) {
168 168
                 $result = $tab->validateForm($model);
169
-                if (! is_null($result)) {
169
+                if (!is_null($result)) {
170 170
                     return $result;
171 171
                 }
172 172
             }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      */
179 179
     public function saveForm(ModelConfigurationInterface $model)
180 180
     {
181
-        $this->getTabs()->each(function (TabInterface $tab) use ($model) {
181
+        $this->getTabs()->each(function(TabInterface $tab) use ($model) {
182 182
             if ($tab instanceof FormInterface) {
183 183
                 $tab->saveForm($model);
184 184
             }
Please login to merge, or discard this patch.
src/Model/SectionModelConfiguration.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function fireDisplay()
34 34
     {
35
-        if (! method_exists($this, 'onDisplay')) {
35
+        if (!method_exists($this, 'onDisplay')) {
36 36
             return;
37 37
         }
38 38
 
39
-        $display = app()->call([$this, 'onDisplay']);
39
+        $display = app()->call([ $this, 'onDisplay' ]);
40 40
 
41 41
         if ($display instanceof DisplayInterface) {
42 42
             $display->setModelClass($this->getClass());
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function fireCreate()
53 53
     {
54
-        if (! method_exists($this, 'onCreate')) {
54
+        if (!method_exists($this, 'onCreate')) {
55 55
             return;
56 56
         }
57 57
 
58
-        $form = app()->call([$this, 'onCreate']);
58
+        $form = app()->call([ $this, 'onCreate' ]);
59 59
         if ($form instanceof DisplayInterface) {
60 60
             $form->setModelClass($this->getClass());
61 61
         }
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function fireEdit($id)
80 80
     {
81
-        if (! method_exists($this, 'onEdit')) {
81
+        if (!method_exists($this, 'onEdit')) {
82 82
             return;
83 83
         }
84 84
 
85
-        $form = app()->call([$this, 'onEdit'], ['id' => $id]);
85
+        $form = app()->call([ $this, 'onEdit' ], [ 'id' => $id ]);
86 86
         if ($form instanceof DisplayInterface) {
87 87
             $form->setModelClass($this->getClass());
88 88
         }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     public function fireDelete($id)
108 108
     {
109 109
         if (method_exists($this, 'onDelete')) {
110
-            return app()->call([$this, 'onDelete'], ['id' => $id]);
110
+            return app()->call([ $this, 'onDelete' ], [ 'id' => $id ]);
111 111
         }
112 112
     }
113 113
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     public function fireDestroy($id)
120 120
     {
121 121
         if (method_exists($this, 'onDestroy')) {
122
-            return app()->call([$this, 'onDestroy'], ['id' => $id]);
122
+            return app()->call([ $this, 'onDestroy' ], [ 'id' => $id ]);
123 123
         }
124 124
     }
125 125
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     public function fireRestore($id)
132 132
     {
133 133
         if (method_exists($this, 'onRestore')) {
134
-            return app()->call([$this, 'onRestore'], ['id' => $id]);
134
+            return app()->call([ $this, 'onRestore' ], [ 'id' => $id ]);
135 135
         }
136 136
     }
137 137
 }
Please login to merge, or discard this patch.
src/Model/ModelConfiguration.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
      */
334 334
     public function isCreatable()
335 335
     {
336
-        if (! is_callable($this->getCreate())) {
336
+        if (!is_callable($this->getCreate())) {
337 337
             return false;
338 338
         }
339 339
 
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
      */
358 358
     public function isEditable(Model $model)
359 359
     {
360
-        if (! is_callable($this->getEdit())) {
360
+        if (!is_callable($this->getEdit())) {
361 361
             return false;
362 362
         }
363 363
 
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
      */
468 468
     public function fireDisplay()
469 469
     {
470
-        if (! is_callable($this->display)) {
470
+        if (!is_callable($this->display)) {
471 471
             return;
472 472
         }
473 473
 
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
      */
486 486
     public function fireCreate()
487 487
     {
488
-        if (! is_callable($this->create)) {
488
+        if (!is_callable($this->create)) {
489 489
             return;
490 490
         }
491 491
 
@@ -512,11 +512,11 @@  discard block
 block discarded – undo
512 512
      */
513 513
     public function fireEdit($id)
514 514
     {
515
-        if (! is_callable($this->edit)) {
515
+        if (!is_callable($this->edit)) {
516 516
             return;
517 517
         }
518 518
 
519
-        $form = app()->call($this->edit, ['id' => $id]);
519
+        $form = app()->call($this->edit, [ 'id' => $id ]);
520 520
         if ($form instanceof DisplayInterface) {
521 521
             $form->setModelClass($this->getClass());
522 522
         }
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
     public function fireDelete($id)
542 542
     {
543 543
         if (is_callable($this->getDelete())) {
544
-            return app()->call($this->getDelete(), [$id]);
544
+            return app()->call($this->getDelete(), [ $id ]);
545 545
         }
546 546
     }
547 547
 
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
     public function fireDestroy($id)
554 554
     {
555 555
         if (is_callable($this->getDestroy())) {
556
-            return app()->call($this->getDestroy(), [$id]);
556
+            return app()->call($this->getDestroy(), [ $id ]);
557 557
         }
558 558
     }
559 559
 
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
     public function fireRestore($id)
566 566
     {
567 567
         if (is_callable($this->getRestore())) {
568
-            return app()->call($this->getRestore(), [$id]);
568
+            return app()->call($this->getRestore(), [ $id ]);
569 569
         }
570 570
 
571 571
         return $this->getRestore();
Please login to merge, or discard this patch.
src/Form/Element/File.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -26,16 +26,16 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $routeName = 'admin.form.element.'.static::$route;
28 28
 
29
-        if (! $router->has($routeName)) {
30
-            $router->post('{adminModel}/'.static::$route.'/{field}/{id?}', ['as' => $routeName, function (
29
+        if (!$router->has($routeName)) {
30
+            $router->post('{adminModel}/'.static::$route.'/{field}/{id?}', [ 'as' => $routeName, function(
31 31
                 Request $request,
32 32
                 ModelConfigurationInterface $model,
33 33
                 $field,
34 34
                 $id = null
35 35
             ) {
36
-                if (! is_null($id)) {
36
+                if (!is_null($id)) {
37 37
                     $item = $model->getRepository()->find($id);
38
-                    if (is_null($item) || ! $model->isEditable($item)) {
38
+                    if (is_null($item) || !$model->isEditable($item)) {
39 39
                         return new JsonResponse([
40 40
                             'message' => trans('lang.message.access_denied'),
41 41
                         ], 403);
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
                     $form = $model->fireEdit($id);
45 45
                 } else {
46
-                    if (! $model->isCreatable()) {
46
+                    if (!$model->isCreatable()) {
47 47
                         return new JsonResponse([
48 48
                             'message' => trans('lang.message.access_denied'),
49 49
                         ], 403);
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
                     $form = $model->fireCreate();
53 53
                 }
54 54
 
55
-                $messages = [];
56
-                $labels = [];
55
+                $messages = [ ];
56
+                $labels = [ ];
57 57
                 $rules = static::defaultUploadValidationRules();
58 58
 
59
-                if (! is_null($element = $form->getElement($field))) {
59
+                if (!is_null($element = $form->getElement($field))) {
60 60
                     $rules = $element->getUploadValidationRules();
61 61
                     $messages = $element->getUploadValidationMessages();
62 62
                     $labels = $element->getUploadValidationLabels();
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
76 76
                 $file = $request->file('file');
77 77
 
78 78
                 /** @var File $element */
79
-                if (! is_null($element = $form->getElement($field))) {
79
+                if (!is_null($element = $form->getElement($field))) {
80 80
                     $filename = $element->getUploadFileName($file);
81 81
                     $path = $element->getUploadPath($file);
82 82
                     $settings = $element->getUploadSettings();
83 83
                 } else {
84 84
                     $filename = static::defaultUploadFilename($file);
85 85
                     $path = static::defaultUploadPath($file);
86
-                    $settings = [];
86
+                    $settings = [ ];
87 87
                 }
88 88
 
89 89
                 static::saveFile($file, public_path($path), $filename, $settings);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                     'url' => asset($value),
95 95
                     'value' => $value,
96 96
                 ]);
97
-            }]);
97
+            } ]);
98 98
         }
99 99
     }
100 100
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     protected static function defaultUploadValidationRules()
143 143
     {
144 144
         return [
145
-            'file' => ['required', 'file'],
145
+            'file' => [ 'required', 'file' ],
146 146
         ];
147 147
     }
148 148
 
@@ -159,21 +159,21 @@  discard block
 block discarded – undo
159 159
     /**
160 160
      * @var array
161 161
      */
162
-    protected $uploadSettings = [];
162
+    protected $uploadSettings = [ ];
163 163
 
164 164
     /**
165 165
      * @var array
166 166
      */
167
-    protected $uploadValidationRules = ['required', 'file'];
167
+    protected $uploadValidationRules = [ 'required', 'file' ];
168 168
 
169 169
     /**
170 170
      * @return array
171 171
      */
172 172
     public function getUploadValidationMessages()
173 173
     {
174
-        $messages = [];
174
+        $messages = [ ];
175 175
         foreach ($this->validationMessages as $rule => $message) {
176
-            $messages["file.{$rule}"] = $message;
176
+            $messages[ "file.{$rule}" ] = $message;
177 177
         }
178 178
 
179 179
         return $messages;
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      */
185 185
     public function getUploadValidationLabels()
186 186
     {
187
-        return ['file' => $this->getLabel()];
187
+        return [ 'file' => $this->getLabel() ];
188 188
     }
189 189
 
190 190
     /**
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      */
193 193
     public function getUploadValidationRules()
194 194
     {
195
-        return ['file' => array_unique($this->uploadValidationRules)];
195
+        return [ 'file' => array_unique($this->uploadValidationRules) ];
196 196
     }
197 197
 
198 198
     /**
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
      */
203 203
     public function getUploadPath(UploadedFile $file)
204 204
     {
205
-        if (! is_callable($this->uploadFileName)) {
205
+        if (!is_callable($this->uploadFileName)) {
206 206
             return static::defaultUploadPath($file);
207 207
         }
208 208
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
      */
229 229
     public function getUploadFileName(UploadedFile $file)
230 230
     {
231
-        if (! is_callable($this->uploadFileName)) {
231
+        if (!is_callable($this->uploadFileName)) {
232 232
             return static::defaultUploadFilename($file);
233 233
         }
234 234
 
@@ -279,11 +279,11 @@  discard block
 block discarded – undo
279 279
      */
280 280
     public function addValidationRule($rule, $message = null)
281 281
     {
282
-        $uploadRules = ['file', 'image', 'mime', 'size', 'dimensions', 'max', 'min', 'between'];
282
+        $uploadRules = [ 'file', 'image', 'mime', 'size', 'dimensions', 'max', 'min', 'between' ];
283 283
 
284 284
         foreach ($uploadRules as $uploadRule) {
285 285
             if (strpos($rule, $uploadRule) !== false) {
286
-                $this->uploadValidationRules[] = $rule;
286
+                $this->uploadValidationRules[ ] = $rule;
287 287
 
288 288
                 if (is_null($message)) {
289 289
                     return $this;
Please login to merge, or discard this patch.
src/Form/Element/NamedFormElement.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     /**
56 56
      * @var array
57 57
      */
58
-    protected $validationMessages = [];
58
+    protected $validationMessages = [ ];
59 59
 
60 60
     /**
61 61
      * @param string      $path
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     {
85 85
         $name = array_shift($parts);
86 86
 
87
-        while (! empty($parts)) {
87
+        while (!empty($parts)) {
88 88
             $part = array_shift($parts);
89 89
             $name .= "[$part]";
90 90
         }
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         $messages = parent::getValidationMessages();
286 286
 
287 287
         foreach ($this->validationMessages as $rule => $message) {
288
-            $messages[$this->getName().'.'.$rule] = $message;
288
+            $messages[ $this->getName().'.'.$rule ] = $message;
289 289
         }
290 290
 
291 291
         return $messages;
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
             $rule = substr($rule, 0, $pos);
316 316
         }
317 317
 
318
-        $this->validationMessages[$rule] = $message;
318
+        $this->validationMessages[ $rule ] = $message;
319 319
 
320 320
         return $this;
321 321
     }
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
      */
326 326
     public function getValidationLabels()
327 327
     {
328
-        return [$this->getPath() => $this->getLabel()];
328
+        return [ $this->getPath() => $this->getLabel() ];
329 329
     }
330 330
 
331 331
     /**
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
      */
334 334
     public function getValueFromRequest()
335 335
     {
336
-        if (! is_null($value = Request::old($this->getPath()))) {
336
+        if (!is_null($value = Request::old($this->getPath()))) {
337 337
             return $value;
338 338
         }
339 339
 
@@ -346,14 +346,14 @@  discard block
 block discarded – undo
346 346
      */
347 347
     public function getValue()
348 348
     {
349
-        if (! is_null($value = $this->getValueFromRequest())) {
349
+        if (!is_null($value = $this->getValueFromRequest())) {
350 350
             return $value;
351 351
         }
352 352
 
353 353
         $model = $this->getModel();
354 354
         $value = $this->getDefaultValue();
355 355
 
356
-        if (is_null($model) or ! $model->exists) {
356
+        if (is_null($model) or !$model->exists) {
357 357
             return $value;
358 358
         }
359 359
 
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
         }
406 406
         unset($rule);
407 407
 
408
-        return [$this->getPath() => $rules];
408
+        return [ $this->getPath() => $rules ];
409 409
     }
410 410
 
411 411
     /**
Please login to merge, or discard this patch.