Completed
Push — master ( c55f61...fd7370 )
by Joachim
16:23
created

TerminalController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A indexAction() 0 11 1
1
<?php
2
3
namespace Loevgaard\DandomainAltapayBundle\Controller;
4
5
use Loevgaard\DandomainAltapayBundle\Entity\Terminal;
6
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
7
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
8
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
9
use Symfony\Component\HttpFoundation\Response;
10
11
/**
12
 * @Route("/terminal")
13
 */
14
class TerminalController extends Controller
15
{
16
    /**
17
     * @Method("GET")
18
     * @Route("", name="loevgaard_dandomain_altapay_terminal_index")
19
     *
20
     * @return Response
21
     */
22
    public function indexAction()
23
    {
24
        $terminalManager = $this->container->get('loevgaard_dandomain_altapay.terminal_manager');
25
26
        /** @var Terminal[] $terminals */
27
        $terminals = $terminalManager->getRepository()->findAll();
28
29
        return $this->render('@LoevgaardDandomainAltapay/terminal/index.html.twig', [
30
            'terminals' => $terminals,
31
        ]);
32
    }
33
}
34