sublime-jsdocs icon indicating copy to clipboard operation
sublime-jsdocs copied to clipboard

@return added with no return statement in function

Open aubreypwd opened this issue 5 years ago • 0 comments

@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)?

aubreypwd avatar May 09 '19 14:05 aubreypwd