diff --git a/core/lib/Drupal/Core/Access/CheckProviderInterface.php b/core/lib/Drupal/Core/Access/CheckProviderInterface.php index 35e3c18b822acc0eac5ab01eb5dfbc2c90b9c64d..59ccf9f997deaa55f56f21d2239186ee8aa19475 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 a4a497da50e31b71c6a0eb5fd99a2fa64e2ead1c..a5e57d4fa88fe17c726045aaf5df970695287a11 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 efd4235c25de5de9d7c9524678c454a71ab39f0d..45fe3c67c70f2acdff20b47736b14d34d1f81e27 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 64f7d7b497d137f79aa054a8243f2415c3b9f1cf..09507b1ad414a12f357d1f4faad665e0a3c1d187 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 c100264ad309a67049e46cbad736ff832eafc5eb..18dec5904d96fec32520708a9905a37639090434 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 55474a1cdb13c37089f3315db3a95c1484769f66..1701061911a661cd45f59007135af4b13a2c7f6b 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 fc1906ad938ae42c885b12eefdccf0387aa2f9ee..bd1614af266c6778d7e0efa7c4d26038fe46f46d 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 3d21189eccf2201af0dd1697be4de953f0f45163..cf1f33e55295a0ecab1a9cf078aa05856425e06e 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 247e79f3ef09ffafcea9a7ee46c3e9d4c430130b..6ed437f27e0f4a0af9f30eb4d11aa0d6ae1aa1b3 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 cbac2d1be0a3eecd9bcf7a0f10cf00d596e84003..913268a57f0238e8a767cba539189c2eb3974315 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 8b45010914fef5a96c04b1a1b7eacb34c23c5b6b..48f9c5788908d06b7466150964564808e43d7806 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 52b7202982fa516da39aa520659899aa47c6639d..afd3f22ffc7137c01c3cd005dadcf18ea9a99364 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 fca703f4df47e8fa1ffbb84d31d3f82e14ad1456..c333c8a00c9b5b73d2bfcb97fa00b68cc01175ed 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 ed61dcfdd8e49836169161497b2cbc16bc0a9b31..48aac09208f741a09284e526a49b190e01efa46d 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 d92f46c364bfea2b3cac2e86f21936b49796f8a4..57d8916b7f8a48cae9e5acf71f41fbe1162c15e7 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 4717cd997afd409239eaa402b42149d09698c7a0..c9a0c11499d2368e885cc50266bcdaf106b6038c 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 4717286a90634dea4452c2e0bae1a58699d7f229..aa7485c9d17933a76ecca7baa2c2cb09c59ee8d4 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 dd3af0b07ddfff85e5685012035b8dae6475a608..a6e01f4924cd67c88520e9d5b57ce68d5b3b2f63 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 63048bd753391a06b79139f1bf3e2162f50bfd0d..d2e2bb005fd7b85ffdccebb04828eaf11f62ea32 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 8320888608146081befe77892156abb6874fdd80..2dc69635dd13032bb97eea8b5ea8ede13690a23f 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 c9a25bd19a1e7d62b2969825049cdd94abda5303..1211ad9e7ff98824062d939802e42fde64068404 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 bcee9c5e044b4bd3ddf7e0efea3ec3cde5605f81..d03c5dbb6703d1f46415e55a541694066b7bc25e 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 a7a2abe65e97d8f6c45d2b372725d51e239903db..f63a6a7ab6e18185287533025a5c3941138f035c 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 fc7eb5e1f3de70ec5fcfdc44700af3ffa4b3e274..8e1f285466a480d9d3105fb39a6f25a8f26c1bbf 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 b45ba36f0b37246a6563d484108cb4842f2d960a..a183702f9d70fac7ad46728843a367310a881d80 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 9eb649be771e4df2cb745a050143f246a8c20ab2..51b65d07fa5dd7073607f83ef0b15ebbb15fe83d 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 313914eb1268d90b551dbc90861f733698f85880..3f555e0a081fb989e3e1bbc83f2d5acb71a74426 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 b928df3eebe4ef2fe4ba1fda8885e69b5a23644d..9d5ff5a3e4ec61b6101b4b32d85f88c4e93f4725 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 750f8f4f5e5a3c35d9ed371bde698fe049787975..46562c76d9ac7cebc9cc098eaae68e6e28620dbe 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 a2a1fa5d38e6b5e10d8eb0048fd1bfa654fd4912..9d183987c2172e3ac87e0bf7801bd7c6670c7bb4 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 a164eb9b8e17a9ef2997f775e075a100037e2740..57430aa699ffd6cde11fdc508ea384c6e3ad856f 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 830d923b29365c99716433bf41d34c4afdf7f21c..789725b00f53337a7099d00495605b82e16a5cf0 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 a7cf6a6ff38bb90c447af7aaf286dd0e3a8125fe..92751cef43256067996b30b0674a63f836164b64 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 01815f2c45a830658c1f74926f1229c53a3f1e66..673ac1d9be15488359cfd06c7274582826453ec8 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 c94ecfa58c3f56e7722031a1d00b9ccc405d6910..71d5b839a992dc3f944f839fdba0ea63ff0cee19 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 142981253a41bc3d0e7a6c850417863b8f9e9e14..f9a3a84e202d6eb94670eea6ad3826410e71fad1 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 14ac6baf6948fa9a1b8eaca78b4cf7c1fb023dda..2f0225aa08a8fd566c956c763488c55466186de0 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 621cebd42cbbf3cfb8b67a0a6650012687de0137..501f6bb2125d6d60d1d525c1d16c243eea1ab95a 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 ac82451745580484d2c71269d6074d7f306781ab..b7f5a1a9be79c3d34746af0e0a43d412a160f57a 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 1e9dc258c6620742e98a16fc90c346d3da044e68..8ec15d15f8b0d677c50b3395298d73ba84d4896c 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 8e560f44d8a655293a21a412fe694acbe6e9edfb..4e57bd926cf94e33751476cf3b9208f73cff99c1 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 d6c7b3a40632b33948386ad2c9ef459e151845fd..5751b5f446be3d496a049f19a4f851cefbddce6e 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 0430a74f8b7342b08456378c6e37fe4810e407b0..380bb6b677455a46a602ddac11345ba65410b578 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 3c057098d07641dac327b33bae765013efe8714c..3d9a90f7620032ae015cbfa9e61fb1f7c13fff88 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 d31d6235ab2e93ea6b3566273007b5892c628fe8..ae86e068ea6bdd056ef6455013aa8fce51866dd5 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 6973d81e44ab97f6b675595892d058b12e191a5c..163373dc522e271dc33d6d75a32b1bf405a19c01 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 06f7f8e96925bf4ba57f83b445b0b8552ebda485..9723026510ebed5e7c3165297b0f4043cd3e9855 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 149ea3ca32ce1ae6e08a07df460af457a940bd39..dc617f650bc55d751967d45b3e85d03550376d8a 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 367ab0692edae2ceefa3a9999cd4619a6dca8ce6..ee1c82e30bfc1e5bed58bafe1cd673ea8f1695d4 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 3cdf00c971fdafc979a632d5395349eb3c5c33c0..df6aee79a3a25a9ed2d664700e0a6d9dfa091d19 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 c2893e64fdd7697949d3fcb63516b973b934cd67..8d47e8c967ef87d8ed773cf5c3807677d9ccdba0 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 65de824756c93ff5371d06e9376b758727104ee1..2dbaa445c08b1f1bfe3c8f6d59099ed065d367e0 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 3b3abae2a04d0646681da85643a71a0c3885be79..e5563cf8a38dac44b7c9fad1ae8dcf22cd8c5f51 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 d3971e66c2dfa2a45a9c06b3c2a8e165ee33fb08..3cc39f0e53678d884471e2cb97ad5cd22d009363 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 dec8dbf14017a1cbc8bcd05c88e2034824dd89b0..bc85f19ecaf10da061d8288af40eb9a671ae55e9 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 de352305d37e33c0b3728bc1cbe3a30d6a1c12c0..4a30c7d6e6945dc294eb57c27bd733b60a36789e 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 f70d3f923ce5186af6b96f6c6fa8849caed74f52..28b58436615458a07b9c9b55e3714b4137180817 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 2cff427d7054a908ec1061259c1f97da61c46227..81ca3f8b8c05d7dea2a66e5967754ef4b64f0132 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 e0b56bb45d853c117b2e3b31dc55f3a1e04e616f..1d768a596a2be5295b98b68a907f4877dab252e1 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 585638dc1ee13c13a934ed3655771e9f2b998b51..700ad04445f779fd2e6bcdd5d564dbacf2d3ea37 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 55fab77ee53270b176a605ceb18e649338c4c770..1bb3355e6adc032dbf4d7e42978f76094a88f41b 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 faffbfeccd88f86f8ebf7a6c27b22e62c39edf29..39f75d81bcc633bb8d8b22289bf365c827148030 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">