src/PeekAndPoke/Aviator/ServiceContainer/DomainModel/DiOptionsCollection.php
public static function from(Reader $reader, \Reflector $reflector)
    {
        if ($reflector instanceof \ReflectionClass) {
            return new static(
                Psi::it($reader->getClassAnnotations($reflector))->toArray()
            );
        }

        if ($reflector instanceof \ReflectionMethod) {
            return new static(
                Psi::it($reader->getMethodAnnotations($reflector))->toArray()
            );
        }

        return new static();
    }
public static function from(Reader $reader, \Reflector $reflector)
    {
        if ($reflector instanceof \ReflectionClass) {
            return new static(
                Psi::it($reader->getClassAnnotations($reflector))->toArray()
            );
        }

        if ($reflector instanceof \ReflectionMethod) {
            return new static(
                Psi::it($reader->getMethodAnnotations($reflector))->toArray()
            );
        }

        return new static();
    }
Constructs the collection by reading all instances of DiAnnotation from the reflector

@param Reader     $reader
@param \Reflector $reflector

@return static