Total Complexity | 6 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | class RemoveNullNode implements ModifierInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var PreOrder|TraverserInterface |
||
25 | */ |
||
26 | private $traverser; |
||
27 | |||
28 | /** |
||
29 | * RemoveNullNode constructor. |
||
30 | */ |
||
31 | 10 | public function __construct(?TraverserInterface $traverser = null) |
|
32 | { |
||
33 | 10 | $this->traverser = $traverser ?? new PostOrder(); |
|
34 | 10 | } |
|
35 | |||
36 | 7 | public function modify(NodeInterface $tree): NodeInterface |
|
56 | } |
||
57 | } |
||
58 |