private function resolveInternalAnnotation($text)
{
$pattern = '~\\{@(\\w+)(?:(?:\\s+((?>(?R)|[^{}]+)*)\\})|\\})~';
return preg_replace_callback($pattern, function ($matches) {
if ($matches[1] !== 'internal') {
return $matches[0];
}
if ($this->configuration->getOption(CO::INTERNAL) && isset($matches[2])) {
return $matches[2];
}
return '';
}, $text);
}