From cf46b0dc1176d651095917ca638fcc9b7cf5c07a Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Mon, 8 Jul 2024 08:12:14 +0100
Subject: [PATCH] Issue #3456425 by mondrake, alexpott:
 FormStateInterface::setError*() PHPDoc are incorrect

(cherry picked from commit 82a5a7010389fb2969a42ca9143fa2c660e7790e)
---
 core/lib/Drupal/Core/Form/FormStateInterface.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/lib/Drupal/Core/Form/FormStateInterface.php b/core/lib/Drupal/Core/Form/FormStateInterface.php
index f990cdc0df88..d517666cf29b 100644
--- a/core/lib/Drupal/Core/Form/FormStateInterface.php
+++ b/core/lib/Drupal/Core/Form/FormStateInterface.php
@@ -536,7 +536,7 @@ public static function hasAnyErrors();
    *   element is ['foo', 'bar', 'baz'] then you may set an error on 'foo'
    *   or 'foo][bar][baz'. Setting an error on 'foo' sets an error for every
    *   element where the #parents array starts with 'foo'.
-   * @param string $message
+   * @param string|\Stringable $message
    *   (optional) The error message to present to the user.
    *
    * @return $this
@@ -548,7 +548,7 @@ public function setErrorByName($name, $message = '');
    *
    * @param array $element
    *   The form element.
-   * @param string $message
+   * @param string|\Stringable $message
    *   (optional) The error message to present to the user.
    *
    * @return $this
-- 
GitLab