for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* SecurityController Controller d'authentification.
*
* PHP Version 7
* @author Quétier Laurent <[email protected]>
* @copyright 2018 Dev-Int GLSR
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version GIT: $Id$
* @link https://github.com/Dev-Int/glsr
*/
namespace App\Controller;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
* Controller of Security
* @category Controller
class SecurityController extends Controller
{
* @Route("/login", name="login")
public function login(Request $request, AuthenticationUtils $authenticationUtils)
$request
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
// get the login error if there is one
$error = $authenticationUtils->getLastAuthenticationError();
// last username entered by the user
$lastUsername = $authenticationUtils->getLastUsername();
return $this->render('security/login.html.twig', [
'last_username' => $lastUsername,
'error' => $error,
]);
}
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.