Skip to content

Commit 212cbd2

Browse files
committed
BC fix
1 parent 388b627 commit 212cbd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Visitor/Php/Knp/Menu/AbstractKnpMenuVisitor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ protected function isKnpMenuBuildingMethod(Node $node): bool
9999
$returnType = $returnType->type;
100100
}
101101

102-
if (!$returnType instanceof Node\Name || !method_exists($returnType, 'toCodeString')) {
102+
if (!$returnType instanceof Node\Name) {
103103
$this->isKnpMenuBuildingMethod = false;
104104
} else {
105-
$this->isKnpMenuBuildingMethod = 'ItemInterface' === $returnType->toCodeString();
105+
$this->isKnpMenuBuildingMethod = 'ItemInterface' === $returnType->toString();
106106
}
107107
}
108108

0 commit comments

Comments
 (0)