Test Setup Failed
Pull Request — master (#185)
by
unknown
04:40
created
src/Traits/HasRoleAndPermission.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function checkRole($role)
115 115
     {
116
-        return $this->getRoles()->contains(function ($value) use ($role) {
116
+        return $this->getRoles()->contains(function($value) use ($role) {
117 117
             return $role == $value->id || Str::is($role, $value->slug);
118 118
         });
119 119
     }
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
      */
294 294
     public function checkPermission($permission)
295 295
     {
296
-        return $this->getPermissions()->contains(function ($value) use ($permission) {
296
+        return $this->getPermissions()->contains(function($value) use ($permission) {
297 297
             return $permission == $value->id || Str::is($permission, $value->slug);
298 298
         });
299 299
     }
Please login to merge, or discard this patch.
src/Database/Migrations/2016_01_26_115212_create_permissions_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
         $tableCheck = Schema::connection($connection)->hasTable($table);
19 19
 
20 20
         if (!$tableCheck) {
21
-            Schema::connection($connection)->create($table, function (Blueprint $table) {
21
+            Schema::connection($connection)->create($table, function(Blueprint $table) {
22 22
                 $table->increments('id')->unsigned();
23 23
                 $table->string('name');
24 24
                 $table->string('slug')->unique();
Please login to merge, or discard this patch.
src/Database/Migrations/2016_01_15_105324_create_roles_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
         $tableCheck = Schema::connection($connection)->hasTable($table);
19 19
 
20 20
         if (!$tableCheck) {
21
-            Schema::connection($connection)->create($table, function (Blueprint $table) {
21
+            Schema::connection($connection)->create($table, function(Blueprint $table) {
22 22
                 $table->increments('id')->unsigned();
23 23
                 $table->string('name');
24 24
                 $table->string('slug')->unique();
Please login to merge, or discard this patch.
src/routes/api.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,6 +12,6 @@
 block discarded – undo
12 12
     'as'            => 'laravelroles::',
13 13
     'namespace'     => 'jeremykenedy\LaravelRoles\App\Http\Controllers\Api',
14 14
     'prefix'        => 'api',
15
-], function () {
15
+], function() {
16 16
     Route::apiResource('roles-api', 'LaravelRolesApiController');
17 17
 });
Please login to merge, or discard this patch.
src/Database/Migrations/2016_01_26_115523_create_permission_role_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         $tableCheck = Schema::connection($connection)->hasTable($table);
21 21
 
22 22
         if (!$tableCheck) {
23
-            Schema::connection($connection)->create($table, function (Blueprint $table) use ($permissionsTable, $rolesTable) {
23
+            Schema::connection($connection)->create($table, function(Blueprint $table) use ($permissionsTable, $rolesTable) {
24 24
                 $table->increments('id')->unsigned();
25 25
                 $table->integer('permission_id')->unsigned()->index();
26 26
                 $table->foreign('permission_id')->references('id')->on($permissionsTable)->onDelete('cascade');
Please login to merge, or discard this patch.
src/Database/Migrations/2016_01_15_114412_create_role_user_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         $tableCheck = Schema::connection($connection)->hasTable($table);
20 20
 
21 21
         if (!$tableCheck) {
22
-            Schema::connection($connection)->create($table, function (Blueprint $table) use ($rolesTable) {
22
+            Schema::connection($connection)->create($table, function(Blueprint $table) use ($rolesTable) {
23 23
                 $table->increments('id')->unsigned();
24 24
                 $table->integer('role_id')->unsigned()->index();
25 25
                 $table->foreign('role_id')->references('id')->on($rolesTable)->onDelete('cascade');
Please login to merge, or discard this patch.
src/Database/Migrations/2016_02_09_132439_create_permission_user_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         $userTable = app(config('auth.providers.users.model'))->getTable();
21 21
 
22 22
         if (!$tableCheck) {
23
-            Schema::connection($connection)->create($table, function (Blueprint $table) use ($permissionsTable, $userTable) {
23
+            Schema::connection($connection)->create($table, function(Blueprint $table) use ($permissionsTable, $userTable) {
24 24
                 $table->increments('id')->unsigned();
25 25
                 $table->integer('permission_id')->unsigned()->index();
26 26
                 $table->foreign('permission_id')->references('id')->on($permissionsTable)->onDelete('cascade');
Please login to merge, or discard this patch.
src/routes/web.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     'as'            => 'laravelroles::',
12 12
     'namespace'     => 'jeremykenedy\LaravelRoles\App\Http\Controllers',
13 13
     'prefix'        => config('roles.GUIRoutesPrefix'),
14
-], function () {
14
+], function() {
15 15
 
16 16
     // Dashboards and CRUD Routes
17 17
     Route::resource('roles', 'LaravelRolesController');
Please login to merge, or discard this patch.
tests/TestCase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@
 block discarded – undo
44 44
      */
45 45
     public function getEnvironmentSetUp($app)
46 46
     {
47
-        $app->singleton('seed.handler', function ($app) {
47
+        $app->singleton('seed.handler', function($app) {
48 48
             return new SeedHandler($app, collect());
49 49
         });
50 50
 
51
-        include_once __DIR__ . '/../src/Database/TestMigrations/create_users_table.php';
51
+        include_once __DIR__.'/../src/Database/TestMigrations/create_users_table.php';
52 52
 
53 53
         (new \CreateUsersTable())->up();
54 54
     }
Please login to merge, or discard this patch.