| Total Complexity | 6 |
| Total Lines | 89 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | class Meta extends AbstractSeries |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * Add an element to the list |
||
| 23 | * |
||
| 24 | * @param array $attributes |
||
| 25 | * |
||
| 26 | * @return Meta |
||
| 27 | * @throws Exception |
||
| 28 | */ |
||
| 29 | 2 | public function add(array $attributes = []): Meta |
|
| 30 | { |
||
| 31 | 2 | $this->store[] = $this->indent |
|
| 32 | 2 | . $this->renderTag( |
|
| 33 | 2 | $this->getTag(), |
|
| 34 | $attributes |
||
| 35 | ) |
||
| 36 | ; |
||
| 37 | |||
| 38 | 2 | return $this; |
|
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param string $httpEquiv |
||
| 43 | * @param string $content |
||
| 44 | * |
||
| 45 | * @return Meta |
||
| 46 | * @throws Exception |
||
| 47 | */ |
||
| 48 | 2 | public function addHttp(string $httpEquiv, string $content): Meta |
|
| 49 | { |
||
| 50 | 2 | return $this->addElement('http-equiv', $httpEquiv, $content); |
|
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $name |
||
| 55 | * @param string $content |
||
| 56 | * |
||
| 57 | * @return Meta |
||
| 58 | * @throws Exception |
||
| 59 | */ |
||
| 60 | 2 | public function addName(string $name, string $content): Meta |
|
| 61 | { |
||
| 62 | 2 | $this->addElement('name', $name, $content); |
|
| 63 | |||
| 64 | 2 | return $this; |
|
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @param string $name |
||
| 69 | * @param string $content |
||
| 70 | * |
||
| 71 | * @return Meta |
||
| 72 | * @throws Exception |
||
| 73 | */ |
||
| 74 | 2 | public function addProperty(string $name, string $content): Meta |
|
| 79 | } |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @return string |
||
| 83 | */ |
||
| 84 | 2 | protected function getTag(): string |
|
| 87 | } |
||
| 88 | |||
| 89 | /** |
||
| 90 | * @param string $element |
||
| 91 | * @param string $value |
||
| 92 | * @param string $content |
||
| 93 | * |
||
| 94 | * @return Meta |
||
| 95 | * @throws Exception |
||
| 96 | */ |
||
| 97 | 2 | private function addElement( |
|
| 108 | } |
||
| 109 | } |
||
| 110 |