Completed
Push — master ( a7fff6...5ea170 )
by Jeroen
18:57 queued 10s
created

AbstractRedirectController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 20
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A indexAction() 0 9 1
A getIndexTemplate() 0 4 1
1
<?php
2
3
namespace Kunstmaan\LeadGenerationBundle\Controller;
4
5
use Symfony\Component\Routing\Annotation\Route;
6
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7
8
abstract class AbstractRedirectController extends Controller
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Bundle\Framework...e\Controller\Controller has been deprecated with message: since Symfony 4.2, use "Symfony\Bundle\FrameworkBundle\Controller\AbstractController" instead.

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
9
{
10
    /**
11
     * @Route("/{popup}", name="redirect_index", requirements={"popup": "\d+"})
12
     */
13
    public function indexAction($popup)
14
    {
15
        /** @var \Kunstmaan\LeadGenerationBundle\Entity\Popup\AbstractPopup $thePopup */
16
        $thePopup = $this->getDoctrine()->getRepository('KunstmaanLeadGenerationBundle:Popup\AbstractPopup')->find($popup);
17
18
        return $this->render($this->getIndexTemplate(), array(
19
            'popup' => $thePopup,
20
        ));
21
    }
22
23
    protected function getIndexTemplate()
24
    {
25
        return 'KunstmaanLeadGenerationBundle:Redirect:index.html.twig';
26
    }
27
}
28