Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| FloatItem | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Phpdftk\HtmlToPdf\Layout; |
| 6 | |
| 7 | /** |
| 8 | * One active float inside a {@see FloatContext}. Stored as a value |
| 9 | * object so {@see FloatContext} stays free of mutation accidents. |
| 10 | */ |
| 11 | final readonly class FloatItem |
| 12 | { |
| 13 | public function __construct( |
| 14 | /** `'left'` or `'right'` per CSS 2.1 ยง9.5. */ |
| 15 | public string $side, |
| 16 | public float $left, |
| 17 | public float $top, |
| 18 | public float $width, |
| 19 | public float $height, |
| 20 | ) {} |
| 21 | } |