src/Leevel/Validate/Assert.php
protected static function normalizeMessage(array $args, ?string $message = null): string
    {
        if (count($args) >= 2 && is_string($args[array_key_last($args)])) {
            $message = array_pop($args);
        } else {
            $message = $message ?? 'No exception messsage specified.';
        }

        return $message;
    }
protected static function normalizeMessage(array $args, ?string $message = null): string
    {
        if (count($args) >= 2 && is_string($args[array_key_last($args)])) {
            $message = array_pop($args);
        } else {
            $message = $message ?? 'No exception messsage specified.';
        }

        return $message;
    }
参数校验和消息整理.

@param array       $args
@param null|string $message

@return string