Passed
Pull Request — master (#4)
by Ayan
05:45
created

Routed   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 18
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Phprest\Stub\Controller;
4
5
use Phprest\Annotation as Phprest;
6
use Phprest\Response;
7
use Phprest\Util\Controller as BaseController;
8
9
class Routed extends BaseController
10
{
11
    /**
12
     * @Phprest\Route(method="GET", path="/foos/{id}", since=1.2, until=2.8)
13
     */
14
    public static function getFoo()
15
    {
16
        return new Response\Ok('Hello World!');
17
    }
18
19
    /**
20
     * @Phprest\Route(method="POST", path="bars", since=0.5, until=0.7)
21
     */
22
    public static function postBar()
23
    {
24
        return new Response\Created('sample location');
25
    }
26
}
27