/**
* {@inheritdoc}
*/
public function check(PhpFileInfo $phpFileInfo)
{
$violations = array();
foreach ($phpFileInfo->superTypeUsages() as $superTypeUsage) {
if ($this->ruleSet->hasClass($superTypeUsage->name())) {
$violations[] = new Violation($superTypeUsage, $phpFileInfo, $this->ruleSet->getClass($superTypeUsage->name())->comment());
}
}
return $violations;
}