WP_CLI
DocParser::remove_decorations
Remove unused cruft from PHPdoc comment.
Method of the class: DocParser{}
No Hooks.
Returns
String.
Usage
$result = DocParser::remove_decorations( $comment );
- $comment(string) (required)
- PHPdoc comment.
DocParser::remove_decorations() DocParser::remove decorations code 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;
}