private function get_arg_or_param_args($regex)
{
$bits = explode(PHP_EOL, $this->docComment);
$within_arg = $within_doc = false;
$document = array();
foreach ($bits as $bit) {
if (preg_match($regex, $bit)) {
$within_arg = true;
}
if ($within_arg && $within_doc && '---' === $bit) {
$within_doc = false;
}
if ($within_arg && !$within_doc && '---' === $bit) {
$within_doc = true;
}
if ($within_doc) {
$document[] = $bit;
}
if ($within_arg && '' === $bit) {
$within_arg = false;
break;
}
}
if ($document) {
return Spyc::YAMLLoadString(implode(PHP_EOL, $document));
}
return null;
}