Total Complexity | 2 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | class Link extends AbstractSeries |
||
18 | { |
||
19 | /** |
||
20 | * Add an element to the list |
||
21 | * |
||
22 | * @param string $rel |
||
23 | * @param string $href |
||
24 | * |
||
25 | * @return Link |
||
26 | */ |
||
27 | 1 | public function add(string $rel, string $href): Link |
|
28 | { |
||
29 | $attributes = [ |
||
30 | 1 | 'rel' => $rel, |
|
31 | 1 | 'href' => $href, |
|
32 | ]; |
||
33 | |||
34 | 1 | $this->store[] = [ |
|
35 | 1 | "renderTag", |
|
36 | [ |
||
37 | 1 | $this->getTag(), |
|
38 | 1 | $attributes, |
|
39 | 1 | "/", |
|
40 | ], |
||
41 | 1 | $this->indent(), |
|
42 | ]; |
||
43 | |||
44 | 1 | return $this; |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * @return string |
||
49 | */ |
||
50 | 1 | protected function getTag(): string |
|
53 | } |
||
54 | } |
||
55 |