DefaultEndpoint::delete()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
namespace LunixREST\Server\Router\Endpoint;
3
4
use LunixREST\Server\Router\Endpoint\Exceptions\ElementConflictException;
5
use LunixREST\Server\Router\Endpoint\Exceptions\ElementNotFoundException;
6
use LunixREST\Server\Router\Endpoint\Exceptions\EndpointExecutionException;
7
use LunixREST\Server\Router\Endpoint\Exceptions\InvalidRequestException;
8
use LunixREST\Server\Router\Endpoint\Exceptions\UnsupportedMethodException;
9
use LunixREST\Server\APIRequest\APIRequest;
10
use LunixREST\Server\APIResponse\APIResponseData;
11
12
/**
13
 * An Endpoint that throws UnsupportedMethodException for all requests.
14
 * Class Endpoint
15
 * @package LunixREST\Server\Router\Endpoint
16
 */
17
class DefaultEndpoint implements Endpoint
18
{
19
    /**
20
     * @param APIRequest $request
21
     * @return APIResponseData
22
     * @throws EndpointExecutionException
23
     * @throws UnsupportedMethodException
24
     * @throws ElementNotFoundException
25
     * @throws InvalidRequestException
26
     */
27 1
    public function get(APIRequest $request): APIResponseData
28
    {
29 1
        throw new UnsupportedMethodException('Method not supported');
30
    }
31
32
    /**
33
     * @param APIRequest $request
34
     * @return APIResponseData
35
     * @throws EndpointExecutionException
36
     * @throws UnsupportedMethodException
37
     * @throws InvalidRequestException
38
     */
39 1
    public function getAll(APIRequest $request): APIResponseData
40
    {
41 1
        throw new UnsupportedMethodException('Method not supported');
42
    }
43
44
    /**
45
     * @param APIRequest $request
46
     * @return APIResponseData
47
     * @throws EndpointExecutionException
48
     * @throws UnsupportedMethodException
49
     * @throws ElementNotFoundException
50
     * @throws InvalidRequestException
51
     * @throws ElementConflictException
52
     */
53 1
    public function post(APIRequest $request): APIResponseData
54
    {
55 1
        throw new UnsupportedMethodException('Method not supported');
56
    }
57
58
    /**
59
     * @param APIRequest $request
60
     * @return APIResponseData
61
     * @throws EndpointExecutionException
62
     * @throws UnsupportedMethodException
63
     * @throws InvalidRequestException
64
     * @throws ElementConflictException
65
     */
66 1
    public function postAll(APIRequest $request): APIResponseData
67
    {
68 1
        throw new UnsupportedMethodException('Method not supported');
69
    }
70
71
    /**
72
     * @param APIRequest $request
73
     * @return APIResponseData
74
     * @throws EndpointExecutionException
75
     * @throws UnsupportedMethodException
76
     * @throws ElementNotFoundException
77
     * @throws InvalidRequestException
78
     * @throws ElementConflictException
79
     */
80 1
    public function put(APIRequest $request): APIResponseData
81
    {
82 1
        throw new UnsupportedMethodException('Method not supported');
83
    }
84
85
    /**
86
     * @param APIRequest $request
87
     * @return APIResponseData
88
     * @throws EndpointExecutionException
89
     * @throws UnsupportedMethodException
90
     * @throws InvalidRequestException
91
     * @throws ElementConflictException
92
     */
93 1
    public function putAll(APIRequest $request): APIResponseData
94
    {
95 1
        throw new UnsupportedMethodException('Method not supported');
96
    }
97
98
    /**
99
     * @param APIRequest $request
100
     * @return APIResponseData
101
     * @throws EndpointExecutionException
102
     * @throws UnsupportedMethodException
103
     * @throws ElementNotFoundException
104
     * @throws InvalidRequestException
105
     * @throws ElementConflictException
106
     */
107 1
    public function patch(APIRequest $request): APIResponseData
108
    {
109 1
        throw new UnsupportedMethodException('Method not supported');
110
    }
111
112
    /**
113
     * @param APIRequest $request
114
     * @return APIResponseData
115
     * @throws EndpointExecutionException
116
     * @throws UnsupportedMethodException
117
     * @throws InvalidRequestException
118
     * @throws ElementConflictException
119
     */
120 1
    public function patchAll(APIRequest $request): APIResponseData
121
    {
122 1
        throw new UnsupportedMethodException('Method not supported');
123
    }
124
125
    /**
126
     * @param APIRequest $request
127
     * @return APIResponseData
128
     * @throws EndpointExecutionException
129
     * @throws UnsupportedMethodException
130
     * @throws ElementNotFoundException
131
     * @throws InvalidRequestException
132
     */
133 1
    public function options(APIRequest $request): APIResponseData
134
    {
135 1
        throw new UnsupportedMethodException('Method not supported');
136
    }
137
138
    /**
139
     * @param APIRequest $request
140
     * @return APIResponseData
141
     * @throws EndpointExecutionException
142
     * @throws UnsupportedMethodException
143
     * @throws InvalidRequestException
144
     */
145 1
    public function optionsAll(APIRequest $request): APIResponseData
146
    {
147 1
        throw new UnsupportedMethodException('Method not supported');
148
    }
149
150
    /**
151
     * @param APIRequest $request
152
     * @return APIResponseData
153
     * @throws EndpointExecutionException
154
     * @throws UnsupportedMethodException
155
     * @throws ElementNotFoundException
156
     * @throws InvalidRequestException
157
     */
158 1
    public function delete(APIRequest $request): APIResponseData
159
    {
160 1
        throw new UnsupportedMethodException('Method not supported');
161
    }
162
163
    /**
164
     * @param APIRequest $request
165
     * @return APIResponseData
166
     * @throws EndpointExecutionException
167
     * @throws UnsupportedMethodException
168
     * @throws InvalidRequestException
169
     */
170 1
    public function deleteAll(APIRequest $request): APIResponseData
171
    {
172 1
        throw new UnsupportedMethodException('Method not supported');
173
    }
174
}
175