Completed
Push — master ( 6551be...435af8 )
by Mario
09:41
created

InputParameterBag::getUriParameters()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Marek\OpenWeatherMap\API\Value\Parameter;
6
7
final class InputParameterBag
8
{
9
    /**
10
     * @var array
11
     */
12
    protected $getParameters = [];
13
14
    /**
15
     * @var array
16
     */
17
    protected $uriParameters = [];
18
19
    /**
20
     * @var string
21
     */
22
    protected $url;
23
24
    /**
25
     * InputParameterBag constructor.
26
     *
27
     * @param string $url
28
     */
29
    public function __construct(string $url)
30
    {
31
        $this->url = $url;
32
    }
33
34
    /**
35
     * @param GetParameterInterface $parameter
36
     */
37
    public function setGetParameter(GetParameterInterface $parameter): void
38
    {
39
        $this->getParameters[] = $parameter;
40
    }
41
42
    public function getGetParameters(): array
43
    {
44
        return $this->getParameters;
45
    }
46
47
    public function setUriParameter(UriParameterInterface $parameter): void
48
    {
49
        $this->uriParameters[] = $parameter;
50
    }
51
52
    /**
53
     * @return ParameterInterface[]
54
     */
55
    public function getUriParameters(): array
56
    {
57
        return $this->uriParameters;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getUrl(): string
64
    {
65
        return $this->url;
66
    }
67
}
68