| Conditions | 6 |
| Paths | 10 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 74 | 42 | protected function run(): string |
|
| 75 | { |
||
| 76 | 42 | $tag = LabelTag::tag()->content( |
|
| 77 | 42 | $this->content ?? $this->getAttributeLabel() |
|
| 78 | ); |
||
| 79 | |||
| 80 | 42 | if ($this->setForAttribute) { |
|
| 81 | 38 | $id = $this->forId; |
|
| 82 | 38 | if ($id === null && $this->useInputIdAttribute) { |
|
| 83 | 30 | $id = $this->getInputId(); |
|
| 84 | } |
||
| 85 | 38 | if ($id !== null) { |
|
| 86 | 34 | $tag = $tag->forId($id); |
|
| 87 | } |
||
| 88 | } |
||
| 89 | |||
| 90 | 42 | if (!$this->encode) { |
|
| 91 | 1 | $tag = $tag->encode(false); |
|
| 92 | } |
||
| 93 | |||
| 94 | 42 | return $tag->render(); |
|
| 95 | } |
||
| 97 |