Skip to content
This repository has been archived by the owner on Sep 17, 2023. It is now read-only.

Commit

Permalink
Fix recursive Interface implementation logic and avoid infinite recur…
Browse files Browse the repository at this point in the history
…sion.
  • Loading branch information
SerafimArts committed Aug 19, 2018
1 parent fd300cc commit 08e051d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Definition/Behaviour/HasInterfaces.php
Expand Up @@ -38,7 +38,11 @@ public function isImplements($interface): bool
$definition = $this->fetch($interface);

foreach ($this->getInterfaces() as $impl) {
if ($impl->instanceOf($definition)) {
if ($impl->hasInterface($this->nameOf($definition))) {
return true;
}

if ($impl->isImplements($definition)) {
return true;
}
}
Expand Down

0 comments on commit 08e051d

Please sign in to comment.