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