Skip to content

@return added with no return statement in function #465

Open
@aubreypwd

Description

@aubreypwd

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions