public methodDefinitions ( ) : SensioLabs\DeprecationDetector\FileInfo\MethodDefinition[] | ||
Résultat | SensioLabs\DeprecationDetector\FileInfo\MethodDefinition[] |
/** * {@inheritdoc} */ public function check(PhpFileInfo $phpFileInfo) { $violations = array(); foreach ($phpFileInfo->methodDefinitions() as $methodDefinition) { $ancestors = $this->ancestorResolver->getClassAncestors($phpFileInfo, $methodDefinition->parentName()); foreach ($ancestors as $ancestor) { if ($this->ruleSet->hasMethod($methodDefinition->name(), $ancestor)) { $violations[] = new Violation($methodDefinition, $phpFileInfo, $this->ruleSet->getMethod($methodDefinition->name(), $ancestor)->comment()); } } } return $violations; }