protected function addVariadicArgument(Method $data, MethodDescriptor $methodDescriptor): void
    {
        if (!$data->getDocBlock()) {
            return;
        }

        $paramTags = $data->getDocBlock()->getTagsByName('param');

        /** @var Param $lastParamTag */
        $lastParamTag = end($paramTags);
        if (!$lastParamTag) {
            return;
        }

        if ($lastParamTag->isVariadic()
            && array_key_exists($lastParamTag->getVariableName(), $methodDescriptor->getArguments()->getAll())
        ) {
            $types = $lastParamTag->getType();

            $argument = new ArgumentDescriptor();
            $argument->setName($lastParamTag->getVariableName());
            $argument->setType($types);
            $argument->setDescription($lastParamTag->getDescription());
            $argument->setLine($methodDescriptor->getLine());
            $argument->setVariadic(true);

            $methodDescriptor->getArguments()->set($argument->getName(), $argument);
        }
    }