/**
  * {@inheritdoc}
  */
 public function check(PhpFileInfo $phpFileInfo, RuleSet $ruleSet)
 {
     $violations = array();
     foreach ($phpFileInfo->getFunctionUsages() as $functionUsage) {
         if ($ruleSet->hasFunction($functionUsage->name())) {
             $violations[] = new Violation($functionUsage, $phpFileInfo, $ruleSet->getFunction($functionUsage->name())->comment());
         }
     }
     return $violations;
 }