protected function invokeMethod($object, $method, array $args = [])
    {

        if (! $method || ! is_string($method) || '' === $method) {
            throw new InvalidArgumentException(_('Missing valid method to invoke.'));
        }

        try {
            $reflection        = new ReflectionMethod(get_class($object), $method);
            $ordered_arguments = Helper::parseParams(
                $reflection->getParameters(),
                $args
            );

            return $reflection->invokeArgs($object, $ordered_arguments);
        } catch (Exception $exception) {
            throw new InvalidArgumentException(
                sprintf(
                    _('Failed to invoke method "%1$s" of class "%2$s". Reason: %3$s'),
                    $method,
                    get_class($object),
                    $exception->getMessage()
                )
            );
        }
    }