Library/FunctionLike/ReturnType/Collection.php
public function getTypesBySpecification(SpecificationInterface $spec)
    {
        $types = [];

        foreach ($this as $type) {
            /** @var TypeInterface $type */
            if ($spec->isSatisfiedBy($type)) {
                $types[] = $type;
            }
        }

        return $types;
    }
public function getTypesBySpecification(SpecificationInterface $spec)
    {
        $types = [];

        foreach ($this as $type) {
            /** @var TypeInterface $type */
            if ($spec->isSatisfiedBy($type)) {
                $types[] = $type;
            }
        }

        return $types;
    }
public function getTypesBySpecification ( SpecificationInterface $ spec ) { $ types = [ ] ; foreach ( $ this as $ type ) { /** @var TypeInterface $type */ if ( $ spec -> isSatisfiedBy ( $ type ) ) { $ types [ ] = $ type ; } } return $ types ; }
Gets all return types satisfied by specification.

@param SpecificationInterface $spec

@return TypeInterface[]
Gets all return types satisfied by specification .