| Total Complexity | 10 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class Element |
||
| 6 | { |
||
| 7 | const VOID_ELEMENTS = [ |
||
| 8 | 'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', |
||
| 9 | 'link', 'meta', 'param', 'source', 'track', 'wbr' |
||
| 10 | ]; |
||
| 11 | |||
| 12 | protected $tagName = ''; |
||
| 13 | protected $attributeList = []; |
||
| 14 | protected $classList = []; |
||
| 15 | protected $innerContent = ''; |
||
| 16 | |||
| 17 | public function isVoid() |
||
| 18 | { |
||
| 19 | return in_array($this->tagName, self::VOID_ELEMENTS); |
||
| 20 | } |
||
| 21 | |||
| 22 | public function __construct($tagName, $innerContent = null, $attributeList = []) |
||
| 27 | } |
||
| 28 | |||
| 29 | private function formatAttributes() |
||
| 40 | } |
||
| 41 | |||
| 42 | public function __toString() |
||
| 60 | } |
||
| 61 | } |
||
| 62 |