| Total Complexity | 5 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | final class Link implements LinkInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | private $href; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string[] |
||
| 18 | */ |
||
| 19 | private $rels; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var array |
||
| 23 | */ |
||
| 24 | private $attributes; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string[] $rels |
||
| 28 | */ |
||
| 29 | public function __construct(string $href, array $rels, array $attributes) |
||
| 30 | { |
||
| 31 | 2 | $this->href = $href; |
|
| 32 | $this->rels = $rels; |
||
| 33 | 2 | $this->attributes = $attributes; |
|
| 34 | 2 | } |
|
| 35 | 2 | ||
| 36 | 2 | public function getHref(): string |
|
| 39 | } |
||
| 40 | |||
| 41 | 2 | public function isTemplated(): bool |
|
| 42 | { |
||
| 43 | 2 | return false !== strpos($this->href, '{'); |
|
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return string[] |
||
| 48 | */ |
||
| 49 | 2 | public function getRels(): array |
|
| 52 | } |
||
| 53 | |||
| 54 | public function getAttributes(): array |
||
| 59 |