Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
1 / 1 |
| TableCell | |
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
3 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| colspan | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| rowspan | |
100.00% |
1 / 1 |
|
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 TableCell extends Element |
| 10 | { |
| 11 | public function __construct(?string $text = null) |
| 12 | { |
| 13 | parent::__construct('td', $text); |
| 14 | } |
| 15 | |
| 16 | public function colspan(int $span): static |
| 17 | { |
| 18 | return $this->attr('colspan', (string)$span); |
| 19 | } |
| 20 | |
| 21 | public function rowspan(int $span): static |
| 22 | { |
| 23 | return $this->attr('rowspan', (string)$span); |
| 24 | } |
| 25 | } |