BeforeCollectionTestController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testMethod() 0 4 1
A beforeCallback() 0 4 1
1
<?php
2
3
namespace DDesrosiers\Test\SilexAnnotations\Controller;
4
5
use Exception;
6
use Symfony\Component\HttpFoundation\Response;
7
8
/**
9
 * @Controller(
10
 *     prefix => before
11
 *     before => DDesrosiers\Test\SilexAnnotations\Controller\BeforeTestController::beforeCallback
12
 * )
13
 */
14
class BeforeCollectionTestController
15
{
16
    /**
17
     * @Route(GET /test)
18
     *
19
     * @param $var
20
     * @return Response
21
     */
22
    public function testMethod($var)
23
    {
24
        return new Response($var);
25
    }
26
27
    /**
28
     * @throws Exception
29
     */
30
    public static function beforeCallback()
31
    {
32
        throw new Exception("before callback");
33
    }
34
}
35