Total Complexity | 4 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
16 | final class ObjectQueue |
||
17 | { |
||
18 | private $tag; |
||
19 | private $tagContent; |
||
20 | |||
21 | /** |
||
22 | * Object constructor. |
||
23 | * |
||
24 | * @param string $tag |
||
25 | * @param string $tagContent |
||
26 | */ |
||
27 | 5 | public function __construct(string $tag, string $tagContent) |
|
28 | { |
||
29 | 5 | $this->tag = $tag; |
|
30 | 5 | $this->tagContent = $this->cleanTagContent($tagContent); |
|
31 | 5 | } |
|
32 | |||
33 | /** |
||
34 | * @return string |
||
35 | */ |
||
36 | 5 | public function getTag(): string |
|
39 | } |
||
40 | |||
41 | /** |
||
42 | * @return string |
||
43 | */ |
||
44 | 5 | public function getTagContent(): string |
|
47 | } |
||
48 | |||
49 | /** |
||
50 | * Clean Content from Html tag. |
||
51 | * Remove space at the begin and end, useless space, return. |
||
52 | * |
||
53 | * @param string $tagContent |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | 5 | private function cleanTagContent(string $tagContent): string |
|
60 | } |
||
61 | } |
||
62 |