The docblock for WidgetBaseInterface::formElement() has "@param string $form" and "@param string $form_state" but the method signature is as follows.

public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state);

Both $form and $form_state are array's not strings.

The attached patch fixes this in the docblock and also converts two instances of "subelements" to "sub-elements" in the same docblock.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Good catch!

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again! Committed to 8.x.

  • jhodgdon committed 5b2361c on 8.x
    Issue #2308699 by eojthebrave: Fix documentation of WidgetBaseInterface...

Status: Fixed » Needs work

The last submitted patch, eojthebrave-widgetinterface-formelemen-documentation-fix.patch, failed testing.

jhodgdon’s picture

Status: Needs work » Fixed

Silly testbot. Trying to review the patch again while I was busy committing it!

Status: Fixed » Closed (fixed)

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