sublime-jsdocs
sublime-jsdocs copied to clipboard
@return added with no return statement in function
@return
is being added to functions that don't have a return
e.g. void. We practice not documenting @return
unless it actually returns something:
/**
* [sanitize_frontend_value description]
*
* @author Aubrey Portwood <[email protected]>
* @since NEXT
*
* @return [type] [description]
*/
public function sanitize_frontend_value() {
wp_send_json_success( $this->sanitize( filter_input( INPUT_POST, 'to' ) ) );
}
I often have to delete the two lines (the @return
and the one above it) on these, which makes for more work. Is there a way to configure jsdoc to not add a @return
unless it returns something (PHP)?