public static function mergeCallable(callable $transformer, array $params, string $method = 'transform'): array
    {
        if (TransformerHelper::isClosure($transformer)) {
            return static::mergeClosure($transformer, $params);
        }

        return self::mergeParameters(
            new \ReflectionMethod($transformer, $method),
            $params
        );
    }
public static function mergeCallable(callable $transformer, array $params, string $method = 'transform'): array
    {
        if (TransformerHelper::isClosure($transformer)) {
            return static::mergeClosure($transformer, $params);
        }

        return self::mergeParameters(
            new \ReflectionMethod($transformer, $method),
            $params
        );
    }
public static function mergeCallable ( callable $ transformer , array $ params , string $ method = 'transform' ) : array { if ( TransformerHelper :: isClosure ( $ transformer ) ) { return static :: mergeClosure ( $ transformer , $ params ) ; } return self :: mergeParameters ( new \ ReflectionMethod ( $ transformer , $ method ) , $ params ) ; }
Merges an indexed array of arguments values with their name.  Note, the orders MUST match.

@param callable $transformer
@param array $params
@param string $method
@return array
@throws \ReflectionException
Merges an indexed array of arguments values with their name . Note the orders MUST match .