WP_CLI
DocParser::remove_decorations
Remove unused cruft from PHPdoc comment.
Метод класса: DocParser{}
Хуков нет.
Возвращает
Строку.
Использование
$result = DocParser::remove_decorations( $comment );
- $comment(строка) (обязательный)
- PHPdoc comment.
Код DocParser::remove_decorations() DocParser::remove decorations WP-CLI 2.13.0-alpha
private static function remove_decorations( $comment ) {
$comment = preg_replace( '|^/\*\*[\r\n]+|', '', $comment );
$comment = preg_replace( '|\n[\t ]*\*/$|', '', $comment );
$comment = preg_replace( '|^[\t ]*\* ?|m', '', $comment );
return $comment;
}