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

ParsedURL::getEndpoint()   A

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
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
namespace LunixREST\APIRequest\URLParser;
3
4
class ParsedURL
5
{
6
    /**
7
     * @var string
8
     */
9
    private $endpoint;
10
    /**
11
     * @var null|string
12
     */
13
    private $element;
14
    /**
15
     * @var null|string
16
     */
17
    private $version;
18
    /**
19
     * @var null|string
20
     */
21
    private $apiKey;
22
    /**
23
     * @var array
24
     */
25
    private $acceptableMIMETypes;
26
    /**
27
     * @var null|string
28
     */
29
    private $queryString;
30
31
    /**
32
     * ParsedURL constructor.
33
     * @param string $endpoint
34
     * @param null|string $element
35
     * @param null|string $version
36
     * @param null|string $apiKey
37
     * @param array $acceptableMIMETypes
38
     * @param null|string $queryString
39
     */
40 3
    public function __construct(string $endpoint, ?string $element, ?string $version, ?string $apiKey, array $acceptableMIMETypes, ?string $queryString)
41
    {
42 3
        $this->endpoint = $endpoint;
43 3
        $this->element = $element;
44 3
        $this->version = $version;
45 3
        $this->apiKey = $apiKey;
46 3
        $this->acceptableMIMETypes = $acceptableMIMETypes;
47 3
        $this->queryString = $queryString;
48 3
    }
49
50
    /**
51
     * @return string
52
     */
53 3
    public function getEndpoint(): string
54
    {
55 3
        return $this->endpoint;
56
    }
57
58
    /**
59
     * @return null|string
60
     */
61 3
    public function getElement()
62
    {
63 3
        return $this->element;
64
    }
65
66
    /**
67
     * @return null|string
68
     */
69 3
    public function getVersion()
70
    {
71 3
        return $this->version;
72
    }
73
74
    /**
75
     * @return null|string
76
     */
77 3
    public function getApiKey()
78
    {
79 3
        return $this->apiKey;
80
    }
81
82
    /**
83
     * @return array
84
     */
85 3
    public function getAcceptableMIMETypes(): array
86
    {
87 3
        return $this->acceptableMIMETypes;
88
    }
89
90
    /**
91
     * @return null|string
92
     */
93 1
    public function getQueryString()
94
    {
95 1
        return $this->queryString;
96
    }
97
}
98