| Conditions | 3 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function created(User $user): void |
||
| 22 | { |
||
| 23 | $roleData = Role::query()->where('id', $user->roles_id); |
||
| 24 | $rateLimit = $roleData->value('rate_limit'); |
||
| 25 | $roleName = $roleData->value('name'); |
||
| 26 | $user->syncRoles([$roleName]); |
||
| 27 | $user->update( |
||
| 28 | [ |
||
| 29 | 'api_token' => md5(Password::getRepository()->createNewToken()), |
||
|
|
|||
| 30 | 'rate_limit' => $rateLimit, |
||
| 31 | ] |
||
| 32 | ); |
||
| 33 | if (! empty(config('mail.from.address') && File::isFile(base_path().'/_install/install.lock'))) { |
||
| 34 | SendNewRegisteredAccountMail::dispatch($user)->onQueue('newreg'); |
||
| 35 | SendWelcomeEmail::dispatch($user)->onQueue('welcomeemails'); |
||
| 36 | UserVerification::generate($user); |
||
| 37 | |||
| 38 | UserVerification::send($user, 'User email verification required', config('mail.from.address')); |
||
| 39 | } |
||
| 42 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.