Total Complexity | 4 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class HardBreakNode extends Node implements InlineNodeInterface |
||
13 | { |
||
14 | /** @var TextNode */ |
||
15 | protected $textNode; |
||
16 | |||
17 | /** |
||
18 | * HardBreakNode constructor. |
||
19 | * |
||
20 | * This is just a hard break, it doesn't have attributes or context |
||
21 | * |
||
22 | * @param $data |
||
23 | * @param Node $parent |
||
24 | * @param Node|null $previous |
||
25 | */ |
||
26 | public function __construct($data, Node $parent, Node $previous = null) |
||
27 | { |
||
28 | // every inline node needs a TextNode to track marks |
||
29 | $this->textNode = new TextNode(['marks' => $data['marks'] ?? null], $parent, $previous); |
||
30 | } |
||
31 | |||
32 | public function toSyntax() |
||
33 | { |
||
34 | return '\\\\ '; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param string $markType |
||
39 | */ |
||
40 | public function increaseMark($markType) |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @param string $markType |
||
47 | * @return int|null |
||
48 | * @throws \Exception |
||
49 | */ |
||
50 | public function getStartingNodeMarkScore($markType) |
||
53 | } |
||
54 | } |
||
55 |