PHP7 compatible function definitions.

This commit is contained in:
James Cole
2016-04-06 16:37:28 +02:00
parent c8440af9a5
commit 250b2c2f53
71 changed files with 220 additions and 190 deletions

View File

@@ -38,13 +38,13 @@ class SendRegistrationMail
*
* @param UserRegistration $event
*
* @return void
* @return bool
*/
public function handle(UserRegistration $event)
public function handle(UserRegistration $event): bool
{
$sendMail = env('SEND_REGISTRATION_MAIL', true);
if (!$sendMail) {
return;
return true;
}
// get the email address
$email = $event->user->email;
@@ -60,5 +60,6 @@ class SendRegistrationMail
} catch (Swift_TransportException $e) {
Log::error($e->getMessage());
}
return true;
}
}

View File

@@ -39,24 +39,30 @@ class UserConfirmation
/**
* @param ResendConfirmation $event
*
* @return bool
*/
public function resendConfirmation(ResendConfirmation $event)
public function resendConfirmation(ResendConfirmation $event): bool
{
$user = $event->user;
$ipAddress = $event->ipAddress;
$this->doConfirm($user, $ipAddress);
return true;
}
/**
* Handle the event.
*
* @param UserRegistration $event
*
* @return bool
*/
public function sendConfirmation(UserRegistration $event)
public function sendConfirmation(UserRegistration $event): bool
{
$user = $event->user;
$ipAddress = $event->ipAddress;
$this->doConfirm($user, $ipAddress);
return true;
}
/**

View File

@@ -21,8 +21,10 @@ class UserEventListener
{
/**
* Handle user logout events.
*
* @return bool
*/
public function onUserLogout()
public function onUserLogout(): bool
{
// dump stuff from the session:
Session::forget('twofactor-authenticated');