| Total Complexity | 6 |
| Total Lines | 90 |
| 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 | */ |
||
| 28 | 1 | public function add(array $attributes = []): Meta |
|
| 29 | { |
||
| 30 | 1 | $this->store[] = [ |
|
| 31 | 1 | "renderTag", |
|
| 32 | [ |
||
| 33 | 1 | $this->getTag(), |
|
| 34 | 1 | $attributes, |
|
| 35 | ], |
||
| 36 | 1 | $this->indent(), |
|
| 37 | ]; |
||
| 38 | |||
| 39 | 1 | return $this; |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param string $httpEquiv |
||
| 44 | * @param string $content |
||
| 45 | * |
||
| 46 | * @return Meta |
||
| 47 | * @throws Exception |
||
| 48 | */ |
||
| 49 | 1 | public function addHttp(string $httpEquiv, string $content): Meta |
|
| 50 | { |
||
| 51 | 1 | return $this->addElement('http-equiv', $httpEquiv, $content); |
|
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @param string $name |
||
| 56 | * @param string $content |
||
| 57 | * |
||
| 58 | * @return Meta |
||
| 59 | * @throws Exception |
||
| 60 | */ |
||
| 61 | 1 | public function addName(string $name, string $content): Meta |
|
| 62 | { |
||
| 63 | 1 | $this->addElement('name', $name, $content); |
|
| 64 | |||
| 65 | 1 | return $this; |
|
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @param string $name |
||
| 70 | * @param string $content |
||
| 71 | * |
||
| 72 | * @return Meta |
||
| 73 | * @throws Exception |
||
| 74 | */ |
||
| 75 | 1 | public function addProperty(string $name, string $content): Meta |
|
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @return string |
||
| 84 | */ |
||
| 85 | 1 | protected function getTag(): string |
|
| 88 | } |
||
| 89 | |||
| 90 | /** |
||
| 91 | * @param string $element |
||
| 92 | * @param string $value |
||
| 93 | * @param string $content |
||
| 94 | * |
||
| 95 | * @return Meta |
||
| 96 | * @throws Exception |
||
| 97 | */ |
||
| 98 | 1 | private function addElement( |
|
| 109 | } |
||
| 110 | } |
||
| 111 |