Passed
Push — master ( 4f47e0...62fb5e )
by Curtis
05:07
created
app/Service/MixedConnection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 {
10 10
     public static function set($user, $tenant)
11 11
     {
12
-        if (! $user->belongsToAdminGroup() || $tenant) {
12
+        if (!$user->belongsToAdminGroup() || $tenant) {
13 13
             self::connection(Connections::Tenant);
14 14
         } else {
15 15
             self::connection('mysql');
Please login to merge, or discard this patch.
app/Http/Middleware/Multitenant.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function handle($request, Closure $next)
19 19
     {
20
-        if (! $request->user()) {
20
+        if (!$request->user()) {
21 21
             return $next($request);
22 22
         }
23 23
 
Please login to merge, or discard this patch.
app/Models/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,5 +12,5 @@
 block discarded – undo
12 12
     use Comments, Discussions, Replies;
13 13
     protected $hidden = ['password', 'remember_token', 'password_updated_at'];
14 14
 
15
-    protected $fillable = ['person_id', 'group_id', 'role_id', 'email', 'is_active','email_verified_at','password'];
15
+    protected $fillable = ['person_id', 'group_id', 'role_id', 'email', 'is_active', 'email_verified_at', 'password'];
16 16
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/VerificationController.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
     public function verify_user(Request $request) {
39 39
         $data = $request->all();
40 40
         $this->validator($data)->validate();
41
-        try{
41
+        try {
42 42
             $token = $request->get('token');
43 43
             $activation = Activation::where('token', $token)->first();
44
-            if($activation === null) {
44
+            if ($activation === null) {
45 45
                 return response()->json(
46 46
                     [
47 47
                         'error' =>
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             }
55 55
             $user_id = $activation->user_id;
56 56
             $user = User::find($user_id);
57
-            if($user === null) {
57
+            if ($user === null) {
58 58
                 return response()->json(
59 59
                     [
60 60
                         'error' =>
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             return response()->json([
73 73
                 'csrfToken' => csrf_token(),
74 74
             ]);
75
-        }catch(\Exception $e) {
75
+        } catch (\Exception $e) {
76 76
             throw $e;
77 77
         }
78 78
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
             return response()->json([
73 73
                 'csrfToken' => csrf_token(),
74 74
             ]);
75
-        }catch(\Exception $e) {
75
+        } catch(\Exception $e) {
76 76
             throw $e;
77 77
         }
78 78
     }
Please login to merge, or discard this patch.
app/Logic/Activation/ActivationRepository.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -75,13 +75,13 @@
 block discarded – undo
75 75
     }
76 76
 
77 77
 
78
-     /**
79
-     * Creates a token and send email.- api
80
-     *
81
-     * @param \App\Models\User $user
82
-     *
83
-     * @return bool or void
84
-     */
78
+        /**
79
+         * Creates a token and send email.- api
80
+         *
81
+         * @param \App\Models\User $user
82
+         *
83
+         * @return bool or void
84
+         */
85 85
     public function createTokenAndSendEmailApi(User $user)
86 86
     {
87 87
         $activations = Activation::where('user_id', $user->id)
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/RegisterController.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     protected function create(array $data)
42 42
     {
43
-        try{
43
+        try {
44 44
             DB::beginTransaction();
45 45
             // create person
46 46
             $person = new Person();
@@ -48,15 +48,15 @@  discard block
 block discarded – undo
48 48
             $person->save();
49 49
 
50 50
             // get user_group_id
51
-            $user_group = UserGroup::where('name','User')->first();
52
-            if($user_group == null) {
51
+            $user_group = UserGroup::where('name', 'User')->first();
52
+            if ($user_group == null) {
53 53
                 // create user_group
54 54
                 $user_group = UserGroup::create(['name'=>'User', 'description'=>'This is user group']);
55 55
             }
56 56
 
57 57
             // get role_id
58 58
             $role = Role::where('name', 'supervisor')->first();
59
-            if($role == null) {
59
+            if ($role == null) {
60 60
                 $role = Role::create(['menu_id'=>1, 'name'=>'supervisor', 'display_name'=>'User', 'description'=>'This is user']);
61 61
             }
62 62
             $user = User::create([
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
            Migrate:dispatch($tenant);
82 82
 
83 83
             return $user;
84
-        }catch(\Exception $e){
84
+        } catch (\Exception $e) {
85 85
             DB::rollBack();
86 86
             throw $e;
87 87
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
            Migrate:dispatch($tenant);
82 82
 
83 83
             return $user;
84
-        }catch(\Exception $e){
84
+        } catch(\Exception $e){
85 85
             DB::rollBack();
86 86
             throw $e;
87 87
         }
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -79,17 +79,17 @@
 block discarded – undo
79 79
                 'name' => $data['name'],
80 80
                 'email' => $data['email'],
81 81
                 'is_active' => 1,
82
-		'is_tenant' => 1,
83
-		'status' => 'Active'
82
+        'is_tenant' => 1,
83
+        'status' => 'Active'
84 84
             ]);
85 85
 
86
-          $company->attachPerson($person->id);
86
+            $company->attachPerson($person->id);
87 87
 
88
-	   // Dispatch Tenancy Jobs
88
+        // Dispatch Tenancy Jobs
89 89
 
90
-           $tenant = $user->company->id;
91
-           CreateDatabase:dispatch($tenant);
92
-           Migrate:dispatch($tenant);
90
+            $tenant = $user->company->id;
91
+            CreateDatabase:dispatch($tenant);
92
+            Migrate:dispatch($tenant);
93 93
 
94 94
             return $user;
95 95
         }catch(\Exception $e){
Please login to merge, or discard this patch.