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