src/Contract/Fetcher/Parent/InvariantFetcher.php
public function getConditions(ReflectionClass $class): array
    {
        $annotations   = [];
        $parents = [];

        $this->getParentClasses($class, $parents);
        $this->getInterfaces($class, $parents);

        foreach ($parents as $parent) {
            $annotations[] = $this->annotationReader->getClassAnnotations($parent);
        }

        if (\count($annotations)) {
            $annotations = \array_merge(...$annotations);
        }

        return $this->filterContractAnnotation($annotations);
    }
public function getConditions(ReflectionClass $class): array
    {
        $annotations   = [];
        $parents = [];

        $this->getParentClasses($class, $parents);
        $this->getInterfaces($class, $parents);

        foreach ($parents as $parent) {
            $annotations[] = $this->annotationReader->getClassAnnotations($parent);
        }

        if (\count($annotations)) {
            $annotations = \array_merge(...$annotations);
        }

        return $this->filterContractAnnotation($annotations);
    }
public function getConditions ( ReflectionClass $ class ) : array { $ annotations = [ ] ; $ parents = [ ] ; $ this -> getParentClasses ( $ class , $ parents ) ; $ this -> getInterfaces ( $ class , $ parents ) ; foreach ( $ parents as $ parent ) { $ annotations [ ] = $ this -> annotationReader -> getClassAnnotations ( $ parent ) ; } if ( \ count ( $ annotations ) ) { $ annotations = \ array_merge ( ... $ annotations ) ; } return $ this -> filterContractAnnotation ( $ annotations ) ; }
Fetches conditions from all parent classes recursively

@param ReflectionClass $class

@return array
Fetches conditions from all parent classes recursively