Completed
Pull Request — master (#61)
by Michal
02:15
created

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