Completed
Push — fetcher_factories ( 951c99...ef2a05 )
by David
09:00
created

TestController2   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
c 2
b 0
f 0
lcom 0
cbo 2
dl 0
loc 43
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A action1() 0 3 1
A actionAnnotation() 0 3 1
A index() 0 3 1
A completeTest() 0 8 1
1
<?php
2
namespace Mouf\Mvc\Splash\Fixtures;
3
4
use Psr\Http\Message\ServerRequestInterface;
5
use Zend\Diactoros\Response\JsonResponse;
6
7
class TestController2
8
{
9
    private $param = 42;
10
    private $param2 = 52;
11
12
    /**
13
     * @URL /url/{$this->param}/foo/{$this->param2}
14
     */
15
    public function action1() {
16
17
    }
18
19
    /**
20
     * @Action
21
     */
22
    public function actionAnnotation() {
23
24
    }
25
26
    /**
27
     * @Action
28
     * @Title Main page
29
     * @Get
30
     * @Post
31
     * @Put
32
     * @Delete
33
     */
34
    public function index() {
35
36
    }
37
38
    /**
39
     * @URL /foo/{var}/bar
40
     */
41
    public function completeTest($id, ServerRequestInterface $request, $var, $opt = 42) {
42
        return new JsonResponse([
43
           'id' => $id,
44
            'id2' => $request->getQueryParams()['id'],
45
            'var' => $var,
46
            'opt' => $opt
47
        ]);
48
    }
49
}
50