Passed
Push — ft/nomadic ( fe3ddc...e98568 )
by Philippe
44:02 queued 36:12
created
src/Modules/Module.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             return static::$managedModelKey;
68 68
         }
69 69
 
70
-        throw new \Exception('Missing required static property \'managedModelKey\' on ' . static::class. '.');
70
+        throw new \Exception('Missing required static property \'managedModelKey\' on '.static::class.'.');
71 71
     }
72 72
 
73 73
     /**
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public static function availableForCreation(): Collection
78 78
     {
79
-        $managers = app(Managers::class)->findByTag('module')->filter(function ($manager) {
79
+        $managers = app(Managers::class)->findByTag('module')->filter(function($manager) {
80 80
             return $manager->can('create');
81
-        })->map(function ($manager) {
81
+        })->map(function($manager) {
82 82
             return $manager->details();
83 83
         });
84 84
 
Please login to merge, or discard this patch.
src/Management/Nomadic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function nomadicCan($verb)
10 10
     {
11
-        if (in_array($verb, ['create', 'store', 'delete']) && ! auth()->guard('chief')->user()->hasRole('developer')) {
11
+        if (in_array($verb, ['create', 'store', 'delete']) && !auth()->guard('chief')->user()->hasRole('developer')) {
12 12
             throw NotAllowedManagerRoute::notAllowedVerb($verb, $this);
13 13
         }
14 14
 
Please login to merge, or discard this patch.
src/Management/AbstractManager.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     protected $pageCount = 20;
39 39
     protected $paginated = true;
40
-    protected static $booted    = [];
40
+    protected static $booted = [];
41 41
 
42 42
     public function __construct(Registration $registration)
43 43
     {
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             return $this->indexPagination($builder);
85 85
         }
86 86
         
87
-        return $builder->get()->map(function ($model) {
87
+        return $builder->get()->map(function($model) {
88 88
             return (new static($this->registration))->manage($model);
89 89
         });
90 90
     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     {
113 113
         $paginator = $builder->paginate($this->pageCount);
114 114
 
115
-        $modifiedCollection = $builder->paginate($this->pageCount)->getCollection()->transform(function ($model) {
115
+        $modifiedCollection = $builder->paginate($this->pageCount)->getCollection()->transform(function($model) {
116 116
             return (new static($this->registration))->manage($model);
117 117
         });
118 118
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
     public function guard($verb): Manager
188 188
     {
189
-        if (! $this->can($verb)) {
189
+        if (!$this->can($verb)) {
190 190
             NotAllowedManagerRoute::notAllowedVerb($verb, $this);
191 191
         }
192 192
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         $fields = $this->fields();
210 210
 
211 211
         foreach ($this->assistants() as $assistant) {
212
-            if (! method_exists($assistant, 'fields')) {
212
+            if (!method_exists($assistant, 'fields')) {
213 213
                 continue;
214 214
             }
215 215
 
@@ -287,14 +287,14 @@  discard block
 block discarded – undo
287 287
             'can'
288 288
         ];
289 289
 
290
-        foreach($methods as $baseMethod)
290
+        foreach ($methods as $baseMethod)
291 291
         {
292 292
             static::$booted[$baseMethod] = [];
293 293
         
294 294
             foreach (class_uses_recursive($class) as $trait) {
295
-                $method = class_basename($trait) . ucfirst($baseMethod);
295
+                $method = class_basename($trait).ucfirst($baseMethod);
296 296
                 
297
-                if (method_exists($class, $method) && ! in_array($method, static::$booted[$baseMethod])) {
297
+                if (method_exists($class, $method) && !in_array($method, static::$booted[$baseMethod])) {
298 298
                     static::$booted[$baseMethod][] = lcfirst($method);
299 299
                 }
300 300
             }
Please login to merge, or discard this patch.
src/Management/Managers.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $registrations = collect($this->register->filterByTag($tag)->all());
52 52
 
53
-        return $registrations->map(function ($registration) {
53
+        return $registrations->map(function($registration) {
54 54
             return $this->instance($registration);
55 55
         });
56 56
     }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $registrations = collect($this->register->filterByTag($tag)->all());
67 67
 
68
-        return $registrations->map(function ($registration) {
68
+        return $registrations->map(function($registration) {
69 69
             return $this->instance($registration)->details();
70 70
         });
71 71
     }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         //return array with group name and values
77 77
         $grouped = [];
78 78
 
79
-        $managers = $managers->map(function (Manager $item) {
79
+        $managers = $managers->map(function(Manager $item) {
80 80
             return [
81 81
                 'id'    => $item->details()->id,
82 82
                 'group' => $item->details()->plural,
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $registrations = collect($this->register->all());
92 92
 
93
-        return $registrations->map(function ($registration) {
93
+        return $registrations->map(function($registration) {
94 94
             return $this->instance($registration);
95 95
         });
96 96
     }
97 97
 
98 98
     public function anyRegisteredByTag($tag)
99 99
     {
100
-        return ! empty($this->register->filterByTag($tag)->all());
100
+        return !empty($this->register->filterByTag($tag)->all());
101 101
     }
102 102
 
103 103
     /**
Please login to merge, or discard this patch.