Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
9 / 9 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
1 / 1 |
| TableRow | |
100.00% |
9 / 9 |
|
100.00% |
3 / 3 |
3 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| cell | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |||
| header | |
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 TableRow extends Element |
| 10 | { |
| 11 | public function __construct() |
| 12 | { |
| 13 | parent::__construct('tr'); |
| 14 | } |
| 15 | |
| 16 | public function cell(string|Element $content): static |
| 17 | { |
| 18 | $td = new TableCell(); |
| 19 | $td($content); |
| 20 | $this($td); |
| 21 | return $this; |
| 22 | } |
| 23 | |
| 24 | public function header(string|Element $content): static |
| 25 | { |
| 26 | $th = new TableHeader(); |
| 27 | $th($content); |
| 28 | $this($th); |
| 29 | return $this; |
| 30 | } |
| 31 | } |