| Total Complexity | 5 |
| Total Lines | 63 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | final class ButtonView implements ButtonViewInterface |
||
| 16 | { |
||
| 17 | use RenderableTrait; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | private $name; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | private $value; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var bool |
||
| 31 | */ |
||
| 32 | private $clicked; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * ButtonView constructor. |
||
| 36 | * |
||
| 37 | * @param string $name |
||
| 38 | * @param mixed $value |
||
| 39 | * @param bool $clicked |
||
| 40 | */ |
||
| 41 | 13 | public function __construct(string $name, string $value, bool $clicked) |
|
| 42 | { |
||
| 43 | 13 | $this->name = $name; |
|
| 44 | 13 | $this->value = $value; |
|
| 45 | 13 | $this->clicked = $clicked; |
|
| 46 | 13 | } |
|
| 47 | |||
| 48 | /** |
||
| 49 | * {@inheritdoc} |
||
| 50 | */ |
||
| 51 | 8 | public function name(): string |
|
| 52 | { |
||
| 53 | 8 | return $this->name; |
|
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * {@inheritdoc} |
||
| 58 | */ |
||
| 59 | 8 | public function value(): string |
|
| 60 | { |
||
| 61 | 8 | return $this->value; |
|
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * {@inheritdoc} |
||
| 66 | */ |
||
| 67 | 2 | public function clicked(): bool |
|
| 70 | } |
||
| 71 | |||
| 72 | /** |
||
| 73 | * {@inheritdoc} |
||
| 74 | */ |
||
| 75 | 3 | public function render(?ButtonViewRendererInterface $renderer = null): string |
|
| 80 |