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
LineBreakOpportunity
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\Text;
6
7/**
8 * One enumerated line-break position in a source string. Offsets are byte
9 * offsets into the original UTF-8 string (matching the rest of phpdftk's
10 * byte-offset convention), making it cheap for callers to slice the
11 * original input without re-encoding.
12 *
13 * `kind` reports whether ICU classified the break as mandatory (a
14 * line-terminator character) or merely allowed (whitespace, hyphen, etc.).
15 */
16final readonly class LineBreakOpportunity
17{
18    public function __construct(
19        public int $offset,
20        public LineBreakKind $kind,
21    ) {}
22}