InputParameterBag   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 61
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 61
rs 10
c 0
b 0
f 0
wmc 6
lcom 2
cbo 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setGetParameter() 0 4 1
A getGetParameters() 0 4 1
A setUriParameter() 0 4 1
A getUriParameters() 0 4 1
A getUrl() 0 4 1
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
    private $getParameters = [];
13
14
    /**
15
     * @var array
16
     */
17
    private $uriParameters = [];
18
19
    /**
20
     * @var string
21
     */
22
    private $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