public function getConditions(ReflectionClass $class, $methodName)
{
$annotations = [];
$parentMethods = [];
while (preg_match('/\\@inheritdoc/i', $class->getMethod($methodName)->getDocComment()) && ($class = $class->getParentClass()) && $class->hasMethod($methodName)) {
$parentMethods[] = $class->getMethod($methodName);
}
foreach ($parentMethods as $parentMethod) {
$annotations = array_merge($annotations, $this->annotationReader->getMethodAnnotations($parentMethod));
}
$contracts = $this->filterContractAnnotation($annotations);
return $contracts;
}