DefaultController::indexAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Symfony Standard project.
5
 *
6
 * Copyright (c) 2016 LIN3S <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace AppBundle\Controller;
13
14
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
15
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
16
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
17
18
/**
19
 * Default controller class.
20
 *
21
 * @author Jon Torrado <[email protected]>
22
 * @author Beñat Espiña <[email protected]>
23
 */
24
class DefaultController extends Controller
25
{
26
    /**
27
     * Index action.
28
     *
29
     * @Route("/", name="homepage")
30
     * @Method("GET")
31
     *
32
     * @return \Symfony\Component\HttpFoundation\Response
33
     */
34
    public function indexAction()
35
    {
36
        // replace this example code with whatever you need
37
        return $this->render('default/index.html.twig', array(
38
            'base_dir' => realpath($this->container->getParameter('kernel.root_dir').'/..'),
39
        ));
40
    }
41
}
42