| Total Complexity | 6 |
| Total Lines | 71 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Label extends AbstractHtmlElement |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | protected $content; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $for; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * |
||
| 21 | */ |
||
| 22 | 6 | public function __construct(string $content) |
|
| 23 | { |
||
| 24 | 6 | $this->content = $content; |
|
| 25 | |||
| 26 | 6 | parent::__construct(); |
|
| 27 | 6 | } |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Get the value of content |
||
| 31 | * |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | 6 | public function getContent(): string |
|
| 35 | { |
||
| 36 | 6 | return $this->content; |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Get the value of for |
||
| 41 | * |
||
| 42 | * @return mixed |
||
| 43 | */ |
||
| 44 | 3 | public function getFor() |
|
| 45 | { |
||
| 46 | 3 | return $this->for; |
|
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Set the value of for |
||
| 51 | * |
||
| 52 | * @param mixed $for |
||
| 53 | * |
||
| 54 | * @return self |
||
| 55 | */ |
||
| 56 | 6 | public function setFor($for) |
|
| 57 | { |
||
| 58 | 6 | $this->for = $for; |
|
| 59 | |||
| 60 | 6 | return $this; |
|
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * |
||
| 65 | */ |
||
| 66 | 3 | protected function resolveAttributes(): AbstractHtmlElement |
|
| 67 | { |
||
| 68 | 3 | return parent::resolveAttributes() |
|
| 69 | 3 | ->addAttribute('for', $this->for); |
|
|
|
|||
| 70 | } |
||
| 71 | |||
| 72 | /** |
||
| 73 | * |
||
| 74 | */ |
||
| 75 | 3 | protected function renderHtmlMarkup(): string |
|
| 78 | } |
||
| 79 | } |
||
| 80 |