From 57583222f2428cb5165dc4296feeb21f901e745b Mon Sep 17 00:00:00 2001
From: Lee Rowlands <lee.rowlands@previousnext.com.au>
Date: Thu, 19 Dec 2024 12:13:18 +1000
Subject: [PATCH] Issue #3487154 by quietone, daffie, smustgrave: Fix
 Drupal.Commenting.FunctionComment.MissingReturnComment in
 core/lib/Drupal/Core/A-E

---
 .../Drupal/Core/Access/CheckProviderInterface.php   |  1 +
 .../Drupal/Core/Action/ActionPluginCollection.php   |  1 +
 core/lib/Drupal/Core/Ajax/OpenDialogCommand.php     |  2 ++
 .../Drupal/Core/Annotation/ContextDefinition.php    |  1 +
 .../Drupal/Core/Asset/AttachedAssetsInterface.php   |  3 +++
 core/lib/Drupal/Core/Block/BlockPluginTrait.php     |  1 +
 core/lib/Drupal/Core/Breadcrumb/Breadcrumb.php      |  1 +
 core/lib/Drupal/Core/Cache/ApcuBackend.php          |  1 +
 core/lib/Drupal/Core/Cache/CacheCollector.php       |  1 +
 .../Core/Cache/CacheableResponseInterface.php       |  1 +
 core/lib/Drupal/Core/Cache/DatabaseBackend.php      |  3 ++-
 core/lib/Drupal/Core/Cache/PhpBackend.php           |  2 ++
 core/lib/Drupal/Core/Command/DbCommandBase.php      |  1 +
 core/lib/Drupal/Core/Command/GenerateTheme.php      |  2 ++
 core/lib/Drupal/Core/Command/InstallCommand.php     |  1 +
 .../Core/Condition/ConditionPluginCollection.php    |  1 +
 .../Core/Config/BootstrapConfigStorageFactory.php   |  1 +
 .../Config/Checkpoint/CheckpointListInterface.php   |  1 +
 core/lib/Drupal/Core/Config/ConfigCrudEvent.php     |  1 +
 .../Drupal/Core/Config/ConfigManagerInterface.php   |  1 +
 core/lib/Drupal/Core/Config/DatabaseStorage.php     |  1 +
 .../Drupal/Core/Config/Entity/ConfigEntityBase.php  |  1 +
 .../Core/Config/Entity/ConfigEntityDependency.php   |  2 ++
 .../Core/Config/Entity/ConfigEntityInterface.php    |  2 ++
 core/lib/Drupal/Core/Config/FileStorageFactory.php  |  3 ++-
 core/lib/Drupal/Core/Config/Schema/ArrayElement.php |  3 +++
 core/lib/Drupal/Core/Config/Schema/Mapping.php      |  2 --
 .../Drupal/Core/Config/Schema/SchemaCheckTrait.php  |  2 ++
 core/lib/Drupal/Core/Config/StorableConfigBase.php  |  1 +
 .../Core/Config/UnmetDependenciesException.php      |  2 ++
 core/lib/Drupal/Core/Controller/ControllerBase.php  |  4 ++++
 core/lib/Drupal/Core/Database/Connection.php        |  7 ++++++-
 core/lib/Drupal/Core/Database/Database.php          |  5 +++--
 .../Core/Database/Query/ConditionInterface.php      |  2 ++
 core/lib/Drupal/Core/Datetime/Element/Datelist.php  |  4 ++++
 core/lib/Drupal/Core/Datetime/FormattedDateDiff.php |  1 +
 core/lib/Drupal/Core/DrupalKernel.php               | 13 +++++++++++--
 core/lib/Drupal/Core/DrupalKernelInterface.php      |  3 +++
 core/lib/Drupal/Core/Entity/ContentEntityBase.php   |  1 +
 .../Core/Entity/Enhancer/EntityRouteEnhancer.php    |  1 +
 core/lib/Drupal/Core/Entity/EntityBase.php          |  4 ++++
 core/lib/Drupal/Core/Entity/EntityDisplayBase.php   |  4 ++++
 .../Drupal/Core/Entity/EntityResolverManager.php    |  1 +
 core/lib/Drupal/Core/Entity/EntityStorageBase.php   |  1 +
 core/lib/Drupal/Core/Entity/EntityTypeEvent.php     |  2 ++
 core/lib/Drupal/Core/Entity/EntityTypeInterface.php | 12 ++++++++++++
 .../Core/Entity/EntityTypeManagerInterface.php      |  3 +++
 core/lib/Drupal/Core/Entity/EntityViewBuilder.php   |  2 ++
 .../Validation/Constraint/BundleConstraint.php      |  1 +
 .../Entity/Query/ConditionAggregateInterface.php    |  3 +++
 .../Drupal/Core/Entity/Query/ConditionInterface.php |  1 +
 core/lib/Drupal/Core/Entity/Query/Sql/Query.php     |  2 ++
 .../Entity/Sql/SqlContentEntityStorageSchema.php    |  1 +
 .../Core/Entity/Sql/TableMappingInterface.php       |  1 +
 .../Core/EventSubscriber/ConfigImportSubscriber.php |  1 +
 .../EventSubscriber/FinalExceptionSubscriber.php    |  3 +++
 core/lib/Drupal/Core/Extension/Extension.php        |  7 +++++++
 core/lib/Drupal/Core/Extension/ExtensionList.php    |  3 +++
 .../Core/Extension/ModuleHandlerInterface.php       |  2 ++
 core/lib/Drupal/Core/Extension/ModuleInstaller.php  |  4 ++--
 .../Drupal/Core/Extension/ThemeHandlerInterface.php |  2 ++
 core/phpcs.xml.dist                                 |  5 +++--
 62 files changed, 139 insertions(+), 13 deletions(-)

diff --git a/core/lib/Drupal/Core/Access/CheckProviderInterface.php b/core/lib/Drupal/Core/Access/CheckProviderInterface.php
index 35e3c18b822a..59ccf9f997de 100644
--- a/core/lib/Drupal/Core/Access/CheckProviderInterface.php
+++ b/core/lib/Drupal/Core/Access/CheckProviderInterface.php
@@ -58,6 +58,7 @@ public function loadCheck($service_id);
    * A list of checks that needs the request.
    *
    * @return array
+   *   Array of access checks which will only be run on the incoming request.
    */
   public function getChecksNeedRequest();
 
diff --git a/core/lib/Drupal/Core/Action/ActionPluginCollection.php b/core/lib/Drupal/Core/Action/ActionPluginCollection.php
index a4a497da50e3..a5e57d4fa88f 100644
--- a/core/lib/Drupal/Core/Action/ActionPluginCollection.php
+++ b/core/lib/Drupal/Core/Action/ActionPluginCollection.php
@@ -14,6 +14,7 @@ class ActionPluginCollection extends DefaultSingleLazyPluginCollection {
    *
    * @return \Drupal\Core\Action\ActionInterface
    */
+  // phpcs:ignore Drupal.Commenting.FunctionComment.MissingReturnComment
   public function &get($instance_id) {
     return parent::get($instance_id);
   }
diff --git a/core/lib/Drupal/Core/Ajax/OpenDialogCommand.php b/core/lib/Drupal/Core/Ajax/OpenDialogCommand.php
index efd4235c25de..45fe3c67c70f 100644
--- a/core/lib/Drupal/Core/Ajax/OpenDialogCommand.php
+++ b/core/lib/Drupal/Core/Ajax/OpenDialogCommand.php
@@ -92,6 +92,8 @@ public function __construct($selector, string|\Stringable|null $title, $content,
    * Returns the dialog options.
    *
    * @return array
+   *   An array of the dialog-specific options passed directly to jQuery UI
+   *   dialogs.
    */
   public function getDialogOptions() {
     return $this->dialogOptions;
diff --git a/core/lib/Drupal/Core/Annotation/ContextDefinition.php b/core/lib/Drupal/Core/Annotation/ContextDefinition.php
index 64f7d7b497d1..09507b1ad414 100644
--- a/core/lib/Drupal/Core/Annotation/ContextDefinition.php
+++ b/core/lib/Drupal/Core/Annotation/ContextDefinition.php
@@ -155,6 +155,7 @@ protected function getDefinitionClass(array $values) {
    * Returns the value of an annotation.
    *
    * @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface
+   *   The context definition object.
    */
   public function get() {
     return $this->definition;
diff --git a/core/lib/Drupal/Core/Asset/AttachedAssetsInterface.php b/core/lib/Drupal/Core/Asset/AttachedAssetsInterface.php
index c100264ad309..18dec5904d96 100644
--- a/core/lib/Drupal/Core/Asset/AttachedAssetsInterface.php
+++ b/core/lib/Drupal/Core/Asset/AttachedAssetsInterface.php
@@ -41,6 +41,7 @@ public function setLibraries(array $libraries);
    * Returns the asset libraries attached to the current response.
    *
    * @return string[]
+   *   A list of libraries attached to this response.
    */
   public function getLibraries();
 
@@ -58,6 +59,7 @@ public function setSettings(array $settings);
    * Returns the settings attached to the current response.
    *
    * @return array
+   *   An array of the settings attached to the current response.
    */
   public function getSettings();
 
@@ -75,6 +77,7 @@ public function setAlreadyLoadedLibraries(array $libraries);
    * Returns the set of already loaded asset libraries.
    *
    * @return string[]
+   *   A list of the loaded libraries.
    */
   public function getAlreadyLoadedLibraries();
 
diff --git a/core/lib/Drupal/Core/Block/BlockPluginTrait.php b/core/lib/Drupal/Core/Block/BlockPluginTrait.php
index 55474a1cdb13..1701061911a6 100644
--- a/core/lib/Drupal/Core/Block/BlockPluginTrait.php
+++ b/core/lib/Drupal/Core/Block/BlockPluginTrait.php
@@ -270,6 +270,7 @@ public function getPreviewFallbackString() {
    * Wraps the transliteration service.
    *
    * @return \Drupal\Component\Transliteration\TransliterationInterface
+   *   The transliteration service.
    */
   protected function transliteration() {
     if (!$this->transliteration) {
diff --git a/core/lib/Drupal/Core/Breadcrumb/Breadcrumb.php b/core/lib/Drupal/Core/Breadcrumb/Breadcrumb.php
index fc1906ad938a..bd1614af266c 100644
--- a/core/lib/Drupal/Core/Breadcrumb/Breadcrumb.php
+++ b/core/lib/Drupal/Core/Breadcrumb/Breadcrumb.php
@@ -25,6 +25,7 @@ class Breadcrumb implements RenderableInterface, RefinableCacheableDependencyInt
    * Gets the breadcrumb links.
    *
    * @return \Drupal\Core\Link[]
+   *   An ordered list of the links for the breadcrumb.
    */
   public function getLinks() {
     return $this->links;
diff --git a/core/lib/Drupal/Core/Cache/ApcuBackend.php b/core/lib/Drupal/Core/Cache/ApcuBackend.php
index 3d21189eccf2..cf1f33e55295 100644
--- a/core/lib/Drupal/Core/Cache/ApcuBackend.php
+++ b/core/lib/Drupal/Core/Cache/ApcuBackend.php
@@ -273,6 +273,7 @@ public function invalidateAll() {
    *   The type to list. Either pass in APC_LIST_ACTIVE or APC_LIST_DELETED.
    *
    * @return \APCUIterator
+   *   An APCUIterator class.
    */
   protected function getIterator($search = NULL, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE) {
     return new \APCUIterator($search, $format, $chunk_size, $list);
diff --git a/core/lib/Drupal/Core/Cache/CacheCollector.php b/core/lib/Drupal/Core/Cache/CacheCollector.php
index 247e79f3ef09..6ed437f27e0f 100644
--- a/core/lib/Drupal/Core/Cache/CacheCollector.php
+++ b/core/lib/Drupal/Core/Cache/CacheCollector.php
@@ -122,6 +122,7 @@ public function __construct($cid, CacheBackendInterface $cache, LockBackendInter
    * Gets the cache ID.
    *
    * @return string
+   *   The cache ID.
    */
   protected function getCid() {
     return $this->cid;
diff --git a/core/lib/Drupal/Core/Cache/CacheableResponseInterface.php b/core/lib/Drupal/Core/Cache/CacheableResponseInterface.php
index cbac2d1be0a3..913268a57f02 100644
--- a/core/lib/Drupal/Core/Cache/CacheableResponseInterface.php
+++ b/core/lib/Drupal/Core/Cache/CacheableResponseInterface.php
@@ -31,6 +31,7 @@ public function addCacheableDependency($dependency);
    * Returns the cacheability metadata for this response.
    *
    * @return \Drupal\Core\Cache\CacheableMetadata
+   *   The cacheable metadata.
    */
   public function getCacheableMetadata();
 
diff --git a/core/lib/Drupal/Core/Cache/DatabaseBackend.php b/core/lib/Drupal/Core/Cache/DatabaseBackend.php
index 8b45010914fe..48f9c5788908 100644
--- a/core/lib/Drupal/Core/Cache/DatabaseBackend.php
+++ b/core/lib/Drupal/Core/Cache/DatabaseBackend.php
@@ -566,9 +566,10 @@ public function schemaDefinition() {
   }
 
   /**
-   * The maximum number of rows that this cache bin table is allowed to store.
+   * Gets the maximum number of rows for this cache bin table.
    *
    * @return int
+   *   The maximum number of rows that this cache bin table is allowed to store.
    */
   public function getMaxRows() {
     return $this->maxRows;
diff --git a/core/lib/Drupal/Core/Cache/PhpBackend.php b/core/lib/Drupal/Core/Cache/PhpBackend.php
index 52b7202982fa..afd3f22ffc71 100644
--- a/core/lib/Drupal/Core/Cache/PhpBackend.php
+++ b/core/lib/Drupal/Core/Cache/PhpBackend.php
@@ -79,6 +79,7 @@ public function get($cid, $allow_invalid = FALSE) {
    *   has been invalidated.
    *
    * @return bool|mixed
+   *   The requested cached item. Defaults to FALSE when the cache is not set.
    */
   protected function getByHash($cidhash, $allow_invalid = FALSE) {
     if ($file = $this->storage()->getFullPath($cidhash)) {
@@ -260,6 +261,7 @@ protected function writeItem($cidhash, \stdClass $item) {
    * Gets the PHP code storage object to use.
    *
    * @return \Drupal\Component\PhpStorage\PhpStorageInterface
+   *   The PHP storage.
    */
   protected function storage() {
     if (!isset($this->storage)) {
diff --git a/core/lib/Drupal/Core/Command/DbCommandBase.php b/core/lib/Drupal/Core/Command/DbCommandBase.php
index fca703f4df47..c333c8a00c9b 100644
--- a/core/lib/Drupal/Core/Command/DbCommandBase.php
+++ b/core/lib/Drupal/Core/Command/DbCommandBase.php
@@ -28,6 +28,7 @@ protected function configure(): void {
    *   Input object.
    *
    * @return \Drupal\Core\Database\Connection
+   *   The database connection.
    */
   protected function getDatabaseConnection(InputInterface $input) {
     // Load connection from a URL.
diff --git a/core/lib/Drupal/Core/Command/GenerateTheme.php b/core/lib/Drupal/Core/Command/GenerateTheme.php
index ed61dcfdd8e4..48aac09208f7 100644
--- a/core/lib/Drupal/Core/Command/GenerateTheme.php
+++ b/core/lib/Drupal/Core/Command/GenerateTheme.php
@@ -207,6 +207,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
    * Generates a path to a temporary location.
    *
    * @return string
+   *   A temporary path.
    */
   private function getUniqueTmpDirPath(): string {
     return sys_get_temp_dir() . '/drupal-starterkit-theme-' . uniqid(md5(microtime()), TRUE);
@@ -219,6 +220,7 @@ private function getUniqueTmpDirPath(): string {
    *   The machine name of the theme.
    *
    * @return \Drupal\Core\Extension\Extension|null
+   *   The extension info array. NULL if the theme_name is not discovered.
    */
   private function getThemeInfo(string $theme_name): ? Extension {
     $extension_discovery = new ExtensionDiscovery($this->root, FALSE, []);
diff --git a/core/lib/Drupal/Core/Command/InstallCommand.php b/core/lib/Drupal/Core/Command/InstallCommand.php
index d92f46c364bf..57d8916b7f8a 100644
--- a/core/lib/Drupal/Core/Command/InstallCommand.php
+++ b/core/lib/Drupal/Core/Command/InstallCommand.php
@@ -123,6 +123,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
    * Returns whether there is already an existing Drupal installation.
    *
    * @return bool
+   *   Returns TRUE if Drupal is installed, FALSE otherwise.
    */
   protected function isDrupalInstalled() {
     try {
diff --git a/core/lib/Drupal/Core/Condition/ConditionPluginCollection.php b/core/lib/Drupal/Core/Condition/ConditionPluginCollection.php
index 4717cd997afd..c9a0c11499d2 100644
--- a/core/lib/Drupal/Core/Condition/ConditionPluginCollection.php
+++ b/core/lib/Drupal/Core/Condition/ConditionPluginCollection.php
@@ -22,6 +22,7 @@ class ConditionPluginCollection extends DefaultLazyPluginCollection {
    *
    * @return \Drupal\Core\Condition\ConditionInterface
    */
+  // phpcs:ignore Drupal.Commenting.FunctionComment.MissingReturnComment
   public function &get($instance_id) {
     return parent::get($instance_id);
   }
diff --git a/core/lib/Drupal/Core/Config/BootstrapConfigStorageFactory.php b/core/lib/Drupal/Core/Config/BootstrapConfigStorageFactory.php
index 4717286a9063..aa7485c9d179 100644
--- a/core/lib/Drupal/Core/Config/BootstrapConfigStorageFactory.php
+++ b/core/lib/Drupal/Core/Config/BootstrapConfigStorageFactory.php
@@ -34,6 +34,7 @@ public static function get($class_loader = NULL) {
    * Returns a Database configuration storage implementation.
    *
    * @return \Drupal\Core\Config\DatabaseStorage
+   *   The database storage object.
    */
   public static function getDatabaseStorage() {
     return new DatabaseStorage(Database::getConnection(), 'config');
diff --git a/core/lib/Drupal/Core/Config/Checkpoint/CheckpointListInterface.php b/core/lib/Drupal/Core/Config/Checkpoint/CheckpointListInterface.php
index dd3af0b07ddf..a6e01f4924cd 100644
--- a/core/lib/Drupal/Core/Config/Checkpoint/CheckpointListInterface.php
+++ b/core/lib/Drupal/Core/Config/Checkpoint/CheckpointListInterface.php
@@ -45,6 +45,7 @@ public function get(string $id): Checkpoint;
    *   The checkpoint ID.
    *
    * @return iterable<string, \Drupal\Core\Config\Checkpoint\Checkpoint>
+   *   The parents for the given checkpoint.
    */
   public function getParents(string $id): iterable;
 
diff --git a/core/lib/Drupal/Core/Config/ConfigCrudEvent.php b/core/lib/Drupal/Core/Config/ConfigCrudEvent.php
index 63048bd75339..d2e2bb005fd7 100644
--- a/core/lib/Drupal/Core/Config/ConfigCrudEvent.php
+++ b/core/lib/Drupal/Core/Config/ConfigCrudEvent.php
@@ -43,6 +43,7 @@ public function getConfig() {
    *   The configuration key to check if it has changed.
    *
    * @return bool
+   *   TRUE if the value of the given key has changed, FALSE otherwise.
    */
   public function isChanged($key) {
     return $this->config->get($key) !== $this->config->getOriginal($key);
diff --git a/core/lib/Drupal/Core/Config/ConfigManagerInterface.php b/core/lib/Drupal/Core/Config/ConfigManagerInterface.php
index 832088860814..2dc69635dd13 100644
--- a/core/lib/Drupal/Core/Config/ConfigManagerInterface.php
+++ b/core/lib/Drupal/Core/Config/ConfigManagerInterface.php
@@ -97,6 +97,7 @@ public function uninstall($type, $name);
    * store.
    *
    * @return \Drupal\Core\Config\Entity\ConfigDependencyManager
+   *   The configuration dependency manager.
    */
   public function getConfigDependencyManager();
 
diff --git a/core/lib/Drupal/Core/Config/DatabaseStorage.php b/core/lib/Drupal/Core/Config/DatabaseStorage.php
index c9a25bd19a1e..1211ad9e7ff9 100644
--- a/core/lib/Drupal/Core/Config/DatabaseStorage.php
+++ b/core/lib/Drupal/Core/Config/DatabaseStorage.php
@@ -153,6 +153,7 @@ public function write($name, array $data) {
    *   The config data, already dumped to a string.
    *
    * @return bool
+   *   TRUE when the write was successful, FALSE otherwise.
    */
   protected function doWrite($name, $data) {
     return (bool) $this->connection->merge($this->table, $this->options)
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
index bcee9c5e044b..d03c5dbb6703 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
@@ -283,6 +283,7 @@ public function toArray() {
    * Gets the typed config manager.
    *
    * @return \Drupal\Core\Config\TypedConfigManagerInterface
+   *   The typed configuration plugin manager.
    */
   protected function getTypedConfig() {
     return \Drupal::service('config.typed');
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityDependency.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityDependency.php
index a7a2abe65e97..f63a6a7ab6e1 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityDependency.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityDependency.php
@@ -81,6 +81,8 @@ public function getDependencies($type) {
    *   the full configuration object name.
    *
    * @return bool
+   *   TRUE when this entity is dependency on any extension or entity. False
+   *   otherwise.
    */
   public function hasDependency($type, $name) {
     // Add a dependency on the provider module (which defines this config
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php
index fc7eb5e1f3de..8e1f285466a4 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php
@@ -71,6 +71,8 @@ public function status();
    * should be deleted.
    *
    * @return bool
+   *   TRUE if the configuration entity is being changed during the uninstall
+   *   process, FALSE otherwise.
    */
   public function isUninstalling();
 
diff --git a/core/lib/Drupal/Core/Config/FileStorageFactory.php b/core/lib/Drupal/Core/Config/FileStorageFactory.php
index b45ba36f0b37..a183702f9d70 100644
--- a/core/lib/Drupal/Core/Config/FileStorageFactory.php
+++ b/core/lib/Drupal/Core/Config/FileStorageFactory.php
@@ -12,7 +12,8 @@ class FileStorageFactory {
   /**
    * Returns a FileStorage object working with the sync config directory.
    *
-   * @return \Drupal\Core\Config\FileStorage FileStorage
+   * @return \Drupal\Core\Config\FileStorage
+   *   The file storage object for the configuration sync directory.
    *
    * @throws \Drupal\Core\Config\ConfigDirectoryNotDefinedException
    *   In case the sync directory does not exist or is not defined in
diff --git a/core/lib/Drupal/Core/Config/Schema/ArrayElement.php b/core/lib/Drupal/Core/Config/Schema/ArrayElement.php
index 9eb649be771e..51b65d07fa5d 100644
--- a/core/lib/Drupal/Core/Config/Schema/ArrayElement.php
+++ b/core/lib/Drupal/Core/Config/Schema/ArrayElement.php
@@ -66,6 +66,7 @@ protected function parse() {
    *   Property name or index of the element.
    *
    * @return \Drupal\Core\TypedData\DataDefinitionInterface
+   *   The data definition object for the property.
    */
   abstract protected function getElementDefinition($key);
 
@@ -149,6 +150,7 @@ public function getIterator(): \ArrayIterator {
    *   The key of the contained element.
    *
    * @return \Drupal\Core\TypedData\TypedDataInterface
+   *   A typed data object created from the given parameters.
    */
   protected function createElement($definition, $value, $key) {
     return $this->getTypedDataManager()->create($definition, $value, $key, $this);
@@ -166,6 +168,7 @@ protected function createElement($definition, $value, $key) {
    *   The key of the contained element.
    *
    * @return \Drupal\Core\TypedData\DataDefinitionInterface
+   *   A data definition object for the given parameters.
    */
   protected function buildDataDefinition($definition, $value, $key) {
     return $this->getTypedDataManager()->buildDataDefinition($definition, $value, $key, $this);
diff --git a/core/lib/Drupal/Core/Config/Schema/Mapping.php b/core/lib/Drupal/Core/Config/Schema/Mapping.php
index 313914eb1268..3f555e0a081f 100644
--- a/core/lib/Drupal/Core/Config/Schema/Mapping.php
+++ b/core/lib/Drupal/Core/Config/Schema/Mapping.php
@@ -221,8 +221,6 @@ public function getOptionalKeys(): array {
    * @param \Drupal\Core\TypedData\MapDataDefinition $definition
    *   The config schema definition for a `type: mapping`.
    *
-   * @return void
-   *
    * @throws \LogicException
    *   Thrown when `requiredKey: true` is specified.
    */
diff --git a/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php b/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php
index b928df3eebe4..9d5ff5a3e4ec 100644
--- a/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php
+++ b/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php
@@ -132,6 +132,8 @@ public function checkConfigSchema(TypedConfigManagerInterface $typed_config, $co
    *   A validation constraint violation for a Config object.
    *
    * @return bool
+   *   TRUE when the violation is for an ignored configuration property path,
+   *   FALSE otherwise.
    */
   protected static function isViolationForIgnoredPropertyPath(ConstraintViolation $v): bool {
     // When the validated object is a config entity wrapped in a
diff --git a/core/lib/Drupal/Core/Config/StorableConfigBase.php b/core/lib/Drupal/Core/Config/StorableConfigBase.php
index 750f8f4f5e5a..46562c76d9ac 100644
--- a/core/lib/Drupal/Core/Config/StorableConfigBase.php
+++ b/core/lib/Drupal/Core/Config/StorableConfigBase.php
@@ -171,6 +171,7 @@ public function getRawData() {
    * should be reset.
    *
    * @return \Drupal\Core\Config\Schema\Element
+   *   A configuration element.
    */
   protected function getSchemaWrapper() {
     if (!isset($this->schemaWrapper)) {
diff --git a/core/lib/Drupal/Core/Config/UnmetDependenciesException.php b/core/lib/Drupal/Core/Config/UnmetDependenciesException.php
index a2a1fa5d38e6..9d183987c217 100644
--- a/core/lib/Drupal/Core/Config/UnmetDependenciesException.php
+++ b/core/lib/Drupal/Core/Config/UnmetDependenciesException.php
@@ -66,6 +66,7 @@ public function getExtension() {
    *   The name of the extension that is being installed.
    *
    * @return string
+   *   The translated exception message.
    */
   public function getTranslatedMessage(TranslationInterface $string_translation, $extension) {
     return $string_translation->translate(
@@ -87,6 +88,7 @@ public function getTranslatedMessage(TranslationInterface $string_translation, $
    *   dependencies as the value.
    *
    * @return \Drupal\Core\Config\PreExistingConfigException
+   *   An exception for the extension with a list of configuration objects.
    */
   public static function create($extension, array $config_objects) {
     $message = new FormattableMarkup('Configuration objects provided by %extension have unmet dependencies: %config_names',
diff --git a/core/lib/Drupal/Core/Controller/ControllerBase.php b/core/lib/Drupal/Core/Controller/ControllerBase.php
index a164eb9b8e17..57430aa699ff 100644
--- a/core/lib/Drupal/Core/Controller/ControllerBase.php
+++ b/core/lib/Drupal/Core/Controller/ControllerBase.php
@@ -173,6 +173,7 @@ protected function config($name) {
    *   Name of the key/value collection to return.
    *
    * @return \Drupal\Core\KeyValueStore\KeyValueStoreInterface
+   *   The key/value storage.
    */
   protected function keyValue($collection) {
     if (!$this->keyValue) {
@@ -191,6 +192,7 @@ protected function keyValue($collection) {
    * (for example, the system maintenance message) should use config() instead.
    *
    * @return \Drupal\Core\State\StateInterface
+   *   The state storage service.
    */
   protected function state() {
     if (!$this->stateService) {
@@ -203,6 +205,7 @@ protected function state() {
    * Returns the module handler.
    *
    * @return \Drupal\Core\Extension\ModuleHandlerInterface
+   *   The module handler service.
    */
   protected function moduleHandler() {
     if (!$this->moduleHandler) {
@@ -215,6 +218,7 @@ protected function moduleHandler() {
    * Returns the form builder service.
    *
    * @return \Drupal\Core\Form\FormBuilderInterface
+   *   The form builder service.
    */
   protected function formBuilder() {
     if (!$this->formBuilder) {
diff --git a/core/lib/Drupal/Core/Database/Connection.php b/core/lib/Drupal/Core/Database/Connection.php
index 830d923b2936..789725b00f53 100644
--- a/core/lib/Drupal/Core/Database/Connection.php
+++ b/core/lib/Drupal/Core/Database/Connection.php
@@ -325,7 +325,8 @@ public function attachDatabase(string $database): void {
   /**
    * Returns the prefix of the tables.
    *
-   * @return string $prefix
+   * @return string
+   *   The table prefix.
    */
   public function getPrefix(): string {
     return $this->prefix;
@@ -395,6 +396,7 @@ public function quoteIdentifiers($sql) {
    *   The name of the table in question.
    *
    * @return string
+   *   The fully qualified table name.
    */
   public function getFullQualifiedTableName($table) {
     $options = $this->getConnectionOptions();
@@ -1186,6 +1188,7 @@ abstract public function driver();
    * override this method.
    *
    * @return string
+   *   The version of the database server.
    */
   public function version() {
     return $this->connection->getAttribute(\PDO::ATTR_SERVER_VERSION);
@@ -1198,6 +1201,7 @@ public function version() {
    * override this method.
    *
    * @return string
+   *   The version of the database client.
    */
   public function clientVersion() {
     return $this->connection->getAttribute(\PDO::ATTR_CLIENT_VERSION);
@@ -1220,6 +1224,7 @@ public function supportsTransactionalDDL() {
    * Returns the name of the database engine accessed by this driver.
    *
    * @return string
+   *   The database engine name.
    */
   abstract public function databaseType();
 
diff --git a/core/lib/Drupal/Core/Database/Database.php b/core/lib/Drupal/Core/Database/Database.php
index a7cf6a6ff38b..92751cef4325 100644
--- a/core/lib/Drupal/Core/Database/Database.php
+++ b/core/lib/Drupal/Core/Database/Database.php
@@ -303,6 +303,7 @@ final public static function addConnectionInfo($key, $target, array $info, $clas
    *   (optional) The connection key for which to return information.
    *
    * @return array|null
+   *   An associative array of database information. Defaults to an empty array.
    */
   final public static function getConnectionInfo($key = 'default') {
     if (!empty(self::$databaseInfo[$key])) {
@@ -314,6 +315,8 @@ final public static function getConnectionInfo($key = 'default') {
    * Gets connection information for all available databases.
    *
    * @return array
+   *   An associative array of database information for all available database,
+   *   keyed by the database name. Defaults to an empty array.
    */
   final public static function getAllConnectionInfo() {
     return self::$databaseInfo;
@@ -617,8 +620,6 @@ public static function getConnectionInfoAsUrl($key = 'default') {
    *   Internal param to denote that the method is being called by
    *   _drupal_shutdown_function().
    *
-   * @return void
-   *
    * @internal
    *   This method exists only to work around a bug caused by Drupal incorrectly
    *   relying on object destruction order to commit transactions. Xdebug 3.3.0
diff --git a/core/lib/Drupal/Core/Database/Query/ConditionInterface.php b/core/lib/Drupal/Core/Database/Query/ConditionInterface.php
index 01815f2c45a8..673ac1d9be15 100644
--- a/core/lib/Drupal/Core/Database/Query/ConditionInterface.php
+++ b/core/lib/Drupal/Core/Database/Query/ConditionInterface.php
@@ -215,6 +215,7 @@ public function conditionGroupFactory($conjunction = 'AND');
    * Creates a new group of conditions ANDed together.
    *
    * @return \Drupal\Core\Database\Query\ConditionInterface
+   *   An object holding a group of conditions.
    */
   public function andConditionGroup();
 
@@ -222,6 +223,7 @@ public function andConditionGroup();
    * Creates a new group of conditions ORed together.
    *
    * @return \Drupal\Core\Database\Query\ConditionInterface
+   *   An object holding a group of conditions.
    */
   public function orConditionGroup();
 
diff --git a/core/lib/Drupal/Core/Datetime/Element/Datelist.php b/core/lib/Drupal/Core/Datetime/Element/Datelist.php
index c94ecfa58c3f..71d5b839a992 100644
--- a/core/lib/Drupal/Core/Datetime/Element/Datelist.php
+++ b/core/lib/Drupal/Core/Datetime/Element/Datelist.php
@@ -178,6 +178,7 @@ public static function valueCallback(&$element, $input, FormStateInterface $form
    *   The complete form structure.
    *
    * @return array
+   *   An expanded DateList element.
    */
   public static function processDatelist(&$element, FormStateInterface $form_state, &$complete_form) {
     // Load translated date part labels from the appropriate calendar plugin.
@@ -359,6 +360,9 @@ protected static function checkEmptyInputs($input, $parts) {
    *   The value to round to.
    *
    * @return \Drupal\Core\Datetime\DrupalDateTime
+   *   The Drupal date time object with the minutes and seconds rounded when the
+   *   input date is a DrupalDateTime instance. Otherwise the date is returned
+   *   unchanged.
    */
   protected static function incrementRound(&$date, $increment) {
     // Round minutes and seconds, if necessary.
diff --git a/core/lib/Drupal/Core/Datetime/FormattedDateDiff.php b/core/lib/Drupal/Core/Datetime/FormattedDateDiff.php
index 142981253a41..f9a3a84e202d 100644
--- a/core/lib/Drupal/Core/Datetime/FormattedDateDiff.php
+++ b/core/lib/Drupal/Core/Datetime/FormattedDateDiff.php
@@ -45,6 +45,7 @@ public function __construct($string, $max_age) {
 
   /**
    * @return string
+   *   The actual formatted time difference.
    */
   public function getString() {
     return $this->string;
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index 14ac6baf6948..2f0225aa08a8 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -845,7 +845,8 @@ protected function getContainerCacheKey() {
   /**
    * Returns the kernel parameters.
    *
-   * @return array An array of kernel parameters
+   * @return array
+   *   An associative array of kernel parameters
    */
   protected function getKernelParameters() {
     return [
@@ -857,6 +858,7 @@ protected function getKernelParameters() {
    * Initializes the service container.
    *
    * @return \Symfony\Component\DependencyInjection\ContainerInterface
+   *   An initialized container object.
    */
   protected function initializeContainer() {
     $this->containerNeedsDumping = FALSE;
@@ -1256,6 +1258,7 @@ public function invalidateContainer() {
    *   Container object
    *
    * @return \Symfony\Component\DependencyInjection\ContainerInterface
+   *   The container object with the kernel and the class loader added.
    */
   protected function attachSynthetic(ContainerInterface $container) {
     $persist = [];
@@ -1278,7 +1281,8 @@ protected function attachSynthetic(ContainerInterface $container) {
   /**
    * Compiles a new service container.
    *
-   * @return \Drupal\Core\DependencyInjection\ContainerBuilder The compiled service container
+   * @return \Drupal\Core\DependencyInjection\ContainerBuilder
+   *   The compiled service container
    */
   protected function compileContainer() {
     // We are forcing a container build so it is reasonable to assume that the
@@ -1408,6 +1412,7 @@ protected function initializeServiceProviders() {
    * Gets a new ContainerBuilder instance used to build the service container.
    *
    * @return \Drupal\Core\DependencyInjection\ContainerBuilder
+   *   The Drupal dependency injection container builder.
    */
   protected function getContainerBuilder() {
     return new ContainerBuilder(new ParameterBag($this->getKernelParameters()));
@@ -1441,6 +1446,7 @@ protected function cacheDrupalContainer(array $container_definition) {
    * Gets a http kernel from the container.
    *
    * @return \Symfony\Component\HttpKernel\HttpKernelInterface
+   *   The Symfony HTTP kernel service.
    */
   protected function getHttpKernel() {
     return $this->container->get('http_kernel');
@@ -1450,6 +1456,7 @@ protected function getHttpKernel() {
    * Returns the active configuration storage to use during building the container.
    *
    * @return \Drupal\Core\Config\StorageInterface
+   *   The configuration storage.
    */
   protected function getConfigStorage() {
     if (!isset($this->configStorage)) {
@@ -1469,6 +1476,8 @@ protected function getConfigStorage() {
    * Returns an array of Extension class parameters for all enabled modules.
    *
    * @return array
+   *   An associated array of module class parameters, keyed by module name, for
+   *   all enabled modules.
    */
   protected function getModulesParameter() {
     $extensions = [];
diff --git a/core/lib/Drupal/Core/DrupalKernelInterface.php b/core/lib/Drupal/Core/DrupalKernelInterface.php
index 621cebd42cbb..501f6bb2125d 100644
--- a/core/lib/Drupal/Core/DrupalKernelInterface.php
+++ b/core/lib/Drupal/Core/DrupalKernelInterface.php
@@ -98,6 +98,7 @@ public function getSitePath();
    * Gets the app root.
    *
    * @return string
+   *   The path of the application root.
    */
   public function getAppRoot();
 
@@ -118,6 +119,7 @@ public function updateModules(array $module_list, array $module_filenames = []);
    * Force a container rebuild.
    *
    * @return \Symfony\Component\DependencyInjection\ContainerInterface
+   *   The rebuilt Symfony container.
    */
   public function rebuildContainer();
 
@@ -125,6 +127,7 @@ public function rebuildContainer();
    * Force a container reset.
    *
    * @return \Symfony\Component\DependencyInjection\ContainerInterface
+   *   The Symfony container.
    */
   public function resetContainer(): ContainerInterface;
 
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
index ac8245174558..b7f5a1a9be79 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
@@ -603,6 +603,7 @@ public function get($field_name) {
    * Gets a translated field.
    *
    * @return \Drupal\Core\Field\FieldItemListInterface
+   *   The translated field.
    */
   protected function getTranslatedField($name, $langcode) {
     if ($this->translations[$this->activeLangcode]['status'] == static::TRANSLATION_REMOVED) {
diff --git a/core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php b/core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php
index 1e9dc258c662..8ec15d15f8b0 100644
--- a/core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php
+++ b/core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php
@@ -42,6 +42,7 @@ public function enhance(array $defaults, Request $request) {
    *   The current route.
    *
    * @return bool
+   *   TRUE when the route enhancer runs on the current route, FALSE otherwise.
    */
   protected function applies(Route $route) {
     return !$route->hasDefault('_controller') &&
diff --git a/core/lib/Drupal/Core/Entity/EntityBase.php b/core/lib/Drupal/Core/Entity/EntityBase.php
index 8e560f44d8a6..4e57bd926cf9 100644
--- a/core/lib/Drupal/Core/Entity/EntityBase.php
+++ b/core/lib/Drupal/Core/Entity/EntityBase.php
@@ -80,6 +80,7 @@ public function __construct(array $values, $entity_type) {
    * Gets the entity type manager.
    *
    * @return \Drupal\Core\Entity\EntityTypeManagerInterface
+   *   The entity type manager.
    */
   protected function entityTypeManager() {
     return \Drupal::entityTypeManager();
@@ -89,6 +90,7 @@ protected function entityTypeManager() {
    * Gets the entity type bundle info service.
    *
    * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface
+   *   The entity type bundle info service.
    */
   protected function entityTypeBundleInfo() {
     return \Drupal::service('entity_type.bundle.info');
@@ -98,6 +100,7 @@ protected function entityTypeBundleInfo() {
    * Gets the language manager.
    *
    * @return \Drupal\Core\Language\LanguageManagerInterface
+   *   The language manager service.
    */
   protected function languageManager() {
     return \Drupal::languageManager();
@@ -107,6 +110,7 @@ protected function languageManager() {
    * Gets the UUID generator.
    *
    * @return \Drupal\Component\Uuid\UuidInterface
+   *   The UUID service.
    */
   protected function uuidGenerator() {
     return \Drupal::service('uuid');
diff --git a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php
index d6c7b3a40632..5751b5f446be 100644
--- a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php
+++ b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php
@@ -433,6 +433,10 @@ protected function getFieldDefinitions() {
    *   A field definition.
    *
    * @return array|null
+   *   The array of display options for the field, or NULL if the field is not
+   *   displayed.
+   *
+   * @see \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions
    */
   private function fieldHasDisplayOptions(FieldDefinitionInterface $definition) {
     // The display only cares about fields that specify display options.
diff --git a/core/lib/Drupal/Core/Entity/EntityResolverManager.php b/core/lib/Drupal/Core/Entity/EntityResolverManager.php
index 0430a74f8b73..380bb6b67745 100644
--- a/core/lib/Drupal/Core/Entity/EntityResolverManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityResolverManager.php
@@ -231,6 +231,7 @@ public function setRouteOptions(Route $route) {
    * Gets the list of all entity types.
    *
    * @return \Drupal\Core\Entity\EntityTypeInterface[]
+   *   An array of the entity types.
    */
   protected function getEntityTypes() {
     if (!isset($this->entityTypes)) {
diff --git a/core/lib/Drupal/Core/Entity/EntityStorageBase.php b/core/lib/Drupal/Core/Entity/EntityStorageBase.php
index 3c057098d076..3d9a90f76200 100644
--- a/core/lib/Drupal/Core/Entity/EntityStorageBase.php
+++ b/core/lib/Drupal/Core/Entity/EntityStorageBase.php
@@ -248,6 +248,7 @@ public function create(array $values = []) {
    *   An array of values to set, keyed by property name.
    *
    * @return \Drupal\Core\Entity\EntityInterface
+   *   The created entity.
    */
   protected function doCreate(array $values) {
     $entity_class = $this->getEntityClass();
diff --git a/core/lib/Drupal/Core/Entity/EntityTypeEvent.php b/core/lib/Drupal/Core/Entity/EntityTypeEvent.php
index d31d6235ab2e..ae86e068ea6b 100644
--- a/core/lib/Drupal/Core/Entity/EntityTypeEvent.php
+++ b/core/lib/Drupal/Core/Entity/EntityTypeEvent.php
@@ -41,6 +41,7 @@ public function __construct(EntityTypeInterface $entity_type, ?EntityTypeInterfa
    * The entity type the event refers to.
    *
    * @return \Drupal\Core\Entity\EntityTypeInterface
+   *   The entity type.
    */
   public function getEntityType() {
     return $this->entityType;
@@ -50,6 +51,7 @@ public function getEntityType() {
    * The original entity type.
    *
    * @return \Drupal\Core\Entity\EntityTypeInterface
+   *   The original entity type.
    */
   public function getOriginal() {
     return $this->original;
diff --git a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php
index 6973d81e44ab..163373dc522e 100644
--- a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php
@@ -136,6 +136,7 @@ public function isStaticallyCacheable();
    * Indicates whether the rendered output of entities should be cached.
    *
    * @return bool
+   *   TRUE if the rendered output can be cached, FALSE otherwise.
    */
   public function isRenderCacheable();
 
@@ -148,6 +149,7 @@ public function isRenderCacheable();
    * persistent cache is available for the entity type.
    *
    * @return bool
+   *   TRUE if the persistent cache of field data is used, FALSE otherwise.
    */
   public function isPersistentlyCacheable();
 
@@ -266,6 +268,7 @@ public function hasFormClasses();
    * Indicates if this entity type has any route provider.
    *
    * @return bool
+   *   TRUE when this entity type has any route provider, FALSE otherwise.
    */
   public function hasRouteProviders();
 
@@ -275,6 +278,7 @@ public function hasRouteProviders();
    * Much like forms you can define multiple route provider handlers.
    *
    * @return string[]
+   *   An array of all the route provider handlers.
    */
   public function getRouteProviderClasses();
 
@@ -380,6 +384,8 @@ public function setHandlerClass($handler_type, $value);
    * checks.
    *
    * @return string|bool
+   *   The name of the administrative permission. Defaults to FALSE, if the
+   *   permission does not exist.
    */
   public function getAdminPermission();
 
@@ -429,6 +435,7 @@ public function getPermissionGranularity();
    * @link http://tools.ietf.org/html/rfc6570 @endlink
    *
    * @return array
+   *   An array of link templates using the URI template syntax.
    */
   public function getLinkTemplates();
 
@@ -534,6 +541,7 @@ public function isInternal();
    * this indicates translation support.
    *
    * @return bool
+   *   TRUE if the entity can be translated, FALSE otherwise.
    */
   public function isTranslatable();
 
@@ -549,6 +557,7 @@ public function showRevisionUi();
    * Indicates whether entities of this type have revision support.
    *
    * @return bool
+   *   TRUE if the entity has revision support, FALSE otherwise.
    */
   public function isRevisionable();
 
@@ -685,6 +694,7 @@ public function setUriCallback($callback);
    *    managed as part of the site's configuration.
    *
    * @return string
+   *   The machine name of the entity type group.
    */
   public function getGroup();
 
@@ -706,6 +716,7 @@ public function getGroupLabel();
    * entities listed than users of role B.
    *
    * @return string[]
+   *   An array of cache contexts associated with this entity type.
    */
   public function getListCacheContexts();
 
@@ -716,6 +727,7 @@ public function getListCacheContexts();
    * entities show up immediately.
    *
    * @return string[]
+   *   An array of the cache tags for this entity type.
    */
   public function getListCacheTags();
 
diff --git a/core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php
index 06f7f8e96925..9723026510eb 100644
--- a/core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php
@@ -79,6 +79,7 @@ public function getFormObject($entity_type_id, $operation);
    *   The entity type ID for the route providers.
    *
    * @return \Drupal\Core\Entity\Routing\EntityRouteProviderInterface[]
+   *   An array of all the route providers for this entity type.
    */
   public function getRouteProviders($entity_type_id);
 
@@ -139,6 +140,7 @@ public function createHandlerInstance($class, ?EntityTypeInterface $definition =
    *
    * @return \Drupal\Core\Entity\EntityTypeInterface|null
    */
+  // phpcs:ignore Drupal.Commenting.FunctionComment.MissingReturnComment
   public function getDefinition($entity_type_id, $exception_on_invalid = TRUE);
 
   /**
@@ -146,6 +148,7 @@ public function getDefinition($entity_type_id, $exception_on_invalid = TRUE);
    *
    * @return \Drupal\Core\Entity\EntityTypeInterface[]
    */
+  // phpcs:ignore Drupal.Commenting.FunctionComment.MissingReturnComment
   public function getDefinitions();
 
 }
diff --git a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
index 149ea3ca32ce..dc617f650bc5 100644
--- a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
+++ b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
@@ -173,6 +173,7 @@ public function viewMultiple(array $entities = [], $view_mode = 'full', $langcod
    *   The view mode that should be used.
    *
    * @return array
+   *   A build array with entity specific defaults added.
    */
   protected function getBuildDefaults(EntityInterface $entity, $view_mode) {
     // Allow modules to change the view mode.
@@ -501,6 +502,7 @@ public function viewFieldItem(FieldItemInterface $item, $display = []) {
    *   The display options passed to the viewField() method.
    *
    * @return \Drupal\Core\Entity\Display\EntityViewDisplayInterface
+   *   The EntityViewDisplay objects created for individual field rendering.
    */
   protected function getSingleFieldDisplay($entity, $field_name, $display_options) {
     if (is_string($display_options)) {
diff --git a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/BundleConstraint.php b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/BundleConstraint.php
index 367ab0692eda..ee1c82e30bfc 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/BundleConstraint.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/BundleConstraint.php
@@ -37,6 +37,7 @@ class BundleConstraint extends SymfonyConstraint {
    * Gets the bundle option as array.
    *
    * @return array
+   *   An array of bundle options.
    */
   public function getBundleOption() {
     // Support passing the bundle as string, but force it to be an array.
diff --git a/core/lib/Drupal/Core/Entity/Query/ConditionAggregateInterface.php b/core/lib/Drupal/Core/Entity/Query/ConditionAggregateInterface.php
index 3cdf00c971fd..df6aee79a3a2 100644
--- a/core/lib/Drupal/Core/Entity/Query/ConditionAggregateInterface.php
+++ b/core/lib/Drupal/Core/Entity/Query/ConditionAggregateInterface.php
@@ -49,6 +49,7 @@ public function condition($field, $function = NULL, $value = NULL, $operator = N
    *   the current content language.
    *
    * @return \Drupal\Core\Entity\Query\ConditionInterface
+   *   A condition testing for the existence of a field.
    *
    * @see \Drupal\Core\Entity\Query\QueryInterface::exists()
    */
@@ -66,6 +67,7 @@ public function exists($field, $function, $langcode = NULL);
    *   the current content language.
    *
    * @return \Drupal\Core\Entity\Query\ConditionInterface
+   *   A condition testing for the nonexistence of a field.
    *
    * @see \Drupal\Core\Entity\Query\QueryInterface::notExists()
    */
@@ -78,6 +80,7 @@ public function notExists($field, $function, $langcode = NULL);
    * data structure directly and manipulate it before it gets compiled.
    *
    * @return array
+   *   An array of all the conditions in the conditional clause.
    */
   public function &conditions();
 
diff --git a/core/lib/Drupal/Core/Entity/Query/ConditionInterface.php b/core/lib/Drupal/Core/Entity/Query/ConditionInterface.php
index c2893e64fdd7..8d47e8c967ef 100644
--- a/core/lib/Drupal/Core/Entity/Query/ConditionInterface.php
+++ b/core/lib/Drupal/Core/Entity/Query/ConditionInterface.php
@@ -79,6 +79,7 @@ public function notExists($field, $langcode = NULL);
    * data structure directly and manipulate it before it gets compiled.
    *
    * @return array
+   *   An array of all conditions in this conditional clause.
    */
   public function &conditions();
 
diff --git a/core/lib/Drupal/Core/Entity/Query/Sql/Query.php b/core/lib/Drupal/Core/Entity/Query/Sql/Query.php
index 65de824756c9..2dbaa445c08b 100644
--- a/core/lib/Drupal/Core/Entity/Query/Sql/Query.php
+++ b/core/lib/Drupal/Core/Entity/Query/Sql/Query.php
@@ -301,6 +301,8 @@ protected function getSqlField($field, $langcode) {
    * Determines whether the query requires GROUP BY and ORDER BY MIN/MAX.
    *
    * @return bool
+   *   TRUE if the query is a simple query which does not require GROUP BY and
+   *   ORDER BY MIN/MAX. Otherwise FALSE.
    */
   protected function isSimpleQuery() {
     return (!$this->pager && !$this->range && !$this->count) || $this->sqlQuery->getMetaData('simple_query');
diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
index 3b3abae2a04d..e5563cf8a38d 100644
--- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
+++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
@@ -131,6 +131,7 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Con
    * Gets the keyvalue collection for tracking the installed schema.
    *
    * @return \Drupal\Core\KeyValueStore\KeyValueStoreInterface
+   *   The key-value collection storage.
    *
    * @todo Inject this dependency in the constructor once this class can be
    *   instantiated as a regular entity handler:
diff --git a/core/lib/Drupal/Core/Entity/Sql/TableMappingInterface.php b/core/lib/Drupal/Core/Entity/Sql/TableMappingInterface.php
index d3971e66c2df..3cc39f0e5367 100644
--- a/core/lib/Drupal/Core/Entity/Sql/TableMappingInterface.php
+++ b/core/lib/Drupal/Core/Entity/Sql/TableMappingInterface.php
@@ -90,6 +90,7 @@ public function getExtraColumns($table_name);
    * Gets the list of columns that can not be used as field type columns.
    *
    * @return array
+   *   A list of column names prohibited from being used as a field type column.
    */
   public function getReservedColumns();
 
diff --git a/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php
index dec8dbf14017..bc85f19ecaf1 100644
--- a/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php
@@ -340,6 +340,7 @@ protected function validateDependencies(ConfigImporter $config_importer) {
    * Gets theme data.
    *
    * @return \Drupal\Core\Extension\Extension[]
+   *   Processed extension objects, keyed by machine name.
    */
   protected function getThemeData() {
     if (!isset($this->themeData)) {
diff --git a/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php
index de352305d37e..4a30c7d6e694 100644
--- a/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php
@@ -65,6 +65,7 @@ public function __construct(ConfigFactoryInterface $config_factory) {
    * Gets the configured error level.
    *
    * @return string
+   *   The error level. Defaults to the configure site error level.
    */
   protected function getErrorLevel() {
     if (!isset($this->errorLevel)) {
@@ -183,6 +184,7 @@ public static function getSubscribedEvents(): array {
    * Checks whether the error level is verbose or not.
    *
    * @return bool
+   *   TRUE when verbose reporting is enabled, FALSE otherwise.
    */
   protected function isErrorLevelVerbose() {
     return $this->getErrorLevel() === ERROR_REPORTING_DISPLAY_VERBOSE;
@@ -195,6 +197,7 @@ protected function isErrorLevelVerbose() {
    *   Optional error to examine for ERROR_REPORTING_DISPLAY_SOME.
    *
    * @return bool
+   *   TRUE if an error should be displayed, FALSE otherwise.
    *
    * @see \error_displayable
    */
diff --git a/core/lib/Drupal/Core/Extension/Extension.php b/core/lib/Drupal/Core/Extension/Extension.php
index f70d3f923ce5..28b584366154 100644
--- a/core/lib/Drupal/Core/Extension/Extension.php
+++ b/core/lib/Drupal/Core/Extension/Extension.php
@@ -81,6 +81,7 @@ public function __construct($root, $type, $pathname, $filename = NULL) {
    * Returns the type of the extension.
    *
    * @return string
+   *   The extension type. This is usually 'module' or 'theme'.
    */
   public function getType() {
     return $this->type;
@@ -90,6 +91,7 @@ public function getType() {
    * Returns the internal name of the extension.
    *
    * @return string
+   *   The machine name of the extension.
    */
   public function getName() {
     return basename($this->pathname, '.info.yml');
@@ -99,6 +101,7 @@ public function getName() {
    * Returns the relative path of the extension.
    *
    * @return string
+   *   The relative path of the extension.
    */
   public function getPath() {
     return dirname($this->pathname);
@@ -108,6 +111,7 @@ public function getPath() {
    * Returns the relative path and filename of the extension's info file.
    *
    * @return string
+   *   The relative path and filename of the extension's .info file.
    */
   public function getPathname() {
     return $this->pathname;
@@ -117,6 +121,7 @@ public function getPathname() {
    * Returns the filename of the extension's info file.
    *
    * @return string
+   *   The base name of the extension .info file.
    */
   public function getFilename() {
     return basename($this->pathname);
@@ -126,6 +131,7 @@ public function getFilename() {
    * Returns the relative path of the main extension file, if any.
    *
    * @return string|null
+   *   The relative path for the main extension file, usually the *.module file.
    */
   public function getExtensionPathname() {
     if ($this->filename) {
@@ -137,6 +143,7 @@ public function getExtensionPathname() {
    * Returns the name of the main extension file, if any.
    *
    * @return string|null
+   *   The filename of the main extension file, usually the *.module file.
    */
   public function getExtensionFilename() {
     return $this->filename;
diff --git a/core/lib/Drupal/Core/Extension/ExtensionList.php b/core/lib/Drupal/Core/Extension/ExtensionList.php
index 2cff427d7054..81ca3f8b8c05 100644
--- a/core/lib/Drupal/Core/Extension/ExtensionList.php
+++ b/core/lib/Drupal/Core/Extension/ExtensionList.php
@@ -148,6 +148,7 @@ public function __construct($root, $type, CacheBackendInterface $cache, InfoPars
    * Returns the extension discovery.
    *
    * @return \Drupal\Core\Extension\ExtensionDiscovery
+   *   The extension discovery.
    */
   protected function getExtensionDiscovery() {
     return new ExtensionDiscovery($this->root);
@@ -411,6 +412,8 @@ protected function recalculateInfo() {
    * Returns a list of extension file paths keyed by machine name.
    *
    * @return string[]
+   *   An associative array of extension file paths, keyed by the extension
+   *   machine name.
    */
   public function getPathNames() {
     if ($this->pathNames === NULL) {
diff --git a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php
index e0b56bb45d85..1d768a596a2b 100644
--- a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php
+++ b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php
@@ -404,6 +404,8 @@ public function alterDeprecated($description, $type, &$data, &$context1 = NULL,
    * directories.
    *
    * @return array
+   *   An associative array of the directories for all enabled modules, keyed by
+   *   the extension machine name.
    */
   public function getModuleDirectories();
 
diff --git a/core/lib/Drupal/Core/Extension/ModuleInstaller.php b/core/lib/Drupal/Core/Extension/ModuleInstaller.php
index 585638dc1ee1..700ad04445f7 100644
--- a/core/lib/Drupal/Core/Extension/ModuleInstaller.php
+++ b/core/lib/Drupal/Core/Extension/ModuleInstaller.php
@@ -810,8 +810,6 @@ protected function uninstallSchema(string $module): void {
    *   The name of the hook to invoke.
    * @param array $args
    *   Arguments to pass to the hook.
-   *
-   * @return void
    */
   protected function invokeAll($hook, $args = []): void {
     $this->moduleHandler->loadAll();
@@ -831,6 +829,8 @@ protected function invokeAll($hook, $args = []): void {
    *   Arguments to pass to the hook.
    *
    * @return mixed
+   *   The return value of the procedural hook. Defaults to NULL if a hook
+   *   function does not exist.
    */
   protected function invoke(string $module, string $hook, array $args = []): mixed {
     $function = $module . '_' . $hook;
diff --git a/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php b/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php
index 55fab77ee532..1bb3355e6adc 100644
--- a/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php
+++ b/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php
@@ -135,6 +135,8 @@ public function getDefault();
    * directories.
    *
    * @return array
+   *   An associative array containing the directory path for all installed
+   *   themes. The array is keyed by the theme name.
    */
   public function getThemeDirectories();
 
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index faffbfeccd88..39f75d81bcc6 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -66,10 +66,8 @@
   <rule ref="Drupal.Commenting.DocCommentLongArraySyntax"/>
   <rule ref="Drupal.Commenting.DocCommentStar"/>
   <rule ref="Drupal.Commenting.FileComment"/>
-
   <rule ref="Drupal.Commenting.FunctionComment">
     <exclude name="Drupal.Commenting.FunctionComment.Missing"/>
-    <exclude name="Drupal.Commenting.FunctionComment.MissingReturnComment"/>
     <exclude name="Drupal.Commenting.FunctionComment.ParamCommentFullStop"/>
     <exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
   </rule>
@@ -81,6 +79,9 @@
   <rule ref="Drupal.Commenting.FunctionComment.MissingParamType">
     <include-pattern>core/lib/Component/*</include-pattern>
   </rule>
+  <rule ref="Drupal.Commenting.FunctionComment.MissingReturnComment">
+    <include-pattern>core/lib/Drupal/Core/[a-e]*/*</include-pattern>
+  </rule>
   <rule ref="Drupal.Commenting.GenderNeutralComment"/>
   <rule ref="Drupal.Commenting.HookComment"/>
   <rule ref="Drupal.Commenting.InlineComment">
-- 
GitLab