Total Complexity | 4 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | class RenderedContent implements RenderedContentInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var Document |
||
22 | * |
||
23 | * @psalm-readonly |
||
24 | */ |
||
25 | private $document; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | * |
||
30 | * @psalm-readonly |
||
31 | */ |
||
32 | private $content; |
||
33 | |||
34 | public function __construct(Document $document, string $content) |
||
35 | { |
||
36 | $this->document = $document; |
||
37 | $this->content = $content; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @psalm-mutation-free |
||
42 | */ |
||
43 | public function __toString(): string |
||
44 | { |
||
45 | return $this->getContent(); |
||
46 | } |
||
47 | |||
48 | public function getContent(): string |
||
49 | { |
||
50 | return $this->content; |
||
51 | } |
||
52 | |||
53 | public function getDocument(): Document |
||
56 | } |
||
57 | } |
||
58 |