From 43f6a9cced53961a9bb04676efd36b559cd34dcb Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Fri, 5 Jan 2018 10:41:32 +0100 Subject: [PATCH] code cleanup --- CONTRIBUTING.md | 5 ++--- .../Controller/SecurityController.php | 18 +++++++----------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e7dfc0aa..f7c2f603 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,10 +1,9 @@ Contributing ============ -The Symfony Demo application is an open source project. Contributions made by +The Kimai application is an open source project. Contributions made by the community are welcome. Send us your ideas, code reviews, pull requests and -feature requests to help us improve this project. All contributions must follow -the [usual Symfony contribution requirements](http://symfony.com/doc/current/contributing/index.html). +feature requests to help us improve this project. Web Assets Management --------------------- diff --git a/src/AppBundle/Controller/SecurityController.php b/src/AppBundle/Controller/SecurityController.php index 74e513bd..4acfdf6e 100644 --- a/src/AppBundle/Controller/SecurityController.php +++ b/src/AppBundle/Controller/SecurityController.php @@ -1,9 +1,9 @@ + * (c) Kevin Papst * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,15 +12,11 @@ namespace AppBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; /** * Controller used to manage the application security. * See http://symfony.com/doc/current/cookbook/security/form_login_setup.html. - * - * @author Ryan Weaver - * @author Javier Eguiluz */ class SecurityController extends Controller { @@ -31,11 +27,8 @@ class SecurityController extends Controller { $helper = $this->get('security.authentication_utils'); - //return $this->render('AvanzuAdminThemeBundle:Security:login.html.twig', [ return $this->render('security/login.html.twig', [ - // last username entered by the user (if any) 'last_username' => $helper->getLastUsername(), - // last authentication error (if any) 'error' => $helper->getLastAuthenticationError(), ]); } @@ -43,8 +36,11 @@ class SecurityController extends Controller /** * This is the route the user can use to logout. * - * But, this will never be executed. Symfony will intercept this first - * and handle the logout automatically. See logout in app/config/security.yml + * The route needs to exist! + * It could be configured in the routes.yml as well, but having it here in one place seemed to be the better was. + * + * The code will never be executed. Symfony will intercept this request and handle the logout automatically. + * See logout in app/config/security.yml * * @Route("/logout", name="security_logout") */