Checks that this user type is a subtype of the given $type
instance.
abstract public isSubtypeOf ( |
||
$type | ||
return | boolean |
/** * Calculates the coupling between the given types. * * @param \PDepend\Source\AST\AbstractASTType $declaringType * @param \PDepend\Source\AST\AbstractASTType $coupledType * @return void * @since 0.10.2 */ private function calculateCoupling(AbstractASTType $declaringType, AbstractASTType $coupledType = null) { $this->initDependencyMap($declaringType); if (null === $coupledType) { return; } if ($coupledType->isSubtypeOf($declaringType) || $declaringType->isSubtypeOf($coupledType)) { return; } $this->initDependencyMap($coupledType); $this->dependencyMap[$declaringType->getId()]['ce'][$coupledType->getId()] = true; $this->dependencyMap[$coupledType->getId()]['ca'][$declaringType->getId()] = true; }