Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
5 / 5 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| UnorderedList | |
100.00% |
5 / 5 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| item | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Epic64\Elem\Elements; |
| 6 | |
| 7 | use Epic64\Elem\Element; |
| 8 | |
| 9 | class UnorderedList extends Element |
| 10 | { |
| 11 | public function __construct() |
| 12 | { |
| 13 | parent::__construct('ul'); |
| 14 | } |
| 15 | |
| 16 | public function item(string|Element $content): static |
| 17 | { |
| 18 | $li = new ListItem(); |
| 19 | $li($content); |
| 20 | $this($li); |
| 21 | return $this; |
| 22 | } |
| 23 | } |