Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| TextBox | |
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\Box; |
| 6 | |
| 7 | use Phpdftk\Css\Cascade\CascadedValues; |
| 8 | use Phpdftk\Html\Dom\Element; |
| 9 | |
| 10 | /** |
| 11 | * Leaf box wrapping a text node. The originating DOM element is the |
| 12 | * inline parent the text was a child of (text nodes themselves don't |
| 13 | * have associated CSS rules); `$text` is the raw character data. |
| 14 | * |
| 15 | * White-space collapsing and bidi reorder happen during layout, not box |
| 16 | * generation — `$text` keeps the source bytes verbatim. |
| 17 | */ |
| 18 | final class TextBox extends Box |
| 19 | { |
| 20 | public function __construct( |
| 21 | ?Element $element, |
| 22 | CascadedValues $style, |
| 23 | public readonly string $text, |
| 24 | ) { |
| 25 | parent::__construct($element, $style); |
| 26 | } |
| 27 | } |