mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-13 23:35:49 +00:00
Fxi some errors reported by phpstan
This commit is contained in:
@@ -381,7 +381,7 @@ final class ModuleNode extends Node
|
||||
$traitable = !$this->hasNode('parent') && 0 === \count($this->getNode('macros'));
|
||||
if ($traitable) {
|
||||
if ($this->getNode('body') instanceof BodyNode) {
|
||||
$nodes = $this->getNode('body')->getNode(0);
|
||||
$nodes = $this->getNode('body')->getNode('0');
|
||||
} else {
|
||||
$nodes = $this->getNode('body');
|
||||
}
|
||||
@@ -418,7 +418,7 @@ final class ModuleNode extends Node
|
||||
->write(" */\n")
|
||||
->write("public function isTraitable()\n", "{\n")
|
||||
->indent()
|
||||
->write(sprintf("return %s;\n", $traitable ? 'true' : 'false'))
|
||||
->write("return false;\n")
|
||||
->outdent()
|
||||
->write("}\n\n")
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user