public getInterfaceUsageByClass ( $className ) : SensioLabs\DeprecationDetector\FileInfo\Usage\InterfaceUsage[] | ||
$className | ||
Résultat | SensioLabs\DeprecationDetector\FileInfo\Usage\InterfaceUsage[] |
/** * @param PhpFileInfo $phpFileInfo * @param $name * * @return UsageInterface[] */ public function getClassAncestors(PhpFileInfo $phpFileInfo, $name) { $ancestors = array(); $interfaces = $phpFileInfo->getInterfaceUsageByClass($name); foreach ($interfaces as $interface) { $ancestors = array_merge($ancestors, $this->resolveInterfaceAncestors($interface->name())); } $superType = $phpFileInfo->getSuperTypeUsageByClass($name); if (null !== $superType) { $ancestors = array_merge($ancestors, $this->resolveClassAncestors($superType->name())); } return $ancestors; }