summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authornod_ <nod_@598310.no-reply.drupal.org>2025-03-10 16:09:59 +0100
committernod_ <nod_@598310.no-reply.drupal.org>2025-03-10 16:09:59 +0100
commit52e18ccf255c4a3c4e515c46ab9dd8c9d5a9069f (patch)
tree47eeb692f50a972fe167ad7062a041fd2247876e
parent9ef9b0f7d85f6ceb2652ff81ebed0877b624e798 (diff)
downloaddrupal-52e18ccf255c4a3c4e515c46ab9dd8c9d5a9069f.tar.gz
drupal-52e18ccf255c4a3c4e515c46ab9dd8c9d5a9069f.zip
Issue #2903027 by spokje, jofitz, quietone, savkaviktor16@gmail.com, Vidushi Mehta, mfernea, neclimdul, longwave, borisson_, paulocs, catch, xjm: Fix 'Drupal.Commenting.DocComment.ShortNotCapital' coding standard for callbacks
-rw-r--r--core/lib/Drupal/Core/Access/RouteProcessorCsrf.php4
-rw-r--r--core/lib/Drupal/Core/Form/ConfigFormBase.php4
-rw-r--r--core/lib/Drupal/Core/Render/Element/Actions.php4
-rw-r--r--core/lib/Drupal/Core/Render/Element/FormElementBase.php8
-rw-r--r--core/lib/Drupal/Core/Render/Element/Pager.php4
-rw-r--r--core/lib/Drupal/Core/Render/Element/StatusMessages.php8
-rw-r--r--core/lib/Drupal/Core/Render/Element/StatusReport.php4
-rw-r--r--core/lib/Drupal/Core/Render/Element/Table.php13
-rw-r--r--core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php4
-rw-r--r--core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php18
-rw-r--r--core/modules/big_pipe/tests/src/Unit/Render/FiberPlaceholderTest.php4
-rw-r--r--core/modules/block/src/BlockViewBuilder.php8
-rw-r--r--core/modules/block/tests/modules/block_test/src/BlockRenderAlterContent.php4
-rw-r--r--core/modules/comment/src/CommentLazyBuilders.php8
-rw-r--r--core/modules/datetime_range/src/Plugin/Field/FieldWidget/DateRangeWidgetBase.php4
-rw-r--r--core/modules/editor/tests/modules/editor_test/src/Plugin/Editor/UnicornEditor.php4
-rw-r--r--core/modules/file/src/Element/ManagedFile.php2
-rw-r--r--core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestPlaceholders.php8
-rw-r--r--core/modules/history/src/HistoryRenderCallback.php4
-rw-r--r--core/modules/node/src/NodeViewBuilder.php4
-rw-r--r--core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php4
-rw-r--r--core/modules/shortcut/src/ShortcutLazyBuilders.php4
-rw-r--r--core/modules/system/src/Element/StatusReportPage.php10
-rw-r--r--core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php4
-rw-r--r--core/modules/system/tests/modules/render_placeholder_message_test/src/RenderPlaceholderMessageTestController.php4
-rw-r--r--core/modules/toolbar/src/Controller/ToolbarController.php4
-rw-r--r--core/modules/user/src/Plugin/Block/UserLoginBlock.php4
-rw-r--r--core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php4
-rw-r--r--core/modules/views/src/Plugin/views/style/StylePluginBase.php4
-rw-r--r--core/modules/views/tests/modules/views_test_data/src/Controller/ViewsTestDataController.php4
-rw-r--r--core/modules/views_ui/admin.inc4
-rw-r--r--core/phpcs.xml.dist4
-rw-r--r--core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php20
-rw-r--r--core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php4
-rw-r--r--core/tests/Drupal/Tests/Core/Render/RendererTestBase.php8
35 files changed, 151 insertions, 56 deletions
diff --git a/core/lib/Drupal/Core/Access/RouteProcessorCsrf.php b/core/lib/Drupal/Core/Access/RouteProcessorCsrf.php
index 15baa36f4911..64bf0f2450c2 100644
--- a/core/lib/Drupal/Core/Access/RouteProcessorCsrf.php
+++ b/core/lib/Drupal/Core/Access/RouteProcessorCsrf.php
@@ -63,7 +63,9 @@ class RouteProcessorCsrf implements OutboundRouteProcessorInterface, TrustedCall
}
/**
- * #lazy_builder callback; gets a CSRF token for the given path.
+ * Render API callback: Adds a CSRF token for the given path to the markup.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @param string $path
* The path to get a CSRF token for.
diff --git a/core/lib/Drupal/Core/Form/ConfigFormBase.php b/core/lib/Drupal/Core/Form/ConfigFormBase.php
index 00381d287baa..175ddf89b452 100644
--- a/core/lib/Drupal/Core/Form/ConfigFormBase.php
+++ b/core/lib/Drupal/Core/Form/ConfigFormBase.php
@@ -120,7 +120,9 @@ abstract class ConfigFormBase extends FormBase {
}
/**
- * #after_build callback which stores a map of element names to config keys.
+ * Render API callback: Stores a map of element names to config keys.
+ *
+ * This function is assigned as a #after_build callback.
*
* This will store an array in the form state whose keys are strings in the
* form of `CONFIG_NAME:PROPERTY_PATH`, and whose values are instances of
diff --git a/core/lib/Drupal/Core/Render/Element/Actions.php b/core/lib/Drupal/Core/Render/Element/Actions.php
index d13652398941..424cc6da85e4 100644
--- a/core/lib/Drupal/Core/Render/Element/Actions.php
+++ b/core/lib/Drupal/Core/Render/Element/Actions.php
@@ -62,7 +62,9 @@ class Actions extends Container {
}
/**
- * #pre_render callback for #type 'actions'.
+ * Render API callback: Groups the elements with a #dropbutton property.
+ *
+ * This function is assigned as a #pre_render callback.
*
* This callback iterates over all child elements of the #type 'actions'
* container to look for elements with a #dropbutton property, so as to group
diff --git a/core/lib/Drupal/Core/Render/Element/FormElementBase.php b/core/lib/Drupal/Core/Render/Element/FormElementBase.php
index 65d3793110c0..581607d716af 100644
--- a/core/lib/Drupal/Core/Render/Element/FormElementBase.php
+++ b/core/lib/Drupal/Core/Render/Element/FormElementBase.php
@@ -104,7 +104,9 @@ abstract class FormElementBase extends RenderElementBase implements FormElementI
}
/**
- * #process callback for #pattern form element property.
+ * Render API callback: Handles the #pattern form element property.
+ *
+ * This function is assigned as a #process callback.
*
* @param array $element
* An associative array containing the properties and children of the
@@ -127,7 +129,9 @@ abstract class FormElementBase extends RenderElementBase implements FormElementI
}
/**
- * #element_validate callback for #pattern form element property.
+ * Render API callback: Handles the #pattern form element property..
+ *
+ * This function is assigned as a #element_validate callback.
*
* @param array $element
* An associative array containing the properties and children of the
diff --git a/core/lib/Drupal/Core/Render/Element/Pager.php b/core/lib/Drupal/Core/Render/Element/Pager.php
index 1f23a11ebcea..a31c7f2f3719 100644
--- a/core/lib/Drupal/Core/Render/Element/Pager.php
+++ b/core/lib/Drupal/Core/Render/Element/Pager.php
@@ -62,7 +62,9 @@ class Pager extends RenderElementBase {
}
/**
- * #pre_render callback to associate the appropriate cache context.
+ * Render API callback: Associates the appropriate cache context.
+ *
+ * This function is assigned as a #pre_render callback.
*
* @param array $pager
* A renderable array of #type => pager.
diff --git a/core/lib/Drupal/Core/Render/Element/StatusMessages.php b/core/lib/Drupal/Core/Render/Element/StatusMessages.php
index 23048ef3dfd5..4eecd9f42f1a 100644
--- a/core/lib/Drupal/Core/Render/Element/StatusMessages.php
+++ b/core/lib/Drupal/Core/Render/Element/StatusMessages.php
@@ -38,7 +38,9 @@ class StatusMessages extends RenderElementBase {
}
/**
- * #pre_render callback to generate a placeholder.
+ * Render API callback: Generates a placeholder.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @param array $element
* A renderable array.
@@ -69,7 +71,9 @@ class StatusMessages extends RenderElementBase {
}
/**
- * #lazy_builder callback; replaces placeholder with messages.
+ * Render API callback: Replaces placeholder with messages.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @param string|null $type
* Limit the messages returned by type. Defaults to NULL, meaning all types.
diff --git a/core/lib/Drupal/Core/Render/Element/StatusReport.php b/core/lib/Drupal/Core/Render/Element/StatusReport.php
index 185afaf14e98..41fc7d7fda11 100644
--- a/core/lib/Drupal/Core/Render/Element/StatusReport.php
+++ b/core/lib/Drupal/Core/Render/Element/StatusReport.php
@@ -29,7 +29,9 @@ class StatusReport extends RenderElementBase {
}
/**
- * #pre_render callback to group requirements.
+ * Render API callback: Groups requirements.
+ *
+ * This function is assigned as a #pre_render callback.
*/
public static function preRenderGroupRequirements($element) {
$severities = static::getSeverities();
diff --git a/core/lib/Drupal/Core/Render/Element/Table.php b/core/lib/Drupal/Core/Render/Element/Table.php
index 4d87ace04dc2..85111505e9bb 100644
--- a/core/lib/Drupal/Core/Render/Element/Table.php
+++ b/core/lib/Drupal/Core/Render/Element/Table.php
@@ -170,7 +170,9 @@ class Table extends FormElementBase {
}
/**
- * #process callback for #type 'table' to add tableselect support.
+ * Render API callback: Adds tableselect support to #type 'table'.
+ *
+ * This function is assigned as a #process callback.
*
* @param array $element
* An associative array containing the properties and children of the
@@ -297,7 +299,9 @@ class Table extends FormElementBase {
}
/**
- * #element_validate callback for #type 'table'.
+ * Render API callback: Validates the #type 'table'.
+ *
+ * This function is assigned as a #element_validate callback.
*
* @param array $element
* An associative array containing the properties and children of the
@@ -325,7 +329,9 @@ class Table extends FormElementBase {
}
/**
- * #pre_render callback to transform children of an element of #type 'table'.
+ * Render API callback: Transform children of an element of #type 'table'.
+ *
+ * This function is assigned as a #pre_render callback.
*
* This function converts sub-elements of an element of #type 'table' to be
* suitable for table.html.twig:
@@ -335,6 +341,7 @@ class Table extends FormElementBase {
* corresponding first-level table row.
*
* Simple example usage:
+ *
* @code
* $form['table'] = [
* '#type' => 'table',
diff --git a/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php b/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php
index 2d894da837eb..e9d3b0541fed 100644
--- a/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php
+++ b/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php
@@ -84,7 +84,9 @@ class BigPipeRegressionTestController implements TrustedCallbackInterface {
}
/**
- * #lazy_builder callback; builds <time> markup with current time.
+ * Render API callback: Builds <time> markup with current time.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @return array
* Render array with a <time> markup with current time and cache settings.
diff --git a/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php b/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php
index c625f7d2d23d..6d8aafc697a1 100644
--- a/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php
+++ b/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php
@@ -130,7 +130,9 @@ class BigPipeTestController implements TrustedCallbackInterface {
}
/**
- * #lazy_builder callback; builds <time> markup with current time.
+ * Render API callback: Builds <time> markup with current time.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* Note: does not actually use current time, that would complicate testing.
*
@@ -146,7 +148,9 @@ class BigPipeTestController implements TrustedCallbackInterface {
}
/**
- * #lazy_builder callback; suspends its own execution then returns markup.
+ * Render API callback: Suspends its own execution then returns markup.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @return array
* A render array with a pig-themed message wrapped in a <span>,
@@ -166,7 +170,9 @@ class BigPipeTestController implements TrustedCallbackInterface {
}
/**
- * #lazy_builder callback; says "hello" or "hi".
+ * Render API callback: Says "hello" or "hi".
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @return array
* A render array with a marquee message using BigPipeMarkup,
@@ -183,7 +189,7 @@ class BigPipeTestController implements TrustedCallbackInterface {
}
/**
- * #lazy_builder callback; throws exception.
+ * The #lazy_builder callback; throws exception.
*
* @throws \Exception
*/
@@ -192,7 +198,7 @@ class BigPipeTestController implements TrustedCallbackInterface {
}
/**
- * #lazy_builder callback; returns content that will trigger an exception.
+ * The #lazy_builder callback; returns content that will trigger an exception.
*
* @see \Drupal\big_pipe_test\EventSubscriber\BigPipeTestSubscriber::onRespondTriggerException()
*
@@ -204,7 +210,7 @@ class BigPipeTestController implements TrustedCallbackInterface {
}
/**
- * #lazy_builder callback; returns the current count.
+ * The #lazy_builder callback; returns the current count.
*
* @see \Drupal\Tests\big_pipe\Functional\BigPipeTest::testBigPipeMultiOccurrencePlaceholders()
*
diff --git a/core/modules/big_pipe/tests/src/Unit/Render/FiberPlaceholderTest.php b/core/modules/big_pipe/tests/src/Unit/Render/FiberPlaceholderTest.php
index b64095ecbdc1..e6ce793e2579 100644
--- a/core/modules/big_pipe/tests/src/Unit/Render/FiberPlaceholderTest.php
+++ b/core/modules/big_pipe/tests/src/Unit/Render/FiberPlaceholderTest.php
@@ -116,9 +116,9 @@ class FiberPlaceholderTest extends UnitTestCase {
class TurtleLazyBuilder implements TrustedCallbackInterface {
/**
- * #lazy_builder callback.
+ * Render API callback: Suspends execution twice to simulate a long operation.
*
- * Suspends its own execution twice to simulate long operation.
+ * This function is assigned as a #lazy_builder callback.
*
* @return array
* The lazy builder callback.
diff --git a/core/modules/block/src/BlockViewBuilder.php b/core/modules/block/src/BlockViewBuilder.php
index 852ad0c98f57..1463390fc1ba 100644
--- a/core/modules/block/src/BlockViewBuilder.php
+++ b/core/modules/block/src/BlockViewBuilder.php
@@ -144,7 +144,9 @@ class BlockViewBuilder extends EntityViewBuilder implements TrustedCallbackInter
}
/**
- * #lazy_builder callback; builds a #pre_render-able block.
+ * Render API callback: Builds a block that can be pre-rendered.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @param string $entity_id
* A block config entity ID.
@@ -159,7 +161,9 @@ class BlockViewBuilder extends EntityViewBuilder implements TrustedCallbackInter
}
/**
- * #pre_render callback for building a block.
+ * Render API callback: Builds a block.
+ *
+ * This function is assigned as a #pre_render callback.
*
* Renders the content using the provided block plugin, and then:
* - if there is no content, aborts rendering, and makes sure the block won't
diff --git a/core/modules/block/tests/modules/block_test/src/BlockRenderAlterContent.php b/core/modules/block/tests/modules/block_test/src/BlockRenderAlterContent.php
index b7567e3e894c..850c064fce45 100644
--- a/core/modules/block/tests/modules/block_test/src/BlockRenderAlterContent.php
+++ b/core/modules/block/tests/modules/block_test/src/BlockRenderAlterContent.php
@@ -12,7 +12,9 @@ use Drupal\Core\Render\Element\RenderCallbackInterface;
class BlockRenderAlterContent implements RenderCallbackInterface {
/**
- * #pre_render callback for a block to alter its content.
+ * Render API callback: Alters the content of a block.
+ *
+ * This function is assigned as a #pre_render callback.
*/
public static function preRender(array $build) {
$build['#prefix'] = 'Hiya!<br>';
diff --git a/core/modules/comment/src/CommentLazyBuilders.php b/core/modules/comment/src/CommentLazyBuilders.php
index 458e3689077a..5d949a320361 100644
--- a/core/modules/comment/src/CommentLazyBuilders.php
+++ b/core/modules/comment/src/CommentLazyBuilders.php
@@ -89,7 +89,9 @@ class CommentLazyBuilders implements TrustedCallbackInterface {
}
/**
- * #lazy_builder callback; builds the comment form.
+ * Render API callback: Builds the comment form.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @param string $commented_entity_type_id
* The commented entity type ID.
@@ -116,7 +118,9 @@ class CommentLazyBuilders implements TrustedCallbackInterface {
}
/**
- * #lazy_builder callback; builds a comment's links.
+ * Render API callback: Builds a comment's links.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @param string $comment_entity_id
* The comment entity ID.
diff --git a/core/modules/datetime_range/src/Plugin/Field/FieldWidget/DateRangeWidgetBase.php b/core/modules/datetime_range/src/Plugin/Field/FieldWidget/DateRangeWidgetBase.php
index b0f3ea7be7da..bad9edd73601 100644
--- a/core/modules/datetime_range/src/Plugin/Field/FieldWidget/DateRangeWidgetBase.php
+++ b/core/modules/datetime_range/src/Plugin/Field/FieldWidget/DateRangeWidgetBase.php
@@ -102,7 +102,9 @@ class DateRangeWidgetBase extends DateTimeWidgetBase {
}
/**
- * #element_validate callback to ensure that the start date <= the end date.
+ * Render API callback: Validates that the start date <= the end date.
+ *
+ * This function is assigned as a #element_validate callback.
*
* @param array $element
* An associative array containing the properties and children of the
diff --git a/core/modules/editor/tests/modules/editor_test/src/Plugin/Editor/UnicornEditor.php b/core/modules/editor/tests/modules/editor_test/src/Plugin/Editor/UnicornEditor.php
index cab720a6e59c..5b7235009a5b 100644
--- a/core/modules/editor/tests/modules/editor_test/src/Plugin/Editor/UnicornEditor.php
+++ b/core/modules/editor/tests/modules/editor_test/src/Plugin/Editor/UnicornEditor.php
@@ -49,7 +49,9 @@ class UnicornEditor extends EditorBase {
}
/**
- * #element_validate handler for "image_upload" in buildConfigurationForm().
+ * Render API callback: Image upload handler for confirmation form.
+ *
+ * This function is assigned as a #element_validate callback.
*
* Moves the text editor's image upload settings into $editor->image_upload.
*
diff --git a/core/modules/file/src/Element/ManagedFile.php b/core/modules/file/src/Element/ManagedFile.php
index 6fab94f91791..de0cdde7e710 100644
--- a/core/modules/file/src/Element/ManagedFile.php
+++ b/core/modules/file/src/Element/ManagedFile.php
@@ -159,7 +159,7 @@ class ManagedFile extends FormElementBase {
}
/**
- * #ajax callback for managed_file upload forms.
+ * The #ajax callback for managed_file upload forms.
*
* This ajax callback takes care of the following things:
* - Ensures that broken requests due to too big files are caught.
diff --git a/core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestPlaceholders.php b/core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestPlaceholders.php
index d3bf2dd04285..e1ddf5521877 100644
--- a/core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestPlaceholders.php
+++ b/core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestPlaceholders.php
@@ -35,7 +35,9 @@ class FilterTestPlaceholders extends FilterBase implements TrustedCallbackInterf
}
/**
- * #lazy_builder callback; builds a render array containing the dynamic thing.
+ * Render API callback: Builds a render array containing the dynamic thing.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @param string $thing
* A "thing" string.
@@ -50,7 +52,9 @@ class FilterTestPlaceholders extends FilterBase implements TrustedCallbackInterf
}
/**
- * #lazy_builder callback; builds a render array.
+ * Render API callback: Builds a render array.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @return array
* A renderable array.
diff --git a/core/modules/history/src/HistoryRenderCallback.php b/core/modules/history/src/HistoryRenderCallback.php
index c6a92eda68b0..5650fa0d8b75 100644
--- a/core/modules/history/src/HistoryRenderCallback.php
+++ b/core/modules/history/src/HistoryRenderCallback.php
@@ -10,7 +10,9 @@ use Drupal\Core\Render\Element\RenderCallbackInterface;
class HistoryRenderCallback implements RenderCallbackInterface {
/**
- * #lazy_builder callback; attaches the last read timestamp for a node.
+ * Render API callback: Attaches the last read timestamp for a node.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @param int $node_id
* The node ID for which to attach the last read timestamp.
diff --git a/core/modules/node/src/NodeViewBuilder.php b/core/modules/node/src/NodeViewBuilder.php
index f077ad75dc53..4d9c96f176d5 100644
--- a/core/modules/node/src/NodeViewBuilder.php
+++ b/core/modules/node/src/NodeViewBuilder.php
@@ -74,7 +74,9 @@ class NodeViewBuilder extends EntityViewBuilder implements TrustedCallbackInterf
}
/**
- * #lazy_builder callback; builds a node's links.
+ * Render API callback: Builds a node's links.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @param string $node_entity_id
* The node entity ID.
diff --git a/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php b/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php
index 83b155a8f56d..8a5d317dc4d4 100644
--- a/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php
+++ b/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php
@@ -334,7 +334,9 @@ abstract class ListItemBase extends FieldItemBase implements OptionsProviderInte
abstract protected function allowedValuesDescription();
/**
- * #element_validate callback for options field allowed values.
+ * Render API callback: Validates the allowed values of an options field.
+ *
+ * This function is assigned as a #element_validate callback.
*
* @param array $element
* An associative array containing the properties and children of the
diff --git a/core/modules/shortcut/src/ShortcutLazyBuilders.php b/core/modules/shortcut/src/ShortcutLazyBuilders.php
index 5a6c5ccde8cd..8c99615ec2c7 100644
--- a/core/modules/shortcut/src/ShortcutLazyBuilders.php
+++ b/core/modules/shortcut/src/ShortcutLazyBuilders.php
@@ -45,7 +45,9 @@ class ShortcutLazyBuilders implements TrustedCallbackInterface {
}
/**
- * #lazy_builder callback; builds shortcut toolbar links.
+ * Render API callback: Builds shortcut toolbar links.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @param bool $show_configure_link
* Boolean to indicate whether to include the configure link or not.
diff --git a/core/modules/system/src/Element/StatusReportPage.php b/core/modules/system/src/Element/StatusReportPage.php
index 361ec22bbea3..440cb778dbb1 100644
--- a/core/modules/system/src/Element/StatusReportPage.php
+++ b/core/modules/system/src/Element/StatusReportPage.php
@@ -28,7 +28,9 @@ class StatusReportPage extends RenderElementBase {
}
/**
- * #pre_render callback to get general info out of requirements.
+ * Render API callback: Gets general info out of requirements.
+ *
+ * This function is assigned as a #pre_render callback.
*/
public static function preRenderGeneralInfo($element) {
$element['#general_info'] = [
@@ -70,7 +72,7 @@ class StatusReportPage extends RenderElementBase {
}
/**
- * #pre_render callback to create counter elements.
+ * The #pre_render callback to create counter elements.
*/
public static function preRenderCounters($element) {
// Count number of items with different severity for summary.
@@ -126,7 +128,9 @@ class StatusReportPage extends RenderElementBase {
}
/**
- * #pre_render callback to create status report requirements.
+ * Render API callback: Create status report requirements.
+ *
+ * This function is assigned as a #pre_render callback.
*/
public static function preRenderRequirements($element) {
$element['#requirements'] = [
diff --git a/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php b/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php
index 71ee3dc613ba..bd8784b3e520 100644
--- a/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php
+++ b/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php
@@ -146,7 +146,9 @@ class PagerTestController extends ControllerBase implements TrustedCallbackInter
}
/**
- * #pre_render callback for #type => pager that shows the pager cache context.
+ * Render API callback: Shows the pager cache context for type pager.
+ *
+ * This function is assigned as a #pre_render callback.
*/
public static function showPagerCacheContext(array $pager) {
\Drupal::messenger()->addStatus(\Drupal::service('cache_contexts_manager')->convertTokensToKeys(['url.query_args.pagers:' . $pager['#element']])->getKeys()[0]);
diff --git a/core/modules/system/tests/modules/render_placeholder_message_test/src/RenderPlaceholderMessageTestController.php b/core/modules/system/tests/modules/render_placeholder_message_test/src/RenderPlaceholderMessageTestController.php
index 82cf68ddd3c8..1528a0839816 100644
--- a/core/modules/system/tests/modules/render_placeholder_message_test/src/RenderPlaceholderMessageTestController.php
+++ b/core/modules/system/tests/modules/render_placeholder_message_test/src/RenderPlaceholderMessageTestController.php
@@ -120,7 +120,9 @@ class RenderPlaceholderMessageTestController implements TrustedCallbackInterface
}
/**
- * #lazy_builder callback; sets and prints a message.
+ * Render API callback: Sets and prints a message.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @param string $message
* The message to send.
diff --git a/core/modules/toolbar/src/Controller/ToolbarController.php b/core/modules/toolbar/src/Controller/ToolbarController.php
index 687366fd925f..8d25465ffd08 100644
--- a/core/modules/toolbar/src/Controller/ToolbarController.php
+++ b/core/modules/toolbar/src/Controller/ToolbarController.php
@@ -99,7 +99,9 @@ class ToolbarController extends ControllerBase implements TrustedCallbackInterfa
}
/**
- * #pre_render callback for toolbar_get_rendered_subtrees().
+ * Render API callback: Prepares the subtrees.
+ *
+ * This function is assigned as a #pre_render callback.
*
* @internal
*/
diff --git a/core/modules/user/src/Plugin/Block/UserLoginBlock.php b/core/modules/user/src/Plugin/Block/UserLoginBlock.php
index cb44c2834ab7..6d29b1dca9cf 100644
--- a/core/modules/user/src/Plugin/Block/UserLoginBlock.php
+++ b/core/modules/user/src/Plugin/Block/UserLoginBlock.php
@@ -152,7 +152,9 @@ class UserLoginBlock extends BlockBase implements ContainerFactoryPluginInterfac
}
/**
- * #lazy_builder callback; renders a form action URL including destination.
+ * Render API callback: Renders a form action URL including destination.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @return array
* A renderable array representing the form action.
diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php b/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php
index f5a823e42104..c1227c301b1b 100644
--- a/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php
+++ b/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php
@@ -411,7 +411,9 @@ interface DisplayPluginInterface {
public function render();
/**
- * #pre_render callback for view display rendering.
+ * Render API callback: Performs view display rendering.
+ *
+ * This function is assigned as a #pre_render callback.
*
* @param array $element
* The element to #pre_render.
diff --git a/core/modules/views/src/Plugin/views/style/StylePluginBase.php b/core/modules/views/src/Plugin/views/style/StylePluginBase.php
index 0d25e0fa8786..3f555cfec9fd 100644
--- a/core/modules/views/src/Plugin/views/style/StylePluginBase.php
+++ b/core/modules/views/src/Plugin/views/style/StylePluginBase.php
@@ -760,7 +760,9 @@ abstract class StylePluginBase extends PluginBase {
}
/**
- * #pre_render callback for view row field rendering.
+ * Render API callback: Performs view row field rendering.
+ *
+ * This function is assigned as a #pre_render callback.
*
* @param array $data
* The element to #pre_render.
diff --git a/core/modules/views/tests/modules/views_test_data/src/Controller/ViewsTestDataController.php b/core/modules/views/tests/modules/views_test_data/src/Controller/ViewsTestDataController.php
index af4ba35ed5df..0e3f576837a9 100644
--- a/core/modules/views/tests/modules/views_test_data/src/Controller/ViewsTestDataController.php
+++ b/core/modules/views/tests/modules/views_test_data/src/Controller/ViewsTestDataController.php
@@ -29,7 +29,9 @@ class ViewsTestDataController implements TrustedCallbackInterface {
}
/**
- * #lazy_builder callback; for testing purposes only.
+ * Render API callback: For testing placeholdering only.
+ *
+ * This function is assigned as a #lazy_builder callback.
*/
public static function placeholderLazyBuilder() {
// No-op.
diff --git a/core/modules/views_ui/admin.inc b/core/modules/views_ui/admin.inc
index e275797bd698..66e5aeef2ddb 100644
--- a/core/modules/views_ui/admin.inc
+++ b/core/modules/views_ui/admin.inc
@@ -295,7 +295,9 @@ function views_ui_build_form_url(FormStateInterface $form_state) {
}
/**
- * #process callback for a button; determines if a button is the form's triggering element.
+ * The #process callback for a button.
+ *
+ * Determines if a button is the form's triggering element.
*
* The Form API has logic to determine the form's triggering element based on
* the data in POST. However, it only checks buttons based on a single #value
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index b603987bf358..455c074e5c66 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -61,7 +61,9 @@
TagsNotGrouped, ParamGroup -->
<exclude name="Drupal.Commenting.DocComment.LongFullStop"/>
<exclude name="Drupal.Commenting.DocComment.MissingShort"/>
- <exclude name="Drupal.Commenting.DocComment.ShortNotCapital"/>
+ </rule>
+ <rule ref="Drupal.Commenting.DocComment">
+ <exclude-pattern>core/tests/*</exclude-pattern>
</rule>
<rule ref="Drupal.Commenting.DocCommentAlignment"/>
<rule ref="Drupal.Commenting.DocCommentLongArraySyntax"/>
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
index c888be259205..91e21361a0f6 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
@@ -555,7 +555,9 @@ class RendererBubblingTest extends RendererTestBase {
class BubblingTest implements TrustedCallbackInterface {
/**
- * #pre_render callback for testBubblingWithPrerender().
+ * Render API callback:Used for testing testBubblingWithPrerender().
+ *
+ * This function is assigned as an #pre_render callback.
*/
public static function bubblingPreRender($elements) {
$elements += [
@@ -594,7 +596,9 @@ class BubblingTest implements TrustedCallbackInterface {
}
/**
- * #pre_render callback for testBubblingWithPrerender().
+ * Render API callback: Used for testing testBubblingWithPrerender().
+ *
+ * This function is assigned as an #pre_render callback in
*/
public static function bubblingNestedPreRenderUncached($elements) {
\Drupal::state()->set('bubbling_nested_pre_render_uncached', TRUE);
@@ -603,7 +607,9 @@ class BubblingTest implements TrustedCallbackInterface {
}
/**
- * #pre_render callback for testBubblingWithPrerender().
+ * Render API callback: Used for testing testBubblingWithPrerender().
+ *
+ * This function is assigned as an #pre_render callback in
*/
public static function bubblingNestedPreRenderCached($elements) {
\Drupal::state()->set('bubbling_nested_pre_render_cached', TRUE);
@@ -611,7 +617,9 @@ class BubblingTest implements TrustedCallbackInterface {
}
/**
- * #lazy_builder callback for testBubblingWithPrerender().
+ * Render API callback: Used for testing testBubblingWithPrerender().
+ *
+ * This function is assigned as an #lazy_builder callback in
*/
public static function bubblingPlaceholder($foo, $baz) {
return [
@@ -620,7 +628,9 @@ class BubblingTest implements TrustedCallbackInterface {
}
/**
- * #pre_render callback for testOverWriteCacheKeys().
+ * Render API callback: Used for testing testOverWriteCacheKeys().
+ *
+ * This function is assigned as an #pre_render callback in
*/
public static function bubblingCacheOverwritePrerender($elements) {
// Overwrite the #cache entry with new data.
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
index 1acd9123a834..2b897fe40a1c 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
@@ -1183,7 +1183,9 @@ EOS;
class RecursivePlaceholdersTest implements TrustedCallbackInterface {
/**
- * #lazy_builder callback; bubbles another placeholder.
+ * Render API callback: Bubbles another placeholder.
+ *
+ * This function is assigned as a #lazy_builder callback.
*
* @param string $animal
* An animal.
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
index fd8962a87555..f6f678582d65 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
@@ -292,7 +292,9 @@ abstract class RendererTestBase extends UnitTestCase {
class PlaceholdersTest implements TrustedCallbackInterface {
/**
- * #lazy_builder callback; attaches setting, generates markup.
+ * Render API callback: Attaches setting and generates markup.
+ *
+ * This function is assigned as an #lazy_builder callback.
*
* @param string $animal
* An animal.
@@ -319,7 +321,7 @@ class PlaceholdersTest implements TrustedCallbackInterface {
}
/**
- * #lazy_builder callback; attaches setting, generates markup, user-specific.
+ * The #lazy_builder callback; attaches setting, generates markup, user-specific.
*
* @param string $animal
* An animal.
@@ -339,7 +341,7 @@ class PlaceholdersTest implements TrustedCallbackInterface {
}
/**
- * #lazy_builder callback; attaches setting, generates markup, cache tag.
+ * The #lazy_builder callback; attaches setting, generates markup, cache tag.
*
* @param string $animal
* An animal.