Completed
Push — master ( bec27e...637f9e )
by Mahmoud
03:05
created
app/Port/Foundation/Traits/FractalTrait.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
         // if DataArray `\League\Fractal\Serializer\DataArraySerializer` do noting since it's set by default by the Dingo API
36 36
         if ($serializerName !== 'DataArray') {
37
-            app('Dingo\Api\Transformer\Factory')->setAdapter(function () use ($serializerName) {
37
+            app('Dingo\Api\Transformer\Factory')->setAdapter(function() use ($serializerName) {
38 38
                 switch ($serializerName) {
39 39
                     case 'JsonApi':
40 40
                         $serializer = new \League\Fractal\Serializer\JsonApiSerializer(Config::get('api.domain'));
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -4,10 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use App;
6 6
 use App\Port\Exception\Exceptions\UnsupportedFractalSerializerException;
7
-use DB;
8
-use File;
9 7
 use Illuminate\Support\Facades\Config;
10
-use Log;
11 8
 
12 9
 /**
13 10
  * Class FractalTrait.
Please login to merge, or discard this patch.
app/Port/Broadcast/Providers/BroadcastServiceProvider.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
          * Authenticate the user's personal channel...
27 27
          */
28
-        Broadcast::channel('App.User.*', function ($user, $userId) {
28
+        Broadcast::channel('App.User.*', function($user, $userId) {
29 29
             return (int)$user->id === (int)$userId;
30 30
         });
31 31
     }
Please login to merge, or discard this patch.
app/Containers/User/Data/Factories/UserFactory.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 App\Containers\User\Models\User;
4 4
 
5 5
 // User
6
-$factory->define(User::class, function (Faker\Generator $faker) {
6
+$factory->define(User::class, function(Faker\Generator $faker) {
7 7
     return [
8 8
         'name'              => $faker->name,
9 9
         'email'             => $faker->email,
Please login to merge, or discard this patch.
Data/Migrations/2016_12_29_201047_create_permission_tables.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     {
15 15
         $config = config('laravel-permission.table_names');
16 16
 
17
-        Schema::create($config['roles'], function (Blueprint $table) {
17
+        Schema::create($config['roles'], function(Blueprint $table) {
18 18
             $table->increments('id');
19 19
             $table->string('name')->unique();
20 20
             $table->string('display_name')->nullable();
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
             $table->timestamps();
23 23
         });
24 24
 
25
-        Schema::create($config['permissions'], function (Blueprint $table) {
25
+        Schema::create($config['permissions'], function(Blueprint $table) {
26 26
             $table->increments('id');
27 27
             $table->string('name')->unique();
28 28
             $table->string('display_name')->nullable();
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             $table->timestamps();
31 31
         });
32 32
 
33
-        Schema::create($config['user_has_permissions'], function (Blueprint $table) use ($config) {
33
+        Schema::create($config['user_has_permissions'], function(Blueprint $table) use ($config) {
34 34
             $table->integer('user_id')->unsigned();
35 35
             $table->integer('permission_id')->unsigned();
36 36
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             $table->primary(['user_id', 'permission_id']);
48 48
         });
49 49
 
50
-        Schema::create($config['user_has_roles'], function (Blueprint $table) use ($config) {
50
+        Schema::create($config['user_has_roles'], function(Blueprint $table) use ($config) {
51 51
             $table->integer('role_id')->unsigned();
52 52
             $table->integer('user_id')->unsigned();
53 53
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             $table->primary(['role_id', 'user_id']);
65 65
         });
66 66
 
67
-        Schema::create($config['role_has_permissions'], function (Blueprint $table) use ($config) {
67
+        Schema::create($config['role_has_permissions'], function(Blueprint $table) use ($config) {
68 68
             $table->integer('permission_id')->unsigned();
69 69
             $table->integer('role_id')->unsigned();
70 70
 
Please login to merge, or discard this patch.
app/Containers/User/Actions/CreateUserAction.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         // be default give all users the client role (normal user)
68 68
         $this->assignRoleTask->run($user, ['client']);
69 69
 
70
-       //  add Client as role for normal users
70
+        //  add Client as role for normal users
71 71
         $this->fireUserCreatedEventTask->run($user);
72 72
 
73 73
         return $user;
Please login to merge, or discard this patch.
app/Containers/Authorization/Tasks/AssignRoleTask.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function run($user, $roles)
47 47
     {
48
-        if(!$user instanceof User){
48
+        if (!$user instanceof User) {
49 49
             $user = $this->findUserByIdTask->run($user);
50 50
         }
51 51
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                 $this->assignRole($user, $role);
55 55
             }
56 56
 
57
-        }else{
57
+        } else {
58 58
             $this->assignRole($user, $roles);
59 59
         }
60 60
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
                 $this->assignRole($user, $role);
55 55
             }
56 56
 
57
-        }else{
57
+        } else{
58 58
             $this->assignRole($user, $roles);
59 59
         }
60 60
 
Please login to merge, or discard this patch.
app/Containers/Authorization/Tasks/AttachPermissionsToRoleTask.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,13 +42,13 @@
 block discarded – undo
42 42
     {
43 43
         $role = $this->getRoleAction->run($roleName);
44 44
 
45
-        if(is_array($permissionNames)){
45
+        if (is_array($permissionNames)) {
46 46
 
47
-            foreach ($permissionNames as $permissionName){
47
+            foreach ($permissionNames as $permissionName) {
48 48
                 $role->givePermissionTo($permissionName);
49 49
             }
50 50
 
51
-        }else{
51
+        } else {
52 52
             $role->givePermissionTo($permissionNames);
53 53
         }
54 54
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
                 $role->givePermissionTo($permissionName);
49 49
             }
50 50
 
51
-        }else{
51
+        } else{
52 52
             $role->givePermissionTo($permissionNames);
53 53
         }
54 54
 
Please login to merge, or discard this patch.
app/Containers/Authentication/Actions/WebAdminLoginAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
     {
48 48
         $user = $this->webLoginTask->run($email, $password, $remember);
49 49
 
50
-        if($user){
50
+        if ($user) {
51 51
             $this->isUserAdminTask->run($user);
52 52
         }
53 53
 
Please login to merge, or discard this patch.
app/Containers/Stripe/Tasks/CreateStripeAccountObjectTask.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use App\Containers\Stripe\Models\StripeAccount;
7 7
 use App\Containers\User\Models\User;
8 8
 use App\Port\Task\Abstracts\Task;
9
-use Auth;
10 9
 
11 10
 /**
12 11
  * Class CreateStripeAccountObjectTask.
Please login to merge, or discard this patch.