refactor: code style changes
Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
@@ -40,7 +40,7 @@ class DenyUser
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param ApplicationDeniedEvent $event
|
||||
* @param ApplicationDeniedEvent $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(ApplicationDeniedEvent $event)
|
||||
|
@@ -2,9 +2,6 @@
|
||||
|
||||
namespace App\Listeners;
|
||||
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
|
||||
class NewUser
|
||||
{
|
||||
/**
|
||||
|
@@ -50,10 +50,9 @@ class OnUserRegistration
|
||||
Log::info('User '.$event->user->name.' has just registered for an account.');
|
||||
|
||||
User::whereHas('roles', function ($q) {
|
||||
$q->where('name', 'admin');
|
||||
$q->where('name', 'admin');
|
||||
})->get()->each(function ($user, $key) use ($event) {
|
||||
$user->notify(new NewUser($event->user));
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ class PromoteUser
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param ApplicationApprovedEvent $event
|
||||
* @param ApplicationApprovedEvent $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(ApplicationApprovedEvent $event)
|
||||
@@ -48,7 +48,7 @@ class PromoteUser
|
||||
Log::info('User promoted automatically (application approved)', [
|
||||
'user' => $event->application->user->name,
|
||||
'vacancy' => $event->application->response->vacancy->vacancyName,
|
||||
'role' => 'staff'
|
||||
'role' => 'staff',
|
||||
]);
|
||||
|
||||
$event->application->setStatus('APPROVED');
|
||||
|
Reference in New Issue
Block a user