private function getCurrentClassImplementedInterfacesIndexedByName()
{
$node = $this->node;
if ($node instanceof ClassNode) {
return array_merge([], ...array_map(function (Node\Name $interfaceName) {
return $this->reflectClassForNamedNode($interfaceName)->getInterfacesHierarchy();
}, $node->implements));
}
// assumption: first key is the current interface
return $this->isInterface() ? array_slice($this->getInterfacesHierarchy(), 1) : [];
}