src/CallableArgsResolver.php
static function makeReflectFromCallable(callable $callable)
    {
        if ( $callable instanceof ipInvokableCallback )
            $callable = $callable->getCallable();

        if ( is_array($callable) )
            // [className_orObject, 'method_name']
            $reflection = new \ReflectionMethod($callable[0], $callable[1]);

        if ( is_string($callable) ) {
            if ( strpos($callable, '::') )
                // 'classname::method'
                $reflection = new \ReflectionMethod($callable);
            else
                // 'function_name'
                $reflection = new \ReflectionFunction($callable);
        }

        if ( method_exists($callable, '__invoke') ) {
            // Closure and Invokable
            if ($callable instanceof \Closure)
                $reflection = new \ReflectionFunction($callable);
            else
                $reflection = new \ReflectionMethod($callable, '__invoke');
        }

        if (! isset($reflection) )
            throw new \ReflectionException;

        return $reflection;
    }
static function makeReflectFromCallable(callable $callable)
    {
        if ( $callable instanceof ipInvokableCallback )
            $callable = $callable->getCallable();

        if ( is_array($callable) )
            // [className_orObject, 'method_name']
            $reflection = new \ReflectionMethod($callable[0], $callable[1]);

        if ( is_string($callable) ) {
            if ( strpos($callable, '::') )
                // 'classname::method'
                $reflection = new \ReflectionMethod($callable);
            else
                // 'function_name'
                $reflection = new \ReflectionFunction($callable);
        }

        if ( method_exists($callable, '__invoke') ) {
            // Closure and Invokable
            if ($callable instanceof \Closure)
                $reflection = new \ReflectionFunction($callable);
            else
                $reflection = new \ReflectionMethod($callable, '__invoke');
        }

        if (! isset($reflection) )
            throw new \ReflectionException;

        return $reflection;
    }
static function makeReflectFromCallable ( callable $ callable ) { if ( $ callable instanceof ipInvokableCallback ) $ callable = $ callable -> getCallable ( ) ; if ( is_array ( $ callable ) ) // [className_orObject, 'method_name'] $ reflection = new \ ReflectionMethod ( $ callable [ 0 ] , $ callable [ 1 ] ) ; if ( is_string ( $ callable ) ) { if ( strpos ( $ callable , '::' ) ) // 'classname::method' $ reflection = new \ ReflectionMethod ( $ callable ) ; else // 'function_name' $ reflection = new \ ReflectionFunction ( $ callable ) ; } if ( method_exists ( $ callable , '__invoke' ) ) { // Closure and Invokable if ( $ callable instanceof \ Closure ) $ reflection = new \ ReflectionFunction ( $ callable ) ; else $ reflection = new \ ReflectionMethod ( $ callable , '__invoke' ) ; } if ( ! isset ( $ reflection ) ) throw new \ ReflectionException ; return $ reflection ; }
Factory Reflection From Given Callable

$function
'function_name' | \closure
'classname::method'
[className_orObject, 'method_name']

@param $callable

@throws \ReflectionException
@return \ReflectionFunction|\ReflectionMethod
Factory Reflection From Given Callable