1 | <?php |
||
18 | final class MarkdownInput implements MarkdownInputInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var iterable<int, string>|null |
||
22 | * |
||
23 | * @psalm-readonly-allow-private-mutation |
||
24 | */ |
||
25 | private $lines; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | * |
||
30 | * @psalm-readonly-allow-private-mutation |
||
31 | */ |
||
32 | private $content; |
||
33 | |||
34 | /** |
||
35 | * @var int|null |
||
36 | * |
||
37 | * @psalm-readonly-allow-private-mutation |
||
38 | */ |
||
39 | private $lineCount; |
||
40 | |||
41 | 2517 | public function __construct(string $content) |
|
49 | |||
50 | 3 | public function getContent(): string |
|
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | 2499 | public function getLines(): iterable |
|
67 | |||
68 | 3 | public function getLineCount(): int |
|
76 | |||
77 | 2502 | private function splitLinesIfNeeded(): void |
|
99 | } |
||
100 |