Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
ListBlock
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Phpdftk\Pdf\Writer;
6
7/**
8 * Bullet or numbered list of plain strings. Each item is rendered as
9 * one marker (bullet glyph or running number) followed by the wrapped
10 * item text.
11 *
12 * Nested lists are a planned future extension; for now, build flat
13 * lists and call `Pdf::addList()` multiple times for hand-rolled
14 * hierarchy.
15 *
16 * Named `ListBlock` (not `List`) to avoid colliding with PHP's reserved
17 * `list` keyword.
18 */
19final class ListBlock
20{
21    /**
22     * @param list<string> $items
23     */
24    public function __construct(
25        public readonly array $items,
26        public readonly bool $numbered = false,
27    ) {}
28}