Options::getParams()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Lincable\Parsers;
4
5
use Lincable\Contracts\Parsers\ParameterInterface;
6
7
class Options implements ParameterInterface
8
{
9
    /**
10
     * The options value name.
11
     *
12
     * @var string
13
     */
14
    protected $value;
15
16
    /**
17
     * The options parameters.
18
     *
19
     * @var array
20
     */
21
    protected $params;
22
23
    /**
24
     * {@inheritdoc}
25
     */
26 46
    public function __construct(string $value, $params = null)
27
    {
28 46
        $this->value = $value;
29 46
        $this->params = array_wrap($params);
30 46
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35 42
    public function getValue(): string
36
    {
37 42
        return $this->value;
38
    }
39
40
    /**
41
     * {@inheritdoc}
42
     */
43 42
    public function getParams(): array
44
    {
45 42
        return $this->params;
46
    }
47
}
48