Fixed some inspection issues.

This commit is contained in:
Jan Böhmer 2020-08-21 22:43:37 +02:00
parent 6caf605fe2
commit e01b06fb85
80 changed files with 173 additions and 218 deletions

View file

@ -102,7 +102,7 @@ final class LoginSuccessSubscriber implements EventSubscriberInterface
*
* @return array The event names to listen to
*/
public static function getSubscribedEvents()
public static function getSubscribedEvents(): array
{
return [SecurityEvents::INTERACTIVE_LOGIN => 'onLogin'];
}

View file

@ -94,7 +94,7 @@ final class LogoutDisabledUserSubscriber implements EventSubscriberInterface
*
* @return array The event names to listen to
*/
public static function getSubscribedEvents()
public static function getSubscribedEvents(): array
{
return [KernelEvents::REQUEST => 'onRequest'];
}

View file

@ -147,14 +147,10 @@ final class PasswordChangeNeededSubscriber implements EventSubscriberInterface
{
$tfa_enabled = $user->isU2FAuthEnabled() || $user->isGoogleAuthenticatorEnabled();
if (null !== $user->getGroup() && $user->getGroup()->isEnforce2FA() && !$tfa_enabled) {
return true;
}
return false;
return null !== $user->getGroup() && $user->getGroup()->isEnforce2FA() && !$tfa_enabled;
}
public static function getSubscribedEvents()
public static function getSubscribedEvents(): array
{
return [
KernelEvents::REQUEST => 'redirectToSettingsIfNeeded',

View file

@ -101,7 +101,7 @@ final class SetUserTimezoneSubscriber implements EventSubscriberInterface
*
* @return array The event names to listen to
*/
public static function getSubscribedEvents()
public static function getSubscribedEvents(): array
{
//Set the timezone shortly before executing the controller
return [