From c0b156a8fa553918f376d2912c83dee26e388325 Mon Sep 17 00:00:00 2001
From: quietone <quietone@2572884.no-reply.drupal.org>
Date: Sat, 22 Mar 2025 22:20:56 +1300
Subject: [PATCH] enable FunctionComment.MissingReturnComment

---
 core/modules/layout_builder/src/Element/LayoutBuilder.php | 3 +++
 core/phpcs.xml.dist                                       | 7 +------
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/core/modules/layout_builder/src/Element/LayoutBuilder.php b/core/modules/layout_builder/src/Element/LayoutBuilder.php
index e17e36ab4fb9..d673d24d1d38 100644
--- a/core/modules/layout_builder/src/Element/LayoutBuilder.php
+++ b/core/modules/layout_builder/src/Element/LayoutBuilder.php
@@ -123,6 +123,8 @@ public static function layoutBuilderElementGetKeys(array $element, FormStateInte
    *   The rendered form.
    *
    * @return array
+   *   Renders the layout builder element, if it exists, and adds it to the
+   *   form.
    *
    * @see ::addRenderedLayoutBuilder()
    */
@@ -150,6 +152,7 @@ public static function renderLayoutBuilderAfterForm(array $form): array {
    *   The form render array.
    *
    * @return string
+   *   The render string with any layout builder markup added.
    */
   #[TrustedCallback]
   public static function addRenderedLayoutBuilder(string $html, array $form): string {
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index 50039ecc1717..9ba0e72cc942 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -73,12 +73,7 @@
     <include-pattern>*/Unit/*</include-pattern>
   </rule>
   <rule ref="Drupal.Commenting.FunctionComment.MissingParamType"/>
-  <rule ref="Drupal.Commenting.FunctionComment.MissingReturnComment">
-    <include-pattern>core/lib/Drupal/Core/*</include-pattern>
-    <include-pattern>core/lib/Drupal/Component/*</include-pattern>
-    <include-pattern>core/tests/*</include-pattern>
-    <include-pattern>core/*/tests/*</include-pattern>
-  </rule>
+  <rule ref="Drupal.Commenting.FunctionComment.MissingReturnComment"/>
   <rule ref="Drupal.Commenting.GenderNeutralComment"/>
   <rule ref="Drupal.Commenting.HookComment"/>
   <rule ref="Drupal.Commenting.InlineComment">
-- 
GitLab