Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
| Keyword | |
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
2.50 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| toCss | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Phpdftk\Css\Value; |
| 6 | |
| 7 | /** |
| 8 | * A CSS identifier used as a value — `auto`, `none`, `inherit`, `block`, |
| 9 | * etc. Always lower-cased: CSS identifiers are case-insensitive, the value |
| 10 | * parser normalises them at intake. |
| 11 | */ |
| 12 | final readonly class Keyword extends Value |
| 13 | { |
| 14 | public function __construct(public string $name) {} |
| 15 | |
| 16 | public function toCss(): string |
| 17 | { |
| 18 | return $this->name; |
| 19 | } |
| 20 | } |