@@ -15,7 +15,7 @@ |
||
15 | 15 | public function __invoke(User $user, UserForm $form) |
16 | 16 | { |
17 | 17 | $conn = $this->getConnection(); |
18 | - if($conn === 'tenant') { |
|
18 | + if ($conn === 'tenant') { |
|
19 | 19 | $user = Auth::user(); |
20 | 20 | $form = new UserFormIndi(); |
21 | 21 | return ['form'=> $form->edit($user)]; |
@@ -25,8 +25,8 @@ |
||
25 | 25 | public function __invoke(Request $request) |
26 | 26 | { |
27 | 27 | $this->tableClass = UserTable::class; |
28 | - $conn = $this->getConnection(); |
|
29 | - if($conn == 'tenant') { |
|
28 | + $conn = $this->getConnection(); |
|
29 | + if ($conn == 'tenant') { |
|
30 | 30 | $this->tableClass = UserTableIndi::class; |
31 | 31 | } |
32 | 32 |
@@ -111,7 +111,7 @@ discard block |
||
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 | $key = 'database.connections.tenant.database'; |
117 | 117 | config([$key => $db]); |
@@ -119,12 +119,12 @@ discard block |
||
119 | 119 | } else { |
120 | 120 | $this->setConnection('mysql'); |
121 | 121 | } |
122 | - $conn = $this->getConnection(); |
|
122 | + $conn = $this->getConnection(); |
|
123 | 123 | return $conn; |
124 | 124 | } |
125 | 125 | |
126 | 126 | // get companies of user. |
127 | - public function getDB(){ |
|
127 | + public function getDB() { |
|
128 | 128 | $user = Auth::user(); |
129 | 129 | $companies = $user->person->companies()->get(); |
130 | 130 | $ret = array(); |
@@ -28,21 +28,21 @@ discard block |
||
28 | 28 | ->add('password', __('You cannot use the existing password')); |
29 | 29 | } |
30 | 30 | |
31 | - if (! $this->hasMinUppercase()) { |
|
31 | + if (!$this->hasMinUppercase()) { |
|
32 | 32 | $this->validator->errors() |
33 | 33 | ->add('password', __('Minimum upper case letters count is :number', [ |
34 | 34 | 'number' => config('enso.auth.password.minUpperCase'), |
35 | 35 | ])); |
36 | 36 | } |
37 | 37 | |
38 | - if (! $this->hasMinNumeric()) { |
|
38 | + if (!$this->hasMinNumeric()) { |
|
39 | 39 | $this->validator->errors() |
40 | 40 | ->add('password', __('Minimum numeric characters count is :number', [ |
41 | 41 | 'number' => config('enso.auth.password.minNumeric'), |
42 | 42 | ])); |
43 | 43 | } |
44 | 44 | |
45 | - if (! $this->hasMinSpecial()) { |
|
45 | + if (!$this->hasMinSpecial()) { |
|
46 | 46 | $this->validator->errors() |
47 | 47 | ->add('password', __('Minimum special characters count is :number', [ |
48 | 48 | 'number' => config('enso.auth.password.minSpecial'), |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | private function hasMinUppercase() |
54 | 54 | { |
55 | - if (! config('enso.auth.password.minUpperCase')) { |
|
55 | + if (!config('enso.auth.password.minUpperCase')) { |
|
56 | 56 | return true; |
57 | 57 | } |
58 | 58 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | private function hasMinNumeric() |
65 | 65 | { |
66 | - if (! config('enso.auth.password.minNumeric')) { |
|
66 | + if (!config('enso.auth.password.minNumeric')) { |
|
67 | 67 | return true; |
68 | 68 | } |
69 | 69 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | private function hasMinSpecial() |
76 | 76 | { |
77 | - if (! config('enso.auth.password.minSpecial')) { |
|
77 | + if (!config('enso.auth.password.minSpecial')) { |
|
78 | 78 | return true; |
79 | 79 | } |
80 | 80 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | public function withValidator($validator) |
29 | 29 | { |
30 | 30 | if ($this->filled('password')) { |
31 | - $validator->after(fn ($validator) => (new PasswordValidator( |
|
31 | + $validator->after(fn($validator) => (new PasswordValidator( |
|
32 | 32 | $this, $validator, $this->route('user') |
33 | 33 | ))->handle()); |
34 | 34 | } |