src/Viserio/Component/Container/ContainerResolver.php
public function getReflector($subject)
    {
        if ($this->isClass($subject)) {
            return new ReflectionClass($subject);
        }

        if ($this->isMethod($subject)) {
            return $this->getMethodReflector($subject);
        }

        if ($this->isFunction($subject)) {
            return new ReflectionFunction($subject);
        }

        return null;
    }
public function getReflector($subject)
    {
        if ($this->isClass($subject)) {
            return new ReflectionClass($subject);
        }

        if ($this->isMethod($subject)) {
            return $this->getMethodReflector($subject);
        }

        if ($this->isFunction($subject)) {
            return new ReflectionFunction($subject);
        }

        return null;
    }
@codeCoverageIgnore

Get the reflection object for something.

@param mixed $subject

@throws \ReflectionException

@return null|\ReflectionClass|\ReflectionFunction|\ReflectionMethod