Total Complexity | 5 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
9 | final class LinkBuilder implements LinkBuilderInterface |
||
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 | 2 | private function __construct() |
|
28 | 2 | } |
|
29 | |||
30 | public static function create(string $href): LinkBuilderInterface |
||
38 | 2 | } |
|
39 | 2 | ||
40 | 2 | /** |
|
41 | * @param string[] $rels |
||
42 | 2 | */ |
|
43 | public function setRels(array $rels): LinkBuilderInterface |
||
44 | { |
||
45 | $this->rels = $rels; |
||
46 | |||
47 | return $this; |
||
48 | } |
||
49 | |||
50 | 1 | public function setAttributes(array $attributes): LinkBuilderInterface |
|
51 | { |
||
52 | 1 | $this->attributes = $attributes; |
|
53 | |||
54 | 1 | return $this; |
|
55 | } |
||
56 | |||
57 | public function getLink(): LinkInterface |
||
60 | } |
||
61 | } |
||
62 |