protected function getCallableParameters(callable $callable)/*# : array */
    {
        // array type
        if (is_array($callable)) {
            $reflector = new \ReflectionClass($callable[0]);
            $method = $reflector->getMethod($callable[1]);

        // object with __invoke() defined
        } elseif ($this->isInvocable($callable)) {
            $reflector = new \ReflectionClass($callable);
            $method = $reflector->getMethod('__invoke');

        // simple function
        } else {
            $method = new \ReflectionFunction($callable);
        }

        return $method->getParameters();
    }
protected function getCallableParameters(callable $callable)/*# : array */
    {
        // array type
        if (is_array($callable)) {
            $reflector = new \ReflectionClass($callable[0]);
            $method = $reflector->getMethod($callable[1]);

        // object with __invoke() defined
        } elseif ($this->isInvocable($callable)) {
            $reflector = new \ReflectionClass($callable);
            $method = $reflector->getMethod('__invoke');

        // simple function
        } else {
            $method = new \ReflectionFunction($callable);
        }

        return $method->getParameters();
    }
protected function getCallableParameters ( callable $ callable ) /*# : array */ { // array type if ( is_array ( $ callable ) ) { $ reflector = new \ ReflectionClass ( $ callable [ 0 ] ) ; $ method = $ reflector -> getMethod ( $ callable [ 1 ] ) ; // object with __invoke() defined } elseif ( $ this -> isInvocable ( $ callable ) ) { $ reflector = new \ ReflectionClass ( $ callable ) ; $ method = $ reflector -> getMethod ( '__invoke' ) ; // simple function } else { $ method = new \ ReflectionFunction ( $ callable ) ; } return $ method -> getParameters ( ) ; }
Get callable parameters

@param  callable $callable
@return \ReflectionParameter[]
@throws LogicException if something goes wrong
@access protected
Get callable parameters