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

TestController2::completeTest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 6
nc 1
nop 4
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