Passed
Push — master ( a28dc5...770320 )
by Neerav
07:05
created
database/migrations/2019_03_05_000400_create_role_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('role_user', function (Blueprint $table) {
16
+        Schema::create('role_user', function(Blueprint $table) {
17 17
             $pkMethod = config('rakshak.users.pk_type', 'uuid');
18 18
             // dd('pkMethod: ' . $pkMethod);
19 19
 
Please login to merge, or discard this patch.
database/migrations/2019_03_05_000050_alter_users_table.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::table('users', function (Blueprint $table) {
16
+        Schema::table('users', function(Blueprint $table) {
17 17
             $table->string('username')->nullable();
18 18
             $table->string('mobile')->nullable();
19 19
             $table->timestamp('mobile_verified_at')->nullable();
@@ -32,28 +32,28 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function down()
34 34
     {
35
-        Schema::table('users', function (Blueprint $table) {
35
+        Schema::table('users', function(Blueprint $table) {
36 36
             $table->dropColumn('username');
37 37
         });
38
-        Schema::table('users', function (Blueprint $table) {
38
+        Schema::table('users', function(Blueprint $table) {
39 39
             $table->dropColumn('mobile');
40 40
         });
41
-        Schema::table('users', function (Blueprint $table) {
41
+        Schema::table('users', function(Blueprint $table) {
42 42
             $table->dropColumn('mobile_verified_at');
43 43
         });
44
-        Schema::table('users', function (Blueprint $table) {
44
+        Schema::table('users', function(Blueprint $table) {
45 45
             $table->dropColumn('enable_2fa');
46 46
         });
47
-        Schema::table('users', function (Blueprint $table) {
47
+        Schema::table('users', function(Blueprint $table) {
48 48
             $table->dropColumn('otp_token');
49 49
         });
50
-        Schema::table('users', function (Blueprint $table) {
50
+        Schema::table('users', function(Blueprint $table) {
51 51
             $table->dropColumn('otp_expiry');
52 52
         });
53
-        Schema::table('users', function (Blueprint $table) {
53
+        Schema::table('users', function(Blueprint $table) {
54 54
             $table->dropColumn('otp_channel');
55 55
         });
56
-        Schema::table('users', function (Blueprint $table) {
56
+        Schema::table('users', function(Blueprint $table) {
57 57
             $table->dropColumn('status');
58 58
         });
59 59
     }
Please login to merge, or discard this patch.
database/migrations/2019_03_05_000300_create_ability_role_table.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@
 block discarded – undo
19 19
             $table->timestamps();
20 20
 
21 21
             $table->foreign('ability_id')
22
-                  ->references('id')
23
-                  ->on('abilities')
24
-                  ->onDelete('cascade');
22
+                    ->references('id')
23
+                    ->on('abilities')
24
+                    ->onDelete('cascade');
25 25
 
26 26
             $table->foreign('role_id')
27
-                  ->references('id')
28
-                  ->on('roles')
29
-                  ->onDelete('cascade');
27
+                    ->references('id')
28
+                    ->on('roles')
29
+                    ->onDelete('cascade');
30 30
 
31 31
             $table->primary(['ability_id', 'role_id']);
32 32
         });
Please login to merge, or discard this 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('ability_role', function (Blueprint $table) {
16
+        Schema::create('ability_role', function(Blueprint $table) {
17 17
             $table->uuid('ability_id');
18 18
             $table->uuid('role_id');
19 19
             $table->timestamps();
Please login to merge, or discard this patch.
database/migrations/2019_03_05_000100_create_abilities_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('abilities', function (Blueprint $table) {
16
+        Schema::create('abilities', function(Blueprint $table) {
17 17
             $table->uuid('id');
18 18
             $table->string('name')->unique();
19 19
             $table->string('label');
Please login to merge, or discard this patch.
database/migrations/2019_03_05_000000_create_rakshak_settings_table.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
     public function up()
16 16
     {
17
-        Schema::create('rakshak_settings', function (Blueprint $table) {
17
+        Schema::create('rakshak_settings', function(Blueprint $table) {
18 18
             $table->uuid('id');
19 19
             $table->boolean('enable_2fa')->default(false);
20 20
             $table->string('channel_2fa')->default('email');
Please login to merge, or discard this patch.
database/migrations/2019_03_05_000200_create_roles_table.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
     public function up()
16 16
     {
17
-        Schema::create('roles', function (Blueprint $table) {
17
+        Schema::create('roles', function(Blueprint $table) {
18 18
             $table->uuid('id');
19 19
             $table->string('name')->unique();
20 20
             $table->string('label');
Please login to merge, or discard this patch.
database/factories/AbilityFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 use Faker\Generator as Faker;
4 4
 
5
-$factory->define(Thinkstudeo\Rakshak\Ability::class, function (Faker $faker) {
5
+$factory->define(Thinkstudeo\Rakshak\Ability::class, function(Faker $faker) {
6 6
     return [
7 7
         'name'        => $faker->word(),
8 8
         'label'       => ucfirst($faker->word()),
Please login to merge, or discard this patch.
database/factories/RoleFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 use Faker\Generator as Faker;
4 4
 use Thinkstudeo\Rakshak\Ability;
5 5
 
6
-$factory->define(\Thinkstudeo\Rakshak\Role::class, function (Faker $faker) {
6
+$factory->define(\Thinkstudeo\Rakshak\Role::class, function(Faker $faker) {
7 7
     return [
8 8
         'name'        => $faker->name,
9 9
         'label'       => ucfirst($faker->word),
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 });
14 14
 
15 15
 $factory->state(\Thinkstudeo\Rakshak\Role::class, 'withAbilities', [])
16
-    ->afterCreatingState(\Thinkstudeo\Rakshak\Role::class, 'withAbilities', function ($role, $faker) {
16
+    ->afterCreatingState(\Thinkstudeo\Rakshak\Role::class, 'withAbilities', function($role, $faker) {
17 17
         $ability1 = create(Ability::class);
18 18
         $ability2 = create(Ability::class);
19 19
 
Please login to merge, or discard this patch.
database/factories/UserFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 use Faker\Generator as Faker;
4 4
 
5
-$factory->define(config('auth.providers.users.model'), function (Faker $faker) {
5
+$factory->define(config('auth.providers.users.model'), function(Faker $faker) {
6 6
     $name = $faker->name;
7 7
 
8 8
     return [
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 });
18 18
 
19 19
 $factory->state(config('auth.providers.users.model'), 'HrManager', ['name' => 'H R Manager'])
20
-    ->afterCreatingState(config('auth.providers.users.model'), 'HrManager', function ($user, $faker) {
20
+    ->afterCreatingState(config('auth.providers.users.model'), 'HrManager', function($user, $faker) {
21 21
         $manageUsers = create(\Thinkstudeo\Rakshak\Ability::class, ['name' => 'manage_users']);
22 22
 
23 23
         $hrManager = create(\Thinkstudeo\Rakshak\Role::class, ['name' => 'hr_manager'])->addAbility($manageUsers);
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     });
27 27
 
28 28
 $factory->state(config('auth.providers.users.model'), 'ContentManager', ['name' => 'Content Manager'])
29
-    ->afterCreatingState(config('auth.providers.users.model'), 'ContentManager', function ($user, $faker) {
29
+    ->afterCreatingState(config('auth.providers.users.model'), 'ContentManager', function($user, $faker) {
30 30
         $manageContent = create(\Thinkstudeo\Rakshak\Ability::class, ['name' => 'manage_content']);
31 31
 
32 32
         $hrManager = create(\Thinkstudeo\Rakshak\Role::class, ['name' => 'content_manager'])->addAbility($manageContent);
Please login to merge, or discard this patch.