Passed
Push — master ( d88860...75e65e )
by Alexander
03:55
created

RestControllerTrait   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Test Coverage

Coverage 12.5%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 8
eloc 10
c 1
b 0
f 0
dl 0
loc 40
ccs 2
cts 16
cp 0.125
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A head() 0 3 1
A post() 0 3 1
A put() 0 3 1
A list() 0 3 1
A patch() 0 3 1
A options() 0 3 1
A delete() 0 3 1
A get() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App;
6
7
use App\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 1
    public function put(): ResponseInterface
48
    {
49 1
        throw new MethodNotAllowedException();
50
    }
51
}
52