Completed
Push — master ( f9ded0...b13d5b )
by John
02:58 queued 01:00
created

Router::executeEndpoint()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 7
rs 9.4285
c 1
b 0
f 0
ccs 4
cts 4
cp 1
cc 2
eloc 4
nc 2
nop 2
crap 2
1
<?php
2
namespace LunixREST\Server;
3
4
use LunixREST\APIRequest\APIRequest;
5
use LunixREST\Endpoint\Exceptions\UnknownEndpointException;
6
use LunixREST\Server\Exceptions\MethodNotFoundException;
7
8
/**
9
 * A router is what actually determines which class a method refers to, and which method on that class
10
 * Interface Router
11
 * @package LunixREST\Server
12
 */
13
interface Router
14
{
15
    /**
16
     * @param APIRequest $request
17
     * @return array|null|object
18
     * @throws MethodNotFoundException
19
     * @throws UnknownEndpointException
20
     */
21
    public function route(APIRequest $request);
22
}
23