Completed
Push — master ( ae5e03...0447ee )
by Jeroen
10:35 queued 04:37
created

AbstractRedirectController::getIndexTemplate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Kunstmaan\LeadGenerationBundle\Controller;
4
5
use Kunstmaan\LeadGenerationBundle\Entity\Popup\AbstractPopup;
6
use Symfony\Component\Routing\Annotation\Route;
7
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
8
9
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...
10
{
11
    /**
12
     * @Route("/{popup}", name="redirect_index", requirements={"popup": "\d+"})
13
     */
14
    public function indexAction($popup)
15
    {
16
        /** @var AbstractPopup $thePopup */
17
        $thePopup = $this->getDoctrine()->getRepository(AbstractPopup::class)->find($popup);
18
19
        return $this->render($this->getIndexTemplate(), array(
20
            'popup' => $thePopup,
21
        ));
22
    }
23
24
    protected function getIndexTemplate()
25
    {
26
        return '@KunstmaanLeadGeneration/Redirect/index.html.twig';
27
    }
28
}
29