Completed
Pull Request — master (#61)
by Tomas
02:14
created

Api::getHandler()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

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
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Tomaj\NetteApi;
4
5
use Tomaj\NetteApi\Authorization\ApiAuthorizationInterface;
6
use Tomaj\NetteApi\Handlers\ApiHandlerInterface;
7
8
class Api
9
{
10
    private $endpoint;
11
12
    private $handler;
13
14
    private $authorization;
15
16 30
    public function __construct(EndpointInterface $endpoint, ApiHandlerInterface $handler, ApiAuthorizationInterface $authorization)
17
    {
18 30
        $this->endpoint = $endpoint;
19 30
        $this->handler = $handler;
20 30
        $this->authorization = $authorization;
21 30
    }
22
23 27
    public function getEndpoint(): EndpointInterface
24
    {
25 27
        return $this->endpoint;
26
    }
27
28 27
    public function getHandler(): ApiHandlerInterface
29
    {
30 27
        return $this->handler;
31
    }
32
33 24
    public function getAuthorization(): ApiAuthorizationInterface
34
    {
35 24
        return $this->authorization;
36
    }
37
}
38