Passed
Push — master ( 6f9fa8...94d3d6 )
by Al Amin
09:14
created
resources/views/menus/tree.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2
-$traverse = function ($menus) use (&$traverse, $selected) {
2
+$traverse = function($menus) use (&$traverse, $selected) {
3 3
     foreach ($menus as $menu) {
4 4
         echo $menu->ancestors->count() ? '<ul>' : '';
5 5
         echo '<li> ';
6
-        if (! $menu->children->count()) {
6
+        if (!$menu->children->count()) {
7 7
             $checked = '';
8 8
             if (in_array($menu->id, $selected)) {
9 9
                 $checked = 'checked';
Please login to merge, or discard this patch.
src/MenuItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     {
26 26
         foreach ($attributes as $key => $value)
27 27
         {
28
-            if(property_exists($this, $key))
28
+            if (property_exists($this, $key))
29 29
             {
30 30
                 $this->{$key} = $value;
31 31
             }
Please login to merge, or discard this patch.
src/Storage/Role.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@
 block discarded – undo
63 63
     {
64 64
         parent::boot();
65 65
 
66
-        static::saved(function ($group) {
67
-            if($group->is_admin)
66
+        static::saved(function($group) {
67
+            if ($group->is_admin)
68 68
             {
69 69
                 static::where('is_admin', true)
70 70
                     ->where('id', '!=', $group->id)
Please login to merge, or discard this patch.
src/Storage/Menu.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     {
92 92
         parent::boot();
93 93
 
94
-        static::creating(function ($menu) {
94
+        static::creating(function($menu) {
95 95
             $menu->position = self::position($menu->parent_id);
96 96
         });
97 97
     }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     {
107 107
         (new static)->ofCommonStrategicObjective($commonStrategicObjectiveId)
108 108
             ->get()
109
-            ->each(function ($objective, $key) {
109
+            ->each(function($objective, $key) {
110 110
                 $objective->sequence = $key + 1;
111 111
                 $objective->save();
112 112
             });
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
     public function getRouteListAttribute()
139 139
     {
140
-        if (! $this->routes) {
140
+        if (!$this->routes) {
141 141
             return $this->routes;
142 142
         }
143 143
         return implode(', ', $this->routes);
Please login to merge, or discard this patch.
src/Storage/seeds/PcmmMenusTableSeeder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function run()
14 14
     {
15
-        $this->data()->each(function ($data) {
15
+        $this->data()->each(function($data) {
16 16
             Menu::create($data);
17 17
         });
18 18
     }
Please login to merge, or discard this patch.
src/Storage/factories/PermissionFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
 use PhpCollective\MenuMaker\Storage\Permission;
16 16
 
17
-$factory->define(Permission::class, function () {
17
+$factory->define(Permission::class, function() {
18 18
     $permission = Permission::routes()->random();
19 19
     return [
20 20
         'namespace'  => $permission['namespace'],
Please login to merge, or discard this patch.
src/Storage/factories/RoleFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use Faker\Generator as Faker;
4 4
 use PhpCollective\MenuMaker\Storage\Role;
5 5
 
6
-$factory->define(Role::class, function (Faker $faker) {
6
+$factory->define(Role::class, function(Faker $faker) {
7 7
     return [
8 8
         'name' => $faker->name
9 9
     ];
Please login to merge, or discard this patch.
src/Observers/RoleObserver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     private function removeCache(Role $group)
39 39
     {
40
-        $group->users->each(function ($user) {
40
+        $group->users->each(function($user) {
41 41
             RemoveUserMenuCache::dispatch($user);
42 42
         });
43 43
     }
Please login to merge, or discard this patch.
src/Jobs/RemoveUserMenuCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public function handle()
36 36
     {
37
-        Menu::sections()->get()->each(function ($section) {
37
+        Menu::sections()->get()->each(function($section) {
38 38
             Cache::forget('menus.section.' . $section->id . '.user.' . $this->user->id);
39 39
         });
40 40
     }
Please login to merge, or discard this patch.