Failed Conditions
Pull Request — experimental/sf (#29)
by Kentaro
51:40 queued 07:20
created

AnnotatedRoutingController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 30
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Plugin\AnnotatedRouting\Controller;
15
16
use Eccube\Application;
17
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
18
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
19
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
20
use Symfony\Component\HttpFoundation\Request;
21
22
/**
23
 * @Route(value="/arc", service=AnnotatedRoutingController::class)
24
 */
25
class AnnotatedRoutingController
26
{
27
    /**
28
     * @Route("/")
29
     * @Template("AnnotatedRouting/Resource/template/index.twig")
30
     */
31
    public function index(Application $app)
32
    {
33
        return [];
34
    }
35
36
    /**
37
     * @Route("/form")
38
     * @Method("GET")
39
     * @Template("AnnotatedRouting/Resource/template/form.twig")
40
     */
41
    public function form(Application $app)
42
    {
43
        return [];
44
    }
45
46
    /**
47
     * @Route("/form")
48
     * @Method("POST")
49
     */
50
    public function submit(Application $app, Request $request)
51
    {
52
        return $app->escape('Hello, '.$request->get('value'));
53
    }
54
}
55