AuthController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 1
cbo 2
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A loginAction() 0 13 1
1
<?php
2
namespace AppBundle\Controller;
3
4
use AppBundle\Form\Type\LoginFormType;
5
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6
7
class AuthController extends Controller
8
{
9
    public function loginAction()
10
    {
11
        $authenticationUtils = $this->get('security.authentication_utils');
12
13
        $form = $this->createForm(LoginFormType::class, [
14
            'username' => $authenticationUtils->getLastUsername(),
15
        ], []);
16
17
        return $this->render('auth/login.html.twig', [
18
            'form' => $form->createView(),
19
            'error' => $authenticationUtils->getLastAuthenticationError(),
20
        ]);
21
    }
22
}
23