TestController::testRequestParamAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
namespace Test\TestBundle\Controller;
3
4
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
5
use Symfony\Component\HttpFoundation\JsonResponse;
6
use Symfony\Component\HttpFoundation\Request;
7
use Tpg\ExtjsBundle\Annotation as Extjs;
8
9
class TestController extends Controller {
10
11
    /**
12
     * @Extjs\Direct
13
     */
14
    public function testAction() {
15
        return new JsonResponse(array('result'=>'test'));
16
    }
17
18
    public function notApiAction() {
19
        return new JsonResponse(array('result'=>false));
20
    }
21
22
    /**
23
     * @Extjs\Direct
24
     */
25
    public function test2Action($id) {
26
        return new JsonResponse(array('result'=>$id));
27
    }
28
29
    /**
30
     * @Extjs\Direct
31
     */
32
    public function testRequestParamAction(Request $request) {
33
        return new JsonResponse(array('result'=>$request->query->get("id")));
34
    }
35
}