Test Failed
Pull Request — master (#87)
by Dmitriy
02:46
created

RestControllerTrait   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A post() 0 3 1
A delete() 0 3 1
A list() 0 3 1
A head() 0 3 1
A put() 0 3 1
A patch() 0 3 1
A options() 0 3 1
A get() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Infrastructure\Http;
6
7
use App\Application\Exception\MethodNotAllowedException;
8
use Psr\Http\Message\ResponseInterface;
9
10
trait RestControllerTrait
11
{
12
    public function delete(): ResponseInterface
13
    {
14
        throw new MethodNotAllowedException();
15
    }
16
17
    public function head(): ResponseInterface
18
    {
19
        throw new MethodNotAllowedException();
20
    }
21
22
    public function get(): ResponseInterface
23
    {
24
        throw new MethodNotAllowedException();
25
    }
26
27
    public function list(): ResponseInterface
28
    {
29
        throw new MethodNotAllowedException();
30
    }
31
32
    public function options(): ResponseInterface
33
    {
34
        throw new MethodNotAllowedException();
35
    }
36
37
    public function patch(): ResponseInterface
38
    {
39
        throw new MethodNotAllowedException();
40
    }
41
42
    public function post(): ResponseInterface
43
    {
44
        throw new MethodNotAllowedException();
45
    }
46
47
    public function put(): ResponseInterface
48
    {
49
        throw new MethodNotAllowedException();
50
    }
51
}
52