We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7620bf4 commit 388b627Copy full SHA for 388b627
src/Visitor/Php/Knp/Menu/AbstractKnpMenuVisitor.php
@@ -99,7 +99,7 @@ protected function isKnpMenuBuildingMethod(Node $node): bool
99
$returnType = $returnType->type;
100
}
101
102
- if (!$returnType instanceof Node\Name) {
+ if (!$returnType instanceof Node\Name || !method_exists($returnType, 'toCodeString')) {
103
$this->isKnpMenuBuildingMethod = false;
104
} else {
105
$this->isKnpMenuBuildingMethod = 'ItemInterface' === $returnType->toCodeString();
0 commit comments