src/Leevel/Di/Container.php
protected function parseReflection($injection): array
    {
        switch (true) {
            case $injection instanceof Closure:
                return $this->parseClosureReflection($injection);
            case !is_string($injection) && is_callable($injection):
                return $this->parseMethodReflection($injection);
            case is_string($injection):
                return $this->parseClassReflection($injection);
            default:
                throw new InvalidArgumentException('Unsupported callback types.');
        }
    }
protected function parseReflection($injection): array
    {
        switch (true) {
            case $injection instanceof Closure:
                return $this->parseClosureReflection($injection);
            case !is_string($injection) && is_callable($injection):
                return $this->parseMethodReflection($injection);
            case is_string($injection):
                return $this->parseClassReflection($injection);
            default:
                throw new InvalidArgumentException('Unsupported callback types.');
        }
    }
不同的类型不同的反射.

@param mixed $injection

@return array