Passed
Pull Request — master (#39)
by Arjay
15:07 queued 05:40
created
migrations/2015_12_20_100005_create_permission_user_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('permission_user', function (Blueprint $table) {
16
+        Schema::create('permission_user', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->foreignId('permission_id')->constrained()->cascadeOnDelete();
19 19
             $table->foreignId('user_id')->constrained()->cascadeOnDelete();
Please login to merge, or discard this patch.
migrations/2015_12_20_100002_create_roles_table.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 up()
14 14
     {
15
-        Schema::create('roles', function (Blueprint $table) {
15
+        Schema::create('roles', function(Blueprint $table) {
16 16
             $table->id();
17 17
             $table->string('name');
18 18
             $table->string('slug')->unique();
Please login to merge, or discard this patch.
migrations/2015_12_20_100004_create_role_user_table.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 up()
14 14
     {
15
-        Schema::create('role_user', function (Blueprint $table) {
15
+        Schema::create('role_user', function(Blueprint $table) {
16 16
             $table->id('id');
17 17
             $table->foreignId('role_id')->constrained()->cascadeOnDelete();
18 18
             $table->foreignId('user_id')->constrained()->cascadeOnDelete();
Please login to merge, or discard this patch.
migrations/2015_12_20_100003_create_permission_role_table.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 up()
14 14
     {
15
-        Schema::create('permission_role', function (Blueprint $table) {
15
+        Schema::create('permission_role', function(Blueprint $table) {
16 16
             $table->id();
17 17
             $table->foreignId('permission_id')->constrained()->cascadeOnDelete();
18 18
             $table->foreignId('role_id')->constrained()->cascadeOnDelete();
Please login to merge, or discard this patch.
migrations/2015_12_20_100001_create_permissions_table.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 up()
14 14
     {
15
-        Schema::create('permissions', function (Blueprint $table) {
15
+        Schema::create('permissions', function(Blueprint $table) {
16 16
             $table->id();
17 17
             $table->string('name', 50);
18 18
             $table->string('slug')->unique();
Please login to merge, or discard this patch.
src/Models/Permission.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@
 block discarded – undo
24 24
     protected $table = 'permissions';
25 25
 
26 26
     /** @var array */
27
-    protected $fillable = ['name', 'slug', 'resource', 'system'];
27
+    protected $fillable = [ 'name', 'slug', 'resource', 'system' ];
28 28
 
29 29
     /** @var array */
30
-    protected $casts = ['system' => 'bool'];
30
+    protected $casts = [ 'system' => 'bool' ];
31 31
 
32 32
     /**
33 33
      * Find a permission by slug.
Please login to merge, or discard this patch.
src/Models/Role.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     protected $table = 'roles';
22 22
 
23 23
     /** @var array */
24
-    protected $fillable = ['name', 'slug', 'description', 'system'];
24
+    protected $fillable = [ 'name', 'slug', 'description', 'system' ];
25 25
 
26 26
     /** @var array */
27 27
     protected $casts = [
Please login to merge, or discard this patch.
src/AclServiceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         $path = __DIR__.'/../config/acl.php';
32 32
 
33
-        $this->publishes([$path => config_path('acl.php')], 'laravel-acl');
33
+        $this->publishes([ $path => config_path('acl.php') ], 'laravel-acl');
34 34
 
35 35
         $this->mergeConfigFrom($path, 'acl');
36 36
     }
@@ -52,18 +52,18 @@  discard block
 block discarded – undo
52 52
     protected function registerBladeDirectives()
53 53
     {
54 54
         /** @var BladeCompiler $blade */
55
-        $blade = $this->app['blade.compiler'];
56
-        $blade->directive('canAtLeast', function ($expression) {
55
+        $blade = $this->app[ 'blade.compiler' ];
56
+        $blade->directive('canAtLeast', function($expression) {
57 57
             return "<?php if (app('laravel-acl.directives.canAtLeast')->handle({$expression})): ?>";
58 58
         });
59
-        $blade->directive('endCanAtLeast', function ($expression) {
59
+        $blade->directive('endCanAtLeast', function($expression) {
60 60
             return '<?php endif; ?>';
61 61
         });
62 62
 
63
-        $blade->directive('role', function ($expression) {
63
+        $blade->directive('role', function($expression) {
64 64
             return "<?php if (app('laravel-acl.directives.role')->handle({$expression})): ?>";
65 65
         });
66
-        $blade->directive('endRole', function ($expression) {
66
+        $blade->directive('endRole', function($expression) {
67 67
             return '<?php endif; ?>';
68 68
         });
69 69
     }
Please login to merge, or discard this patch.
src/Traits/AuthorizesPermissionResources.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      * @param  array  $options
33 33
      * @return void
34 34
      */
35
-    public function authorizePermissionResource(string $resource, array $options = [])
35
+    public function authorizePermissionResource(string $resource, array $options = [ ])
36 36
     {
37 37
         $permissions = $this->resourcePermissionMap();
38 38
         $collection = new Collection;
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             ]));
44 44
         }
45 45
 
46
-        $collection->groupBy('ability')->each(function ($permission, $ability) use ($resource, $options) {
46
+        $collection->groupBy('ability')->each(function($permission, $ability) use ($resource, $options) {
47 47
             $this->middleware("can:{$resource}.{$ability}")
48 48
                 ->only($permission->pluck('method')->toArray());
49 49
         });
Please login to merge, or discard this patch.