Passed
Push — master ( 62fb5e...0de8c7 )
by Curtis
06:01
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
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -79,16 +79,16 @@
 block discarded – undo
79 79
                 'name' => $data['name'],
80 80
                 'email' => $data['email'],
81 81
                 'is_active' => 1,
82
-		'is_tenant' => 1,
83
-		'status' => 1
82
+        'is_tenant' => 1,
83
+        'status' => 1
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
-           CreateDatabase::dispatch($company);
91
-           Migrate::dispatch($company);
90
+            CreateDatabase::dispatch($company);
91
+            Migrate::dispatch($company);
92 92
 
93 93
             return $user;
94 94
         }catch(\Exception $e){
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
     protected function create(array $data)
43 43
     {
44
-        try{
44
+        try {
45 45
             DB::beginTransaction();
46 46
             // create person
47 47
             $person = new Person();
@@ -49,15 +49,15 @@  discard block
 block discarded – undo
49 49
             $person->save();
50 50
 
51 51
             // get user_group_id
52
-            $user_group = UserGroup::where('name','User')->first();
53
-            if($user_group == null) {
52
+            $user_group = UserGroup::where('name', 'User')->first();
53
+            if ($user_group == null) {
54 54
                 // create user_group
55 55
                 $user_group = UserGroup::create(['name'=>'User', 'description'=>'This is user group']);
56 56
             }
57 57
 
58 58
             // get role_id
59 59
             $role = Role::where('name', 'supervisor')->first();
60
-            if($role == null) {
60
+            if ($role == null) {
61 61
                 $role = Role::create(['menu_id'=>1, 'name'=>'supervisor', 'display_name'=>'User', 'description'=>'This is user']);
62 62
             }
63 63
             $user = User::create([
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
            Migrate::dispatch($company);
92 92
 
93 93
             return $user;
94
-        }catch(\Exception $e){
94
+        } catch (\Exception $e) {
95 95
             DB::rollBack();
96 96
             throw $e;
97 97
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
            Migrate::dispatch($company);
92 92
 
93 93
             return $user;
94
-        }catch(\Exception $e){
94
+        } catch(\Exception $e){
95 95
             DB::rollBack();
96 96
             throw $e;
97 97
         }
Please login to merge, or discard this patch.