Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@return added with no return statement in function #465

Open
aubreypwd opened this issue May 9, 2019 · 0 comments
Open

@return added with no return statement in function #465

aubreypwd opened this issue May 9, 2019 · 0 comments

Comments

@aubreypwd
Copy link

@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 <aubrey@webdevstudios.com>
	 * @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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant