Passed
Push — master ( 403ced...b7cceb )
by Curtis
11:20 queued 05:48
created
app/Traits/ConnectionTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@  discard block
 block discarded – undo
7 7
 
8 8
 trait ConnectionTrait
9 9
 {
10
-    public function setConnection($conn='mysql', $db='enso')
10
+    public function setConnection($conn = 'mysql', $db = 'enso')
11 11
     {
12
-        if($conn == Connections::Tenant) {
12
+        if ($conn == Connections::Tenant) {
13 13
             $key = 'database.connections.tenant.database';
14 14
             config([$key => $db]);
15 15
         }
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $conn = \Session::get('conn');
23 23
         $db = \Session::get('db');
24
-        if($conn == 'tenant') {
24
+        if ($conn == 'tenant') {
25 25
             $key = 'database.connections.tenant.database';
26 26
             $value = $db;
27 27
             config([$key => $value]);
Please login to merge, or discard this patch.
app/Http/Controllers/Dashboard/ChartController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -111,18 +111,18 @@
 block discarded – undo
111 111
     // change database to use
112 112
     public function changedb(Request $request) {
113 113
         $company_id = $request->get('comid');
114
-        if(!empty($company_id)){
114
+        if (!empty($company_id)) {
115 115
             $db = Connections::Tenant.$company_id;
116 116
             $this->setConnection(Connections::Tenant, $db);
117 117
         } else {
118 118
             $this->setConnection('mysql');
119 119
         }
120
-        $conn =  $this->getConnection();
120
+        $conn = $this->getConnection();
121 121
         return $conn;
122 122
     }
123 123
 
124 124
     // get companies of user.
125
-    public function getDB(){
125
+    public function getDB() {
126 126
         $user = Auth::user();
127 127
         $companies = $user->person->companies()->get();
128 128
         $ret = array();
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/LoginController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $user = $this->loggableUser($request);
39 39
 
40
-        if (! $user) {
40
+        if (!$user) {
41 41
             return false;
42 42
         }
43 43
 
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
         }
67 67
         // set company id as default
68 68
         $main_company = $user->person->company();
69
-        if($main_company !== null && !($user->isAdmin())) {
69
+        if ($main_company !== null && !($user->isAdmin())) {
70 70
             $c_id = $main_company->id;
71 71
             $db = Connections::Tenant.$c_id;
72 72
             $this->setConnection(Connections::Tenant, $db);
73 73
         }
74 74
 
75
-        if (! optional($user)->currentPasswordIs($request->input('password'))) {
75
+        if (!optional($user)->currentPasswordIs($request->input('password'))) {
76 76
             return;
77 77
         }
78 78
 
Please login to merge, or discard this patch.