diff --git a/src/Node/ModuleNode.php b/src/Node/ModuleNode.php index b57e643e852..d2fb216b1e2 100644 --- a/src/Node/ModuleNode.php +++ b/src/Node/ModuleNode.php @@ -418,14 +418,6 @@ protected function compileIsTraitable(Compiler $compiler) continue; } - if ($node instanceof TextNode && ctype_space($node->getAttribute('data'))) { - continue; - } - - if ($node instanceof BlockReferenceNode) { - continue; - } - $traitable = false; break; } @@ -494,19 +486,4 @@ protected function compileLoadTemplate(Compiler $compiler, $node, $var) throw new \LogicException('Trait templates can only be constant nodes.'); } } - - private function hasNodeOutputNodes(Node $node): bool - { - if ($node instanceof NodeOutputInterface) { - return true; - } - - foreach ($node as $child) { - if ($this->hasNodeOutputNodes($child)) { - return true; - } - } - - return false; - } }