Problem/Motivation

In the core/includes/form.inc, @return doc block is wrongly added to a function returning nothing.

Proposed resolution

Remove the @return doc

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rakesh.gectcr created an issue. See original summary.

rakesh.gectcr’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
465 bytes
David Hernández’s picture

Assigned: rakesh.gectcr » Unassigned
Status: Needs review » Reviewed & tested by the community

Confirmed. The function doesn't return anything.

jhodgdon’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/includes/form.inc
@@ -888,9 +888,6 @@ function &batch_get() {
- * @return
- *   The name and class of the queue are added by reference to the batch set.

True, it shouldn't be a @return. But ... we seem to be losing some information that should still be in the documentation somewhere?

gaydabura’s picture

Status: Needs work » Needs review
FileSize
723 bytes
andypost’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, when batch passed by reference there's no other way to update its set

jhodgdon’s picture

Title: Removing wrongly added @param in core/includes/form.inc » Removing wrongly added @return in core/includes/form.inc
Version: 8.1.x-dev » 8.0.x-dev
Issue summary: View changes
Status: Reviewed & tested by the community » Needs work
Issue tags: -Documentation

Thanks for the patch! It needs a little fix though:

+++ b/core/includes/form.inc
@@ -887,14 +887,12 @@ function &batch_get() {
  * be used.
+ * The name and class of the queue are added by reference to the batch set.

If this is meant to be two paragraphs, you need to leave a blank line between them.

If it is meant to be one paragraph, you need to rewrap so that each docs line is as close to 80 characters as possible without going over.

Also moving this to 8.0.x to indicate it should be committed to both 8.0 and 8.1 branches. And fixing the title/summary since this is about a wrong @return, not @param.

gaydabura’s picture

Version: 8.0.x-dev » 8.1.x-dev
FileSize
740 bytes

thnx @jhodgdon
new patch is attached

gaydabura’s picture

Version: 8.1.x-dev » 8.0.x-dev
Devaraj johnson’s picture

Status: Needs work » Needs review
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Good enough, thanks!

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.1.x and cherry-picked to 8.0.x. Thanks!

  • catch committed 52edb40 on 8.1.x
    Issue #2659524 by gaydabura, rakesh.gectcr: Removing wrongly added @...

  • catch committed a8aa348 on 8.0.x
    Issue #2659524 by gaydabura, rakesh.gectcr: Removing wrongly added @...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.