Cluster::getSelection()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Marek\OpenWeatherMap\API\Value\Parameter\Input;
6
7
use Marek\OpenWeatherMap\API\Value\Parameter\GetParameterInterface;
8
9
class Cluster implements GetParameterInterface
10
{
11
    public const YES = 'yes';
12
13
    public const NO = 'no';
14
15
    /**
16
     * @var string
17
     */
18
    protected $selection;
19
20
    /**
21
     * Cluster constructor.
22
     *
23
     * @param string $selection
24
     */
25
    public function __construct(string $selection = self::YES)
26
    {
27
        $this->selection = $selection;
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getSelection()
34
    {
35
        return $this->selection;
36
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41
    public function getGetParameterValue(): string
42
    {
43
        return $this->selection;
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function getGetParameterName(): string
50
    {
51
        return 'cluster';
52
    }
53
}
54