@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | $i = 0; |
141 | 141 | foreach ($words as $w) { |
142 | - $initials .= $w[0]; |
|
142 | + $initials .= $w[ 0 ]; |
|
143 | 143 | $i++; |
144 | 144 | |
145 | 145 | if ($i === 3) { // Maximum: 3 letters |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $image = 'vendor/uccello/uccello/images/user-no-image.png'; |
161 | 161 | |
162 | 162 | if ($this->avatarType === 'gravatar') { |
163 | - $image = 'https://www.gravatar.com/avatar/' . md5($this->email) . '?d=mm'; |
|
163 | + $image = 'https://www.gravatar.com/avatar/'.md5($this->email).'?d=mm'; |
|
164 | 164 | |
165 | 165 | } elseif ($this->avatarType === 'image' && !empty($this->avatar->path)) { |
166 | 166 | $image = $this->avatar->path; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | */ |
178 | 178 | public function rolesOnDomain($domain) : Collection |
179 | 179 | { |
180 | - return Cache::remember('domain_'.$domain->slug.'_roles', 600, function () use($domain) { |
|
180 | + return Cache::remember('domain_'.$domain->slug.'_roles', 600, function() use($domain) { |
|
181 | 181 | $roles = collect(); |
182 | 182 | |
183 | 183 | foreach ($this->privileges->where('domain_id', $domain->id) as $privilege) { |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | |
217 | 217 | $hasRole = false; |
218 | 218 | |
219 | - $descendants = Cache::remember('domain_'.$domain->slug.'_descendants', 600, function () use($domain) { |
|
219 | + $descendants = Cache::remember('domain_'.$domain->slug.'_descendants', 600, function() use($domain) { |
|
220 | 220 | return $domain->findDescendants()->get(); |
221 | 221 | }); |
222 | 222 | |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | { |
243 | 243 | $keyName = 'user_'.$this->id.'_'.$domain->slug.'_'.$module->name.'_capabilities'; |
244 | 244 | |
245 | - return Cache::remember($keyName, 600, function () use($domain, $module) { |
|
245 | + return Cache::remember($keyName, 600, function() use($domain, $module) { |
|
246 | 246 | $capabilities = collect(); |
247 | 247 | |
248 | 248 | // Get the domain and all its parents |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | |
297 | 297 | $keyName = 'user_'.$this->id.'_'.$domain->slug.'_can_access_to_settings_panel'; |
298 | 298 | |
299 | - return Cache::remember($keyName, 600, function () use($domain) { |
|
299 | + return Cache::remember($keyName, 600, function() use($domain) { |
|
300 | 300 | |
301 | 301 | $hasCapability = false; |
302 | 302 |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | }); |
53 | 53 | |
54 | 54 | $validator = Validator::make(request()->all(), [ |
55 | - 'username' => $rules['username'], |
|
56 | - 'name' => $rules['name'], |
|
57 | - 'email' => $rules['email'], |
|
55 | + 'username' => $rules[ 'username' ], |
|
56 | + 'name' => $rules[ 'name' ], |
|
57 | + 'email' => $rules[ 'email' ], |
|
58 | 58 | ]); |
59 | 59 | |
60 | 60 | if ($validator->fails()) { |
@@ -93,11 +93,11 @@ discard block |
||
93 | 93 | if (request('avatar')) { |
94 | 94 | $image = str_replace('data:image/png;base64,', '', request('avatar')); |
95 | 95 | $image = str_replace(' ', '+', $image); |
96 | - $imageName = 'user-' . $user->id . '.png'; |
|
96 | + $imageName = 'user-'.$user->id.'.png'; |
|
97 | 97 | $path = storage_path('app/public/avatar/'); |
98 | - $filepath = $path . $imageName; |
|
98 | + $filepath = $path.$imageName; |
|
99 | 99 | |
100 | - if(!\File::isDirectory($path)){ |
|
100 | + if (!\File::isDirectory($path)) { |
|
101 | 101 | \File::makeDirectory($path, 0777, true, true); |
102 | 102 | } |
103 | 103 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | $field = Field::where('module_id', ucmodule('user')->id)->where('name', 'password')->first(); |
130 | 130 | $password_rules = isset($field->data->rules) ? explode('|', $field->data->rules) : ''; |
131 | - $password_rules[] = 'confirmed'; |
|
131 | + $password_rules[ ] = 'confirmed'; |
|
132 | 132 | |
133 | 133 | $validator = Validator::make(request()->all(), [ |
134 | 134 | 'current_password' => function($attribute, $value, $fail) use ($user) { |