PSR 2 compliance
This commit is contained in:
parent
cc837cf9e5
commit
005e755158
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace App\Authenticator;
|
||||
|
||||
|
||||
use App\Entity\User;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
|
@ -95,4 +94,3 @@ class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
|
|||
return $this->urlGenerator->generate('auth_login');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace App\Controller\Account;
|
||||
|
||||
use App\Controller\Admin\AdminController;
|
||||
use App\Manager\EntityManager;
|
||||
use App\Repository\UserRepository;
|
||||
use Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Google\GoogleAuthenticatorInterface;
|
||||
use Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Google\GoogleAuthenticatorInterface as TotpAuthenticatorInterface;
|
||||
|
@ -9,10 +11,8 @@ use Symfony\Component\HttpFoundation\Request;
|
|||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
|
||||
use ZxcvbnPhp\Zxcvbn;
|
||||
use Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface;
|
||||
use App\Controller\Admin\AdminController;
|
||||
use App\Manager\EntityManager;
|
||||
use ZxcvbnPhp\Zxcvbn;
|
||||
|
||||
/**
|
||||
* @Route("/admin/account")
|
||||
|
|
|
@ -2,20 +2,18 @@
|
|||
|
||||
namespace App\Controller\Auth;
|
||||
|
||||
use App\Event\Account\PasswordRequestEvent;
|
||||
use App\Manager\EntityManager;
|
||||
use App\Repository\UserRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
|
||||
use App\Notification\MailNotifier;
|
||||
use Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface;
|
||||
use ZxcvbnPhp\Zxcvbn;
|
||||
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
|
||||
use App\Manager\EntityManager;
|
||||
use App\Event\Account\PasswordRequestEvent;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface;
|
||||
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
|
||||
use ZxcvbnPhp\Zxcvbn;
|
||||
|
||||
class AuthController extends AbstractController
|
||||
{
|
||||
|
@ -46,8 +44,7 @@ class AuthController extends AbstractController
|
|||
TokenGeneratorInterface $tokenGenerator,
|
||||
EntityManager $entityManager,
|
||||
EventDispatcherInterface $eventDispatcher
|
||||
): Response
|
||||
{
|
||||
): Response {
|
||||
if ($this->getUser()) {
|
||||
return $this->redirectToRoute('admin_dashboard_index');
|
||||
}
|
||||
|
@ -99,8 +96,7 @@ class AuthController extends AbstractController
|
|||
TokenGeneratorInterface $tokenGenerator,
|
||||
UserPasswordEncoderInterface $encoder,
|
||||
EntityManager $entityManager
|
||||
): Response
|
||||
{
|
||||
): Response {
|
||||
if ($this->getUser()) {
|
||||
return $this->redirectToRoute('index');
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace App\Controller\Dashboard;
|
||||
|
||||
use App\Controller\Admin\AdminController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use App\Controller\Admin\AdminController;
|
||||
|
||||
/**
|
||||
* @Route("/admin")
|
||||
|
|
|
@ -4,9 +4,9 @@ namespace App\Entity;
|
|||
|
||||
use App\Repository\UserRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Scheb\TwoFactorBundle\Model\Totp\TotpConfiguration;
|
||||
use Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface;
|
||||
use Scheb\TwoFactorBundle\Model\Totp\TotpConfiguration;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=UserRepository::class)
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace App\Event\Account;
|
||||
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
use App\Entity\User;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* class PasswordRequestEvent.
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace App\Event\EntityManager;
|
||||
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
use App\Entity\Entity;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* class EntityEvent.
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
|
||||
namespace App\EventSuscriber;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use App\Event\EntityManager\EntityManagerEvent;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use App\Event\Account\PasswordRequestEvent;
|
||||
use App\Notification\MailNotifier;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
|
||||
/**
|
||||
* class EventListener.
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace App\EventSuscriber;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use App\Event\EntityManager\EntityManagerEvent;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
/**
|
||||
* class EventListener.
|
||||
|
|
Loading…
Reference in a new issue