WP_CLI

DocParser::remove_decorations()private staticWP-CLI 1.0

Remove unused cruft from PHPdoc comment.

Метод класса: DocParser{}

Хуков нет.

Возвращает

Строку.

Использование

$result = DocParser::remove_decorations( $comment );
$comment(строка) (обязательный)
PHPdoc comment.

Код DocParser::remove_decorations() WP-CLI 2.8.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;
}