WP_CLI

DocParser::remove_decorations()private staticWP-CLI 1.0

Remove unused cruft from PHPdoc comment.

Method of the class: DocParser{}

No Hooks.

Return

String.

Usage

$result = DocParser::remove_decorations( $comment );
$comment(string) (required)
PHPdoc comment.

DocParser::remove_decorations() code 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;
}