Problem/Motivation

Static analysis tools disallow using WebformHandlerInterface::setHandlerId because it's typehinted incorrectly.

WebformHandlerBase:

  /**
   * The webform handler ID.
   *
   * @var string
   */
  protected $handler_id;

WebformHandlerInterface:

  /**
   * Returns the unique ID representing the webform handler.
   *
   * @return string
   *   The webform handler ID.
   */
  public function getHandlerId();

  /**
   * Sets the id for this webform handler.
   *
   * @param int $handler_id
   *   The handler_id for this webform handler.
   *
   * @return $this
   */
  public function setHandlerId($handler_id);

Issue fork webform-3592693

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jvollebregt-swis created an issue. See original summary.

jvollebregt-swis’s picture

Assigned: jvollebregt-swis » Unassigned
Status: Active » Needs review
makertimswis’s picture

Status: Needs review » Reviewed & tested by the community

Yes! Can remove my @phpstan-ignore argument.type with this.

liam morland’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

liam morland’s picture

Title: setHandlerId docblock has incorrect type hint » Fix docblock typehint on WebformHandlerInterface::setHandlerId()

Status: Fixed » Closed (fixed)

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