Passed
Pull Request — master (#24)
by
unknown
07:29
created
src/LinkBuilder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
             case 'destroy':
42 42
             case 'update':
43 43
             case 'show':
44
-                $params = [$model->getRouteKey() => $model->getAttribute((string)$model->getKeyName())];
44
+                $params = [$model->getRouteKey() => $model->getAttribute((string) $model->getKeyName())];
45 45
                 break;
46 46
             case 'show.extra':
47 47
                 $params = [
48
-                    $model->getRouteKey() => $model->getAttribute((string)$model->getKeyName()),
48
+                    $model->getRouteKey() => $model->getAttribute((string) $model->getKeyName()),
49 49
                     'extra' => $method
50 50
                 ];
51 51
                 break;
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 
54 54
         // Get the methods applicable to the route, ignoring HEAD and PATCH.
55 55
         $methods = collect($route->methods());
56
-        $methods = $methods->filter(static function ($item) {
56
+        $methods = $methods->filter(static function($item) {
57 57
             return !in_array($item, ['HEAD', 'PATCH']);
58
-        })->map(static function ($str) {
58
+        })->map(static function($str) {
59 59
             return strtolower($str);
60 60
         });
61 61
 
Please login to merge, or discard this patch.
src/Traits/HasLinksTrait.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     /**
23 23
      * Append attributes to query when building a query.
24 24
      *
25
-     * @param string[]|string $attributes
25
+     * @param string $attributes
26 26
      * @return $this
27 27
      */
28 28
     abstract public function append($attributes);
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     /**
141 141
      * Get the value of the model's route key.
142 142
      *
143
-     * @return mixed
143
+     * @return string
144 144
      */
145 145
     public function getRouteKey()
146 146
     {
Please login to merge, or discard this patch.
src/AbstractRestfulController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -312,7 +312,7 @@
 block discarded – undo
312 312
      * Redirects to the show route for the model if one exists.
313 313
      * @param Request $request
314 314
      * @param mixed $data
315
-     * @return RedirectResponse|Redirector|null
315
+     * @return RedirectResponse|null
316 316
      */
317 317
     protected function redirectToShowRoute(Request $request, $data)
318 318
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     {
211 211
         $model = $this->newModelInstance();
212 212
 
213
-        foreach ((array)$request->input() as $column => $value) {
213
+        foreach ((array) $request->input() as $column => $value) {
214 214
             $model->$column = $value;
215 215
         }
216 216
 
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
             return $model;
304 304
         }
305 305
 
306
-        $parts = array_filter(explode('/', (string)$request->route()->parameter('extra')));
306
+        $parts = array_filter(explode('/', (string) $request->route()->parameter('extra')));
307 307
 
308 308
         // Loop through the parts.
309 309
         foreach ($parts as $part) {
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
     {
347 347
         $model = $this->findModel($id);
348 348
 
349
-        foreach ((array)$request->input() as $column => $value) {
349
+        foreach ((array) $request->input() as $column => $value) {
350 350
             $model->$column = $value;
351 351
         }
352 352
 
Please login to merge, or discard this patch.
src/Builder.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use DebugBar\DataCollector\MessagesCollector;
6 6
 use DebugBar\DebugBar;
7
-use DebugBar\DebugBarException;
8 7
 use GuzzleHttp\Client;
9 8
 use Illuminate\Contracts\Container\BindingResolutionException;
10 9
 use Illuminate\Database\Eloquent\Model;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 /** @var MessagesCollector $collector */
150 150
                 $collector = $debugBar->getCollector('restful_calls');
151 151
                 $collector->addMessage(sprintf('REST-CALL: %s to %s', $route->getMethod(), $url));
152
-            } catch (DebugBarException|BindingResolutionException $e) {
152
+            } catch (DebugBarException | BindingResolutionException $e) {
153 153
             }
154 154
         }
155 155
 
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 
341 341
         return $instance->newCollection(
342 342
             array_map(
343
-                function ($item) use ($instance) {
343
+                function($item) use ($instance) {
344 344
                     return $instance->newFromBuilder($item);
345 345
                 },
346 346
                 $data
Please login to merge, or discard this patch.