TestController   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 4
c 3
b 1
f 0
lcom 0
cbo 4
dl 0
loc 27
ccs 0
cts 8
cp 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A testAction() 0 3 1
A notApiAction() 0 3 1
A test2Action() 0 3 1
A testRequestParamAction() 0 3 1
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
}