mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-13 23:35:49 +00:00
minor #3991 Fix some errors reported by phpstan (fabpot)
This PR was merged into the 3.x branch.
Discussion
----------
Fix some errors reported by phpstan
Commits
-------
2b2ac80d Fxi some errors reported by phpstan
This commit is contained in:
@@ -396,7 +396,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');
|
||||
}
|
||||
@@ -433,7 +433,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