Controller   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A linkAction() 0 9 1
1
<?php
2
3
/*
4
 *
5
 * (c) Yaroslav Honcharuk <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Yarhon\RouteGuardBundle\Tests\Functional\app\src\Controller;
12
13
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
14
use Symfony\Component\Routing\Annotation\Route;
15
use Symfony\Component\HttpFoundation\Request;
16
use Symfony\Component\HttpFoundation\Response;
17
18
/**
19
 * @author Yaroslav Honcharuk <[email protected]>
20
 */
21
class Controller extends AbstractController
22
{
23
    /**
24
     * @Route("/link/{routeName}", name="link")
25
     */
26
    public function linkAction(Request $request, $routeName)
27
    {
28
        $parameters = $request->query->get('parameters', []);
29
        $method = $request->query->get('method', 'GET');
30
31
        return $this->render('link.html.twig', [
32
            'name' => $routeName,
33
            'parameters' => $parameters,
34
            'method' => $method,
35
        ]);
36
    }
37
}
38