Completed
Branch master (73f336)
by John
01:59
created

ParsedURL   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 86
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 86
c 0
b 0
f 0
wmc 7
lcom 0
cbo 0
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getRequestData() 0 3 1
A getVersion() 0 3 1
A getApiKey() 0 3 1
A getEndpoint() 0 3 1
A getExtension() 0 3 1
A getInstance() 0 3 1
1
<?php
2
namespace LunixREST\Request\URLParser;
3
4
use LunixREST\Request\RequestData\RequestData;
5
6
class ParsedURL {
7
    /**
8
     * @var RequestData
9
     */
10
    protected $requestData;
11
    /**
12
     * @var string
13
     */
14
    protected $version;
15
    /**
16
     * @var string
17
     */
18
    protected $apiKey;
19
    /**
20
     * @var string
21
     */
22
    protected $endpoint;
23
    /**
24
     * @var string
25
     */
26
    protected $extension;
27
    /**
28
     * @var string
29
     */
30
    protected $instance;
31
32
    /**
33
     * ParsedURL constructor.
34
     * @param RequestData $requestData
35
     * @param string $version
36
     * @param string $apiKey
37
     * @param string $endpoint
38
     * @param string $extension
39
     * @param string $instance
40
     */
41
    public function __construct(RequestData $requestData, $version, $apiKey, $endpoint, $extension, $instance) {
42
        $this->requestData = $requestData;
43
        $this->version = $version;
44
        $this->apiKey = $apiKey;
45
        $this->endpoint = $endpoint;
46
        $this->extension = $extension;
47
        $this->instance = $instance;
48
    }
49
50
    /**
51
     * @return RequestData
52
     */
53
    public function getRequestData(): RequestData {
54
        return $this->requestData;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    public function getVersion(): string {
61
        return $this->version;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getApiKey(): string {
68
        return $this->apiKey;
69
    }
70
71
    /**
72
     * @return string
73
     */
74
    public function getEndpoint(): string {
75
        return $this->endpoint;
76
    }
77
78
    /**
79
     * @return string
80
     */
81
    public function getExtension(): string {
82
        return $this->extension;
83
    }
84
85
    /**
86
     * @return string|null
87
     */
88
    public function getInstance() {
89
        return $this->instance;
90
    }
91
}
92