| Total Complexity | 5 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class LinkElement implements MetadataElementContract |
||
| 14 | { |
||
| 15 | protected string $rel; |
||
| 16 | protected string $href; |
||
| 17 | protected array $attr = []; |
||
| 18 | |||
| 19 | public function __construct(string $rel, string $href, array $attr = []) |
||
| 24 | } |
||
| 25 | |||
| 26 | public function __toString(): string |
||
| 27 | { |
||
| 28 | return sprintf('<link rel="%s" href="%s"%s>', e($this->rel), e($this->href), $this->formatOptionalAttributes()); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function uniqueKey(): string |
||
| 34 | } |
||
| 35 | |||
| 36 | protected function formatOptionalAttributes(): string |
||
| 47 |