TranslatableItemLabel::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Everlution\NavigationBundle\Bridge\Item;
6
7
/**
8
 * Class TranslatableItemLabel.
9
 *
10
 * @author Ivan Barlog <[email protected]>
11
 */
12
class TranslatableItemLabel implements TranslatableItemLabelInterface
13
{
14
    /** @var string */
15
    private $value;
16
    /** @var array */
17
    private $parameters;
18
19
    public function __construct(string $value, array $parameters = [])
20
    {
21
        $this->value = $value;
22
        $this->parameters = $parameters;
23
    }
24
25
    public function getValue(): string
26
    {
27
        return $this->value;
28
    }
29
30
    public function getParameters(): array
31
    {
32
        return $this->parameters;
33
    }
34
35
    public function __toString(): string
36
    {
37
        return $this->value;
38
    }
39
}
40