| Conditions | 6 |
| Paths | 10 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 81 | protected function run(): string |
||
| 82 | { |
||
| 83 | $tag = LabelTag::tag()->content( |
||
| 84 | $this->content ?? $this->getAttributeLabel() |
||
| 85 | ); |
||
| 86 | |||
| 87 | if ($this->setForAttribute) { |
||
| 88 | $id = $this->forId; |
||
| 89 | if ($id === null && $this->useInputIdAttribute) { |
||
| 90 | $id = $this->getInputId(); |
||
| 91 | } |
||
| 92 | if ($id !== null) { |
||
| 93 | $tag = $tag->forId($id); |
||
| 94 | } |
||
| 95 | } |
||
| 96 | |||
| 97 | if (!$this->encode) { |
||
| 98 | $tag = $tag->encode(false); |
||
| 99 | } |
||
| 100 | |||
| 101 | return $tag->render(); |
||
| 102 | } |
||
| 104 |