From b8ac0d985059fef7c6452c35371b00f81d512230 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Tue, 27 Sep 2022 10:58:26 +0100
Subject: [PATCH] Issue #2941148 by quietone, bruno.bicudo, ravi.shankar,
 Sweetchuck, beatrizrodrigues, lucienchalom, VitaliyB98, WagnerMelo, sophiavs,
 ankitjain28may, daffie, longwave, Sutharsan, borisson_, cosmicdreams,
 heykarthikwithu, catch: Fix
 Drupal.Commenting.FunctionComment.MissingReturnType

---
 core/includes/common.inc                      |  6 ++--
 core/includes/errors.inc                      |  2 +-
 core/includes/form.inc                        |  4 +--
 core/includes/install.core.inc                | 35 +++++++++----------
 core/includes/install.inc                     | 22 ++++++------
 core/includes/module.inc                      |  2 +-
 core/includes/theme.inc                       |  8 ++---
 core/includes/update.inc                      | 14 ++++----
 .../lib/Drupal/Component/Gettext/PoHeader.php |  8 +++--
 .../Component/Gettext/PoStreamInterface.php   |  2 +-
 .../Component/Gettext/PoStreamReader.php      |  9 ++---
 core/lib/Drupal/Component/Graph/Graph.php     |  2 +-
 .../Drupal/Component/Utility/UrlHelper.php    |  2 +-
 .../Drupal/Component/Uuid/UuidInterface.php   |  2 +-
 core/lib/Drupal/Core/Asset/CssOptimizer.php   |  6 ++--
 .../Config/Entity/ConfigDependencyManager.php |  2 +-
 core/lib/Drupal/Core/Database/Connection.php  |  4 +--
 core/lib/Drupal/Core/Database/Log.php         |  4 +--
 .../Database/Query/AlterableInterface.php     |  8 ++---
 .../Database/Query/ConditionInterface.php     |  4 +--
 .../lib/Drupal/Core/Database/Query/Insert.php |  2 +-
 core/lib/Drupal/Core/Database/Query/Merge.php |  3 +-
 .../Database/Query/PlaceholderInterface.php   |  2 +-
 .../Core/Database/Query/SelectInterface.php   | 32 ++++++++---------
 .../Drupal/Core/Database/Query/Truncate.php   |  4 ++-
 .../lib/Drupal/Core/Database/Query/Update.php |  2 +-
 core/lib/Drupal/Core/Database/Schema.php      | 20 +++++------
 .../Core/Database/StatementInterface.php      | 20 +++++------
 .../Drupal/Core/Datetime/Element/Datelist.php |  2 +-
 .../Core/Entity/EntityStorageInterface.php    |  2 +-
 .../Entity/EntityViewBuilderInterface.php     |  2 +-
 .../Core/Entity/RevisionableInterface.php     |  2 +-
 .../FinalExceptionSubscriber.php              |  2 +-
 .../Core/Extension/ModuleHandlerInterface.php |  2 +-
 core/lib/Drupal/Core/Extension/module.api.php | 10 +++---
 core/lib/Drupal/Core/File/file.api.php        |  2 +-
 core/lib/Drupal/Core/Flood/FloodInterface.php |  2 +-
 core/lib/Drupal/Core/Queue/DatabaseQueue.php  |  2 +-
 core/lib/Drupal/Core/Queue/QueueInterface.php |  4 +--
 .../Drupal/Core/Render/Element/Details.php    |  2 +-
 .../OutboundRouteProcessorInterface.php       |  3 --
 core/lib/Drupal/Core/Utility/ProjectInfo.php  |  2 +-
 .../lib/Drupal/Core/Utility/ThemeRegistry.php |  2 +-
 core/lib/Drupal/Core/Utility/token.api.php    |  2 +-
 core/modules/book/book.module                 |  2 +-
 .../modules/book/src/BookManagerInterface.php |  2 +-
 .../content_translation.module                |  2 +-
 .../ContentTranslationUITestBase.php          |  2 +-
 .../modules/field_test/field_test.module      |  2 +-
 .../tests/src/Functional/FieldTestBase.php    |  2 +-
 .../tests/src/Kernel/FieldKernelTestBase.php  |  2 +-
 .../file/tests/file_test/file_test.module     |  2 +-
 .../forum/src/ForumManagerInterface.php       |  2 +-
 core/modules/image/image.module               |  2 +-
 .../src/Driver/Database/mysql/Schema.php      |  4 +--
 core/modules/node/node.api.php                |  2 +-
 core/modules/node/node.module                 |  4 +--
 core/modules/path_alias/src/AliasManager.php  |  3 --
 core/modules/shortcut/shortcut.module         |  4 +--
 .../src/Driver/Database/sqlite/Schema.php     |  4 +--
 core/modules/system/src/SystemManager.php     |  2 +-
 core/modules/system/system.module             |  7 ++--
 .../src/Functional/Cache/CacheTestBase.php    |  2 +-
 .../src/Functional/Mail/HtmlToTextTest.php    |  2 +-
 .../Functional/Session/SessionHttpsTest.php   |  4 +--
 core/modules/text/text.module                 |  2 +-
 core/modules/toolbar/toolbar.api.php          |  2 +-
 core/modules/update/update.api.php            |  2 +-
 core/modules/update/update.compare.inc        |  2 +-
 core/modules/update/update.install            |  2 +-
 core/modules/update/update.manager.inc        |  4 +--
 core/modules/update/update.module             | 12 +++----
 .../src/Plugin/views/ViewsPluginInterface.php |  2 +-
 .../views/argument/ArgumentPluginBase.php     |  7 ++--
 .../views/display/DisplayPluginInterface.php  |  4 +--
 .../Plugin/views/field/FieldPluginBase.php    |  2 +-
 .../Plugin/views/query/QueryPluginBase.php    |  2 +-
 .../views/src/Plugin/views/query/Sql.php      |  2 +-
 .../views/src/Plugin/views/style/Rss.php      |  2 +-
 .../Plugin/views/style/StylePluginBase.php    |  2 +-
 .../Plugin/views/wizard/WizardPluginBase.php  |  2 +-
 core/modules/views/src/Views.php              |  2 +-
 core/modules/views_ui/admin.inc               |  2 +-
 core/modules/views_ui/src/ViewUI.php          |  2 +-
 core/phpcs.xml.dist                           |  1 -
 .../Core/Cache/DatabaseBackendTest.php        |  2 +-
 .../Core/Cache/MemoryBackendTest.php          |  2 +-
 .../KernelTests/Core/Cache/PhpBackendTest.php |  4 +--
 .../KernelTests/Core/File/FileTestBase.php    |  6 ++--
 89 files changed, 197 insertions(+), 207 deletions(-)

diff --git a/core/includes/common.inc b/core/includes/common.inc
index d122df311328..c866f7217063 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -360,7 +360,7 @@ function drupal_attach_tabledrag(&$element, array $options) {
  * @param $element
  *   The element to be hidden.
  *
- * @return
+ * @return array
  *   The element.
  *
  * @see \Drupal\Core\Render\RendererInterface
@@ -390,7 +390,7 @@ function hide(&$element) {
  * @param $element
  *   The element to be shown.
  *
- * @return
+ * @return array
  *   The element.
  *
  * @see \Drupal\Core\Render\RendererInterface
@@ -564,7 +564,7 @@ function drupal_get_updaters() {
 /**
  * Assembles the Drupal FileTransfer registry.
  *
- * @return
+ * @return array
  *   The Drupal FileTransfer class registry.
  *
  * @see \Drupal\Core\FileTransfer\FileTransfer
diff --git a/core/includes/errors.inc b/core/includes/errors.inc
index a4bffb2f3b11..4bf4fade14ca 100644
--- a/core/includes/errors.inc
+++ b/core/includes/errors.inc
@@ -113,7 +113,7 @@ function _drupal_error_handler_real($error_level, $message, $filename, $line) {
  * @param $error
  *   Optional error to examine for ERROR_REPORTING_DISPLAY_SOME.
  *
- * @return
+ * @return bool
  *   TRUE if an error should be displayed.
  */
 function error_displayable($error = NULL) {
diff --git a/core/includes/form.inc b/core/includes/form.inc
index 5959b598e8ed..4f353d008826 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -156,7 +156,7 @@ function form_select_options($element, $choices = NULL) {
  * @param $key
  *   The key to look for.
  *
- * @return
+ * @return array|bool
  *   An array of indexes that match the given $key. Array will be
  *   empty if no elements were found. FALSE if optgroups were found.
  */
@@ -1011,7 +1011,7 @@ function _batch_populate_queue(&$batch, $set_id) {
  * @param $batch_set
  *   The batch set.
  *
- * @return
+ * @return \Drupal\Core\Queue\QueueInterface|null
  *   The queue object.
  */
 function _batch_queue($batch_set) {
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index d947254701b9..c9b49f5d9bd9 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -549,7 +549,7 @@ function install_begin_request($class_loader, &$install_state) {
  *   (optional) A callback to allow command line processes to update a progress
  *   bar. The callback is passed the $install_state variable.
  *
- * @return
+ * @return array|null
  *   HTML output from the last completed task.
  */
 function install_run_tasks(&$install_state, callable $callback = NULL) {
@@ -606,7 +606,7 @@ function install_run_tasks(&$install_state, callable $callback = NULL) {
  *   An array of information about the current installation state. This is
  *   passed in by reference so that it can be modified by the task.
  *
- * @return
+ * @return array|null
  *   The output of the task function, if there is any.
  */
 function install_run_task($task, &$install_state) {
@@ -709,7 +709,7 @@ function install_run_task($task, &$install_state) {
  * @param $install_state
  *   An array of information about the current installation state.
  *
- * @return
+ * @return array
  *   A list of tasks to be performed, with associated metadata.
  */
 function install_tasks_to_perform($install_state) {
@@ -745,7 +745,7 @@ function install_tasks_to_perform($install_state) {
  * @param $install_state
  *   An array of information about the current installation state.
  *
- * @return
+ * @return array
  *   A list of tasks, with associated metadata as returned by
  *   hook_install_tasks().
  */
@@ -906,7 +906,7 @@ function install_tasks($install_state) {
  * @param $install_state
  *   An array of information about the current installation state.
  *
- * @return
+ * @return array
  *   A list of tasks, with keys equal to the machine-readable task name and
  *   values equal to the name that should be displayed.
  *
@@ -979,7 +979,7 @@ function install_get_form($form_id, array &$install_state) {
  * @param $install_state
  *   An array of information about the current installation state.
  *
- * @return
+ * @return string
  *   The URL to redirect to.
  *
  * @see install_full_redirect_url()
@@ -994,7 +994,7 @@ function install_redirect_url($install_state) {
  * @param $install_state
  *   An array of information about the current installation state.
  *
- * @return
+ * @return string
  *   The complete URL to redirect to.
  *
  * @see install_redirect_url()
@@ -1072,7 +1072,7 @@ function install_display_output($output, $install_state) {
  * @param $install_state
  *   An array of information about the current installation state.
  *
- * @return
+ * @return array
  *   A themed status report, or an exception if there are requirement errors.
  */
 function install_verify_requirements(&$install_state) {
@@ -1118,7 +1118,7 @@ function install_base_system(&$install_state) {
 /**
  * Verifies and returns the last installation task that was completed.
  *
- * @return
+ * @return null|string
  *   The last completed task, if there is one. An exception is thrown if Drupal
  *   is already installed.
  */
@@ -1222,7 +1222,7 @@ function install_database_errors($database, $settings_file) {
  *   profile will be added here, if it was not already selected previously, as
  *   will a list of all available profiles.
  *
- * @return
+ * @return array|null
  *   For interactive installations, a form allowing the profile to be selected,
  *   if the user has a choice that needs to be made. Otherwise, an exception is
  *   thrown if a profile cannot be chosen automatically.
@@ -1310,7 +1310,7 @@ function _install_select_profile(&$install_state) {
 /**
  * Finds all .po files that are useful to the installer.
  *
- * @return
+ * @return array
  *   An associative array of file URIs keyed by language code. URIs as
  *   returned by FileSystemInterface::scanDirectory().
  *
@@ -1341,7 +1341,7 @@ function install_find_translations() {
  *   langcode will be added here, if it was not already selected previously, as
  *   will a list of all available languages.
  *
- * @return
+ * @return array|null
  *   For interactive installations, a form or other page output allowing the
  *   language to be selected or providing information about language selection,
  *   if a language has not been chosen. Otherwise, an exception is thrown if a
@@ -1558,7 +1558,7 @@ function install_bootstrap_full() {
  * @param $install_state
  *   An array of information about the current installation state.
  *
- * @return
+ * @return array
  *   The batch definition.
  */
 function install_profile_modules(&$install_state) {
@@ -1667,7 +1667,7 @@ function install_install_profile(&$install_state) {
  * @param $install_state
  *   An array of information about the current installation state.
  *
- * @return
+ * @return array
  *   The batch definition, if there are language files to download.
  */
 function install_download_additional_translations_operations(&$install_state) {
@@ -1718,7 +1718,7 @@ function install_download_additional_translations_operations(&$install_state) {
  * @param $install_state
  *   An array of information about the current installation state.
  *
- * @return
+ * @return array|null
  *   The batch definition, if there are language files to import.
  */
 function install_import_translations(&$install_state) {
@@ -1848,9 +1848,6 @@ function install_finish_translations(&$install_state) {
  *
  * @param $install_state
  *   An array of information about the current installation state.
- *
- * @return
- *   A message informing the user that the installation is complete.
  */
 function install_finished(&$install_state) {
   $profile = $install_state['parameters']['profile'];
@@ -2260,7 +2257,7 @@ function install_check_requirements($install_state) {
  *   An array of requirements, in the same format as is returned by
  *   hook_requirements().
  *
- * @return
+ * @return array|null
  *   A themed status report, or an exception if there are requirement errors.
  *   If there are only requirement warnings, a themed status report is shown
  *   initially, but the user is allowed to bypass it by providing 'continue=1'
diff --git a/core/includes/install.inc b/core/includes/install.inc
index 06d9500a99b4..63b5ee558999 100644
--- a/core/includes/install.inc
+++ b/core/includes/install.inc
@@ -93,7 +93,7 @@ function drupal_load_updates() {
 /**
  * Loads the installation profile, extracting its defined distribution name.
  *
- * @return
+ * @return string
  *   The distribution name defined in the profile's .info.yml file. Defaults to
  *   "Drupal" if none is explicitly provided by the installation profile.
  *
@@ -145,7 +145,7 @@ function drupal_install_profile_distribution_version() {
 /**
  * Detects all supported databases that are compiled into PHP.
  *
- * @return
+ * @return array
  *   An array of database types compiled into PHP.
  */
 function drupal_detect_database_types() {
@@ -529,7 +529,7 @@ function _drupal_rewrite_settings_dump_one(\stdClass $variable, $prefix = '', $s
  * @param $install_state
  *   An array of information about the current installation state.
  *
- * @return
+ * @return array
  *   The list of modules to install.
  */
 function drupal_verify_profile($install_state) {
@@ -663,7 +663,7 @@ function drupal_install_system($install_state) {
  *   (optional) Determines whether to attempt fixing the permissions according
  *   to the provided $mask. Defaults to TRUE.
  *
- * @return
+ * @return bool
  *   TRUE on success or FALSE on failure. A message is set for the latter.
  */
 function drupal_verify_install_file($file, $mask = NULL, $type = 'file', $autofix = TRUE) {
@@ -752,7 +752,7 @@ function drupal_verify_install_file($file, $mask = NULL, $type = 'file', $autofi
  * @param $message
  *   (optional) Whether to output messages. Defaults to TRUE.
  *
- * @return
+ * @return bool
  *   TRUE/FALSE whether or not the directory was successfully created.
  */
 function drupal_install_mkdir($file, $mask, $message = TRUE) {
@@ -803,7 +803,7 @@ function drupal_install_mkdir($file, $mask, $message = TRUE) {
  * @param $message
  *   (optional) Whether to output messages. Defaults to TRUE.
  *
- * @return
+ * @return bool
  *   TRUE/FALSE whether or not we were able to fix the file's permissions.
  */
 function drupal_install_fix_file($file, $mask, $message = TRUE) {
@@ -906,7 +906,7 @@ function install_goto($path) {
  * @param $query
  *   (optional) An array of query parameters to merge in to the existing ones.
  *
- * @return
+ * @return string
  *   The URL of the current script, with query parameters modified by the
  *   passed-in $query. The URL is not sanitized, so it still needs to be run
  *   through \Drupal\Component\Utility\UrlHelper::filterBadProtocol() if it will be
@@ -935,7 +935,7 @@ function drupal_current_script_url($query = []) {
  *   The severity of the requirements problem, as returned by
  *   drupal_requirements_severity().
  *
- * @return
+ * @return string
  *   A URL for attempting to proceed to the next step of the script. The URL is
  *   not sanitized, so it still needs to be run through
  *   \Drupal\Component\Utility\UrlHelper::filterBadProtocol() if it will be used
@@ -1010,7 +1010,7 @@ function drupal_check_profile($profile) {
  *   An array of requirements, in the same format as is returned by
  *   hook_requirements().
  *
- * @return
+ * @return int
  *   The highest severity in the array.
  */
 function drupal_requirements_severity(&$requirements) {
@@ -1029,7 +1029,7 @@ function drupal_requirements_severity(&$requirements) {
  * @param $module
  *   Machine name of module to check.
  *
- * @return
+ * @return bool
  *   TRUE or FALSE, depending on whether the requirements are met.
  */
 function drupal_check_module($module) {
@@ -1107,7 +1107,7 @@ function drupal_check_module($module) {
  * @param $langcode
  *   Language code (if any).
  *
- * @return
+ * @return array
  *   The info array.
  */
 function install_profile_info($profile, $langcode = 'en') {
diff --git a/core/includes/module.inc b/core/includes/module.inc
index 0f9aff758c99..c938a17df99e 100644
--- a/core/includes/module.inc
+++ b/core/includes/module.inc
@@ -29,7 +29,7 @@
  *   (optional) The base file name (without the $type extension). If omitted,
  *   $module is used; i.e., resulting in "$module.$type" by default.
  *
- * @return string|false
+ * @return bool|string
  *   The name of the included file, if successful; FALSE otherwise.
  *
  * @deprecated in drupal:9.4.0 and is removed from drupal:11.0.0.
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index f235cbf20767..c054cfbacf39 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -84,7 +84,7 @@
  *   ArrayObject which allows it to be accessed with array syntax and isset(),
  *   and should be more lightweight than the full registry. Defaults to TRUE.
  *
- * @return
+ * @return array|\Drupal\Core\Utility\ThemeRegistry
  *   The complete theme registry array, or an instance of the
  *   Drupal\Core\Utility\ThemeRegistry class.
  */
@@ -245,7 +245,7 @@ function drupal_find_theme_templates($cache, $extension, $path) {
  * @param $theme
  *   The name of a given theme; defaults to the current theme.
  *
- * @return
+ * @return mixed
  *   The value of the requested setting, NULL if the setting does not exist.
  */
 function theme_get_setting($setting_name, $theme = NULL) {
@@ -414,7 +414,7 @@ function theme_render_and_autoescape($arg) {
  * @param \Drupal\Core\Config\Config $config
  *   The configuration object to update.
  *
- * @return
+ * @return \Drupal\Core\Config\Config
  *   The Config object with updated data.
  */
 function theme_settings_convert_to_config(array $theme_settings, Config $config) {
@@ -1397,7 +1397,7 @@ function template_preprocess_page(&$variables) {
  *   of '__' is appropriate for theme hook suggestions. '-' is appropriate for
  *   extra classes.
  *
- * @return
+ * @return array
  *   An array of suggestions, suitable for adding to
  *   hook_theme_suggestions_HOOK_alter() or to $variables['attributes']['class']
  *   if the suggestions represent extra CSS classes.
diff --git a/core/includes/update.inc b/core/includes/update.inc
index 2f0f298e9923..5aaeaaeb8a5f 100644
--- a/core/includes/update.inc
+++ b/core/includes/update.inc
@@ -275,7 +275,7 @@ function update_invoke_post_update($function, &$context) {
 /**
  * Returns a list of all the pending database updates.
  *
- * @return
+ * @return array
  *   An associative array keyed by module name which contains all information
  *   about database updates that need to be run, and any updates that are not
  *   going to proceed due to missing requirements. The system module will
@@ -393,7 +393,7 @@ function update_get_update_list() {
  *   and whose values contain the number of the first requested update for that
  *   module.
  *
- * @return
+ * @return array
  *   An array whose keys are the names of all update functions within the
  *   provided modules that would need to be run in order to fulfill the
  *   request, arranged in the order in which the update functions should be
@@ -459,7 +459,7 @@ function update_resolve_dependencies($starting_updates) {
  *   An array whose keys contain the names of modules and whose values contain
  *   the number of the first requested update for that module.
  *
- * @return
+ * @return array
  *   An array containing all the update functions that should be run for each
  *   module, including the provided starting update and all subsequent updates
  *   that are available. The keys of the array contain the module names, and
@@ -517,7 +517,7 @@ function update_get_update_function_list($starting_updates) {
  *   An organized array of update functions, in the format returned by
  *   update_get_update_function_list().
  *
- * @return
+ * @return array
  *   A multidimensional array representing the dependency graph, suitable for
  *   passing in to Drupal\Component\Graph\Graph::searchAndSort(), but with extra
  *   information about each update function also included. Each array key
@@ -585,7 +585,7 @@ function update_build_dependency_graph($update_functions) {
  *   update_get_update_function_list(). This should represent all module
  *   updates that are requested to run at the time this function is called.
  *
- * @return
+ * @return bool
  *   TRUE if the provided module update is not installed or is not in the
  *   provided list of updates to run; FALSE otherwise.
  */
@@ -601,7 +601,7 @@ function update_is_missing($module, $number, $update_functions) {
  * @param $number
  *   The number of the update within that module.
  *
- * @return
+ * @return bool
  *   TRUE if the database schema indicates that the update has already been
  *   performed; FALSE otherwise.
  */
@@ -617,7 +617,7 @@ function update_already_performed($module, $number) {
  * its hook, only that it be installed. This allows the update system to
  * properly perform updates even on modules that are currently disabled.
  *
- * @return
+ * @return array
  *   An array of return values obtained by merging the results of the
  *   hook_update_dependencies() implementations in all installed modules.
  *
diff --git a/core/lib/Drupal/Component/Gettext/PoHeader.php b/core/lib/Drupal/Component/Gettext/PoHeader.php
index 8bc912d3bd99..a54377aa53c5 100644
--- a/core/lib/Drupal/Component/Gettext/PoHeader.php
+++ b/core/lib/Drupal/Component/Gettext/PoHeader.php
@@ -183,10 +183,11 @@ public function __toString() {
    * @param string $pluralforms
    *   The Plural-Forms entry value.
    *
-   * @return
+   * @return array|bool
    *   An indexed array of parsed plural formula data. Containing:
    *   - 'nplurals': The number of plural forms defined by the plural formula.
    *   - 'plurals': Array of plural positions keyed by plural value.
+   *   False when there is no plural string.
    *
    * @throws \Exception
    */
@@ -270,8 +271,9 @@ private function parseHeader($header) {
    * @param string $string
    *   A string containing the arithmetic formula.
    *
-   * @return
-   *   A stack of values and operations to be evaluated.
+   * @return array|bool
+   *   A stack of values and operations to be evaluated. False if the formula
+   *   could not be parsed.
    */
   private function parseArithmetic($string) {
     // Operator precedence table.
diff --git a/core/lib/Drupal/Component/Gettext/PoStreamInterface.php b/core/lib/Drupal/Component/Gettext/PoStreamInterface.php
index 33534ecafb11..599929912947 100644
--- a/core/lib/Drupal/Component/Gettext/PoStreamInterface.php
+++ b/core/lib/Drupal/Component/Gettext/PoStreamInterface.php
@@ -23,7 +23,7 @@ public function close();
   /**
    * Gets the URI of the PO stream that is being read or written.
    *
-   * @return
+   * @return string
    *   URI string for this stream.
    */
   public function getURI();
diff --git a/core/lib/Drupal/Component/Gettext/PoStreamReader.php b/core/lib/Drupal/Component/Gettext/PoStreamReader.php
index 9b4442606684..87f50601e629 100644
--- a/core/lib/Drupal/Component/Gettext/PoStreamReader.php
+++ b/core/lib/Drupal/Component/Gettext/PoStreamReader.php
@@ -237,7 +237,7 @@ private function readHeader() {
    * indicated by MSGSTR or MSGSTR_ARR followed immediately by an MSGID or
    * MSGCTXT (when items closely follow each other).
    *
-   * @return
+   * @return bool|null
    *   FALSE if an error was logged, NULL otherwise. The errors are considered
    *   non-blocking, so reading can continue, while the errors are collected
    *   for later presentation.
@@ -544,8 +544,9 @@ public function setItemFromArray($value) {
    * @param $string
    *   A string specified with enclosing quotes.
    *
-   * @return
-   *   The string parsed from inside the quotes.
+   * @return bool|string
+   *   The string parsed from inside the quotes. False when the syntax is
+   *   invalid.
    */
   public function parseQuoted($string) {
     if (substr($string, 0, 1) != substr($string, -1, 1)) {
@@ -574,7 +575,7 @@ public function parseQuoted($string) {
    * @param $comment
    *   An array of strings containing a comment.
    *
-   * @return
+   * @return string
    *   Short one-string version of the comment.
    */
   private function shortenComments($comment) {
diff --git a/core/lib/Drupal/Component/Graph/Graph.php b/core/lib/Drupal/Component/Graph/Graph.php
index b155faa66259..6fe9cf21b004 100644
--- a/core/lib/Drupal/Component/Graph/Graph.php
+++ b/core/lib/Drupal/Component/Graph/Graph.php
@@ -44,7 +44,7 @@ public function __construct($graph) {
   /**
    * Performs a depth-first search and sort on the directed acyclic graph.
    *
-   * @return
+   * @return array
    *   The given $graph with more secondary keys filled in:
    *   - 'paths': Contains a list of vertices than can be reached on a path from
    *     this vertex.
diff --git a/core/lib/Drupal/Component/Utility/UrlHelper.php b/core/lib/Drupal/Component/Utility/UrlHelper.php
index b23a21351847..79e275bdc05f 100644
--- a/core/lib/Drupal/Component/Utility/UrlHelper.php
+++ b/core/lib/Drupal/Component/Utility/UrlHelper.php
@@ -73,7 +73,7 @@ public static function buildQuery(array $query, $parent = '') {
    * @param string $parent
    *   Internal use only. Used to build the $query array key for nested items.
    *
-   * @return
+   * @return array
    *   An array containing query parameters.
    */
   public static function filterQueryParameters(array $query, array $exclude = [], $parent = '') {
diff --git a/core/lib/Drupal/Component/Uuid/UuidInterface.php b/core/lib/Drupal/Component/Uuid/UuidInterface.php
index f9f8a7b486fd..c5637b676c3d 100644
--- a/core/lib/Drupal/Component/Uuid/UuidInterface.php
+++ b/core/lib/Drupal/Component/Uuid/UuidInterface.php
@@ -10,7 +10,7 @@ interface UuidInterface {
   /**
    * Generates a Universally Unique IDentifier (UUID).
    *
-   * @return
+   * @return string
    *   A 16 byte integer represented as a hex string formatted with 4 hyphens.
    */
   public function generate();
diff --git a/core/lib/Drupal/Core/Asset/CssOptimizer.php b/core/lib/Drupal/Core/Asset/CssOptimizer.php
index 4ab6081a30b1..bc2aef723866 100644
--- a/core/lib/Drupal/Core/Asset/CssOptimizer.php
+++ b/core/lib/Drupal/Core/Asset/CssOptimizer.php
@@ -116,7 +116,7 @@ protected function processFile($css_asset) {
    * @param $reset_basepath
    *   Used internally to facilitate recursive resolution of @import commands.
    *
-   * @return
+   * @return string
    *   Contents of the stylesheet, including any resolved @import commands.
    */
   public function loadFile($file, $optimize = NULL, $reset_basepath = TRUE) {
@@ -178,7 +178,7 @@ public function loadFile($file, $optimize = NULL, $reset_basepath = TRUE) {
    *   An array of matches by a preg_replace_callback() call that scans for
    *   @import-ed CSS files, except for external CSS files.
    *
-   * @return
+   * @return string
    *   The contents of the CSS file at $matches[1], with corrected paths.
    *
    * @see \Drupal\Core\Asset\AssetOptimizerInterface::loadFile()
@@ -209,7 +209,7 @@ protected function loadNestedFile($matches) {
    *   (optional) Boolean whether CSS contents should be minified. Defaults to
    *   FALSE.
    *
-   * @return
+   * @return string
    *   Contents of the stylesheet including the imported stylesheets.
    */
   protected function processCss($contents, $optimize = FALSE) {
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php
index 107126903edd..f171e184941f 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php
@@ -186,7 +186,7 @@ public function getDependentEntities($type, $name) {
    * @param array $keys
    *   The keys whose values to extract.
    *
-   * @return
+   * @return array
    *   An array keyed by the $keys passed in. The values are arrays keyed by the
    *   row from the graph and the value is the corresponding value for the key
    *   from the graph.
diff --git a/core/lib/Drupal/Core/Database/Connection.php b/core/lib/Drupal/Core/Database/Connection.php
index 66dca1427316..142e452cebc9 100644
--- a/core/lib/Drupal/Core/Database/Connection.php
+++ b/core/lib/Drupal/Core/Database/Connection.php
@@ -1612,7 +1612,7 @@ abstract public function createDatabase($database);
    * @param string $operator
    *   The condition operator, such as "IN", "BETWEEN", etc. Case-sensitive.
    *
-   * @return
+   * @return array|null
    *   The extra handling directives for the specified operator, or NULL.
    *
    * @see \Drupal\Core\Database\Query\Condition::compile()
@@ -1648,7 +1648,7 @@ public function commit() {
    *   is behind, so by passing in the maximum existing ID, it can be assured
    *   that we never issue the same ID.
    *
-   * @return
+   * @return int|string
    *   An integer number larger than any number returned by earlier calls and
    *   also larger than the $existing_id if one was passed in.
    */
diff --git a/core/lib/Drupal/Core/Database/Log.php b/core/lib/Drupal/Core/Database/Log.php
index 5fd10b18ac30..b310d1728482 100644
--- a/core/lib/Drupal/Core/Database/Log.php
+++ b/core/lib/Drupal/Core/Database/Log.php
@@ -70,7 +70,7 @@ public function start($logging_key) {
    * @param $logging_key
    *   The logging key to fetch.
    *
-   * @return
+   * @return array
    *   An indexed array of all query records for this logging key.
    */
   public function get($logging_key) {
@@ -141,7 +141,7 @@ public function log(StatementInterface $statement, $args, $time, float $start =
    * See the @link http://php.net/debug_backtrace debug_backtrace() @endlink
    * function.
    *
-   * @return
+   * @return array|null
    *   This method returns a stack trace entry similar to that generated by
    *   debug_backtrace(). However, it flattens the trace entry and the trace
    *   entry before it so that we get the function and args of the function that
diff --git a/core/lib/Drupal/Core/Database/Query/AlterableInterface.php b/core/lib/Drupal/Core/Database/Query/AlterableInterface.php
index a77c26acd374..347019569c72 100644
--- a/core/lib/Drupal/Core/Database/Query/AlterableInterface.php
+++ b/core/lib/Drupal/Core/Database/Query/AlterableInterface.php
@@ -30,7 +30,7 @@ public function addTag($tag);
    * @param $tag
    *   The tag to check.
    *
-   * @return
+   * @return bool
    *   TRUE if this query has been marked with this tag, FALSE otherwise.
    */
   public function hasTag($tag);
@@ -43,7 +43,7 @@ public function hasTag($tag);
    * @todo Restore PHPDoc of variadic argument in Drupal 8.8, see
    * https://www.drupal.org/project/drupal/issues/3029729
    *
-   * @return
+   * @return bool
    *   TRUE if this query has been marked with all specified tags, FALSE
    *   otherwise.
    */
@@ -57,7 +57,7 @@ public function hasAllTags();
    * @todo Restore PHPDoc of variadic argument in Drupal 8.8, see
    * https://www.drupal.org/project/drupal/issues/3029729
    *
-   * @return
+   * @return bool
    *   TRUE if this query has been marked with at least one of the specified
    *   tags, FALSE otherwise.
    */
@@ -87,7 +87,7 @@ public function addMetaData($key, $object);
    * @param $key
    *   The unique identifier for the piece of metadata to retrieve.
    *
-   * @return
+   * @return mixed
    *   The previously attached metadata object, or NULL if one doesn't exist.
    */
   public function getMetaData($key);
diff --git a/core/lib/Drupal/Core/Database/Query/ConditionInterface.php b/core/lib/Drupal/Core/Database/Query/ConditionInterface.php
index 5c08c9801010..347f25645af1 100644
--- a/core/lib/Drupal/Core/Database/Query/ConditionInterface.php
+++ b/core/lib/Drupal/Core/Database/Query/ConditionInterface.php
@@ -170,7 +170,7 @@ public function &conditions();
   /**
    * Gets a complete list of all values to insert into the prepared statement.
    *
-   * @return
+   * @return array
    *   An associative array of placeholders and values.
    */
   public function arguments();
@@ -192,7 +192,7 @@ public function compile(Connection $connection, PlaceholderInterface $queryPlace
   /**
    * Check whether a condition has been previously compiled.
    *
-   * @return
+   * @return bool
    *   TRUE if the condition has been previously compiled.
    */
   public function compiled();
diff --git a/core/lib/Drupal/Core/Database/Query/Insert.php b/core/lib/Drupal/Core/Database/Query/Insert.php
index af4e32820f06..cb2ee9d336b5 100644
--- a/core/lib/Drupal/Core/Database/Query/Insert.php
+++ b/core/lib/Drupal/Core/Database/Query/Insert.php
@@ -57,7 +57,7 @@ public function from(SelectInterface $query) {
   /**
    * Executes the insert query.
    *
-   * @return
+   * @return int|null|string
    *   The last insert ID of the query, if one exists. If the query was given
    *   multiple sets of values to insert, the return value is undefined. If no
    *   fields are specified, this method will do nothing and return NULL. That
diff --git a/core/lib/Drupal/Core/Database/Query/Merge.php b/core/lib/Drupal/Core/Database/Query/Merge.php
index a6641820744a..88681e30cfe4 100644
--- a/core/lib/Drupal/Core/Database/Query/Merge.php
+++ b/core/lib/Drupal/Core/Database/Query/Merge.php
@@ -356,7 +356,7 @@ public function __toString() {
   /**
    * Executes the merge database query.
    *
-   * @return
+   * @return int|null
    *   One of the following values:
    *   - Merge::STATUS_INSERT: If the entry does not already exist,
    *     and an INSERT query is executed.
@@ -407,6 +407,7 @@ public function execute() {
       $update->execute();
       return self::STATUS_UPDATE;
     }
+    return NULL;
   }
 
 }
diff --git a/core/lib/Drupal/Core/Database/Query/PlaceholderInterface.php b/core/lib/Drupal/Core/Database/Query/PlaceholderInterface.php
index f2a00dec5c1e..9295a369ad64 100644
--- a/core/lib/Drupal/Core/Database/Query/PlaceholderInterface.php
+++ b/core/lib/Drupal/Core/Database/Query/PlaceholderInterface.php
@@ -15,7 +15,7 @@ public function uniqueIdentifier();
   /**
    * Returns the next placeholder ID for the query.
    *
-   * @return
+   * @return int
    *   The next available placeholder ID as an integer.
    */
   public function nextPlaceholder();
diff --git a/core/lib/Drupal/Core/Database/Query/SelectInterface.php b/core/lib/Drupal/Core/Database/Query/SelectInterface.php
index 449d0b64d3c2..d89693fd6fdc 100644
--- a/core/lib/Drupal/Core/Database/Query/SelectInterface.php
+++ b/core/lib/Drupal/Core/Database/Query/SelectInterface.php
@@ -26,7 +26,7 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend
    * $fields =& $query->getFields();
    * @endcode
    *
-   * @return
+   * @return array
    *   A reference to the fields array structure.
    */
   public function &getFields();
@@ -44,7 +44,7 @@ public function &getFields();
    * $fields =& $query->getExpressions();
    * @endcode
    *
-   * @return
+   * @return array
    *   A reference to the expression array structure.
    */
   public function &getExpressions();
@@ -62,7 +62,7 @@ public function &getExpressions();
    * $fields =& $query->getOrderBy();
    * @endcode
    *
-   * @return
+   * @return array
    *   A reference to the expression array structure.
    */
   public function &getOrderBy();
@@ -80,7 +80,7 @@ public function &getOrderBy();
    * $fields =& $query->getGroupBy();
    * @endcode
    *
-   * @return
+   * @return array
    *   A reference to the group-by array structure.
    */
   public function &getGroupBy();
@@ -98,7 +98,7 @@ public function &getGroupBy();
    * $tables =& $query->getTables();
    * @endcode
    *
-   * @return
+   * @return array
    *   A reference to the tables array structure.
    */
   public function &getTables();
@@ -117,7 +117,7 @@ public function &getTables();
    * $fields =& $query->getUnion();
    * @endcode
    *
-   * @return
+   * @return array
    *   A reference to the union query array structure.
    */
   public function &getUnion();
@@ -145,7 +145,7 @@ public function escapeLike($string);
    * @param string $string
    *   An unsanitized field name.
    *
-   * @return
+   * @return string
    *   The sanitized field name string.
    */
   public function escapeField($string);
@@ -157,7 +157,7 @@ public function escapeField($string);
    *   When collecting the arguments of a subquery, the main placeholder
    *   object should be passed as this parameter.
    *
-   * @return
+   * @return array
    *   An associative array of all placeholder arguments for this query.
    */
   public function getArguments(PlaceholderInterface $queryPlaceholder = NULL);
@@ -190,7 +190,7 @@ public function distinct($distinct = TRUE);
    *   checked for uniqueness, so the requested alias may not be the alias
    *   that is assigned in all cases.
    *
-   * @return
+   * @return string
    *   The unique alias that was assigned for this field.
    */
   public function addField($table_alias, $field, $alias = NULL);
@@ -236,7 +236,7 @@ public function fields($table_alias, array $fields = []);
    * @param $arguments
    *   Any placeholder arguments needed for this expression.
    *
-   * @return
+   * @return string
    *   The unique alias that was assigned for this expression.
    */
   public function addExpression($expression, $alias = NULL, $arguments = []);
@@ -265,7 +265,7 @@ public function addExpression($expression, $alias = NULL, $arguments = []);
    * @param $arguments
    *   An array of arguments to replace into the $condition of this join.
    *
-   * @return
+   * @return string
    *   The unique alias that was assigned for this table.
    */
   public function join($table, $alias = NULL, $condition = NULL, $arguments = []);
@@ -292,7 +292,7 @@ public function join($table, $alias = NULL, $condition = NULL, $arguments = []);
    * @param $arguments
    *   An array of arguments to replace into the $condition of this join.
    *
-   * @return
+   * @return string
    *   The unique alias that was assigned for this table.
    */
   public function innerJoin($table, $alias = NULL, $condition = NULL, $arguments = []);
@@ -319,7 +319,7 @@ public function innerJoin($table, $alias = NULL, $condition = NULL, $arguments =
    * @param $arguments
    *   An array of arguments to replace into the $condition of this join.
    *
-   * @return
+   * @return string
    *   The unique alias that was assigned for this table.
    */
   public function leftJoin($table, $alias = NULL, $condition = NULL, $arguments = []);
@@ -353,7 +353,7 @@ public function leftJoin($table, $alias = NULL, $condition = NULL, $arguments =
    * @param $arguments
    *   An array of arguments to replace into the $condition of this join.
    *
-   * @return
+   * @return string
    *   The unique alias that was assigned for this table.
    */
   public function addJoin($type, $table, $alias = NULL, $condition = NULL, $arguments = []);
@@ -478,7 +478,7 @@ public function countQuery();
   /**
    * Indicates if preExecute() has already been called on that object.
    *
-   * @return
+   * @return bool
    *   TRUE is this query has already been prepared, FALSE otherwise.
    */
   public function isPrepared();
@@ -486,7 +486,7 @@ public function isPrepared();
   /**
    * Generic preparation and validation for a SELECT query.
    *
-   * @return
+   * @return bool
    *   TRUE if the validation was successful, FALSE if not.
    */
   public function preExecute(SelectInterface $query = NULL);
diff --git a/core/lib/Drupal/Core/Database/Query/Truncate.php b/core/lib/Drupal/Core/Database/Query/Truncate.php
index 7cfce9cd7d3c..01f0c9d47daa 100644
--- a/core/lib/Drupal/Core/Database/Query/Truncate.php
+++ b/core/lib/Drupal/Core/Database/Query/Truncate.php
@@ -38,7 +38,7 @@ public function __construct(Connection $connection, $table, array $options = [])
   /**
    * Executes the TRUNCATE query.
    *
-   * @return
+   * @return int|null
    *   Return value is dependent on whether the executed SQL statement is a
    *   TRUNCATE or a DELETE. TRUNCATE is DDL and no information on affected
    *   rows is available. DELETE is DML and will return the number of affected
@@ -56,6 +56,8 @@ public function execute() {
     catch (\Exception $e) {
       $this->connection->exceptionHandler()->handleExecutionException($e, $stmt, [], $this->queryOptions);
     }
+
+    return NULL;
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Database/Query/Update.php b/core/lib/Drupal/Core/Database/Query/Update.php
index 1311083e102f..fb7db437af8a 100644
--- a/core/lib/Drupal/Core/Database/Query/Update.php
+++ b/core/lib/Drupal/Core/Database/Query/Update.php
@@ -115,7 +115,7 @@ public function expression($field, $expression, array $arguments = NULL) {
   /**
    * Executes the UPDATE query.
    *
-   * @return
+   * @return int|null
    *   The number of rows matched by the update query. This includes rows that
    *   actually didn't have to be updated because the values didn't change.
    */
diff --git a/core/lib/Drupal/Core/Database/Schema.php b/core/lib/Drupal/Core/Database/Schema.php
index 191509cc6058..b5696817627c 100644
--- a/core/lib/Drupal/Core/Database/Schema.php
+++ b/core/lib/Drupal/Core/Database/Schema.php
@@ -162,7 +162,7 @@ protected function buildTableNameCondition($table_name, $operator = '=', $add_pr
    * @param $table
    *   The name of the table in drupal (no prefixing).
    *
-   * @return
+   * @return bool
    *   TRUE if the given table exists, otherwise FALSE.
    */
   public function tableExists($table) {
@@ -240,7 +240,7 @@ public function findTables($table_expression) {
    * @param string $column
    *   The name of the column.
    *
-   * @return
+   * @return bool
    *   TRUE if the given column exists, otherwise FALSE.
    */
   public function fieldExists($table, $column) {
@@ -288,7 +288,7 @@ abstract public function renameTable($table, $new_name);
    * @param $table
    *   The table to be dropped.
    *
-   * @return
+   * @return bool
    *   TRUE if the table was successfully dropped, FALSE if there was no table
    *   by that name to begin with.
    */
@@ -332,7 +332,7 @@ abstract public function addField($table, $field, $spec, $keys_new = []);
    * @param $field
    *   The field to be dropped.
    *
-   * @return
+   * @return bool
    *   TRUE if the field was successfully dropped, FALSE if there was no field
    *   by that name to begin with.
    */
@@ -346,7 +346,7 @@ abstract public function dropField($table, $field);
    * @param $name
    *   The name of the index in drupal (no prefixing).
    *
-   * @return
+   * @return bool
    *   TRUE if the given index exists, otherwise FALSE.
    */
   abstract public function indexExists($table, $name);
@@ -372,7 +372,7 @@ abstract public function addPrimaryKey($table, $fields);
    * @param $table
    *   The table to be altered.
    *
-   * @return
+   * @return bool
    *   TRUE if the primary key was successfully dropped, FALSE if there was no
    *   primary key on this table to begin with.
    */
@@ -423,7 +423,7 @@ abstract public function addUniqueKey($table, $name, $fields);
    * @param $name
    *   The name of the key.
    *
-   * @return
+   * @return bool
    *   TRUE if the key was successfully dropped, FALSE if there was no key by
    *   that name to begin with.
    */
@@ -499,7 +499,7 @@ abstract public function addIndex($table, $name, $fields, array $spec);
    * @param $name
    *   The name of the index.
    *
-   * @return
+   * @return bool
    *   TRUE if the index was successfully dropped, FALSE if there was no index
    *   by that name to begin with.
    */
@@ -625,7 +625,7 @@ public function createTable($name, $table) {
    * @param $fields
    *   An array of key/index column specifiers.
    *
-   * @return
+   * @return array
    *   An array of field names.
    */
   public function fieldNames($fields) {
@@ -649,7 +649,7 @@ public function fieldNames($fields) {
    * @param $length
    *   Optional upper limit on the returned string length.
    *
-   * @return
+   * @return string
    *   The prepared comment.
    */
   public function prepareComment($comment, $length = NULL) {
diff --git a/core/lib/Drupal/Core/Database/StatementInterface.php b/core/lib/Drupal/Core/Database/StatementInterface.php
index 3c01801d2432..875d828be08d 100644
--- a/core/lib/Drupal/Core/Database/StatementInterface.php
+++ b/core/lib/Drupal/Core/Database/StatementInterface.php
@@ -31,7 +31,7 @@ interface StatementInterface extends \Traversable {
    * @param $options
    *   An array of options for this query.
    *
-   * @return
+   * @return bool
    *   TRUE on success, or FALSE on failure.
    */
   public function execute($args = [], $options = []);
@@ -39,7 +39,7 @@ public function execute($args = [], $options = []);
   /**
    * Gets the query string of this statement.
    *
-   * @return
+   * @return string
    *   The query string, in its form with placeholders.
    */
   public function getQueryString();
@@ -55,7 +55,7 @@ public function getConnectionTarget(): string;
   /**
    * Returns the number of rows affected by the last SQL statement.
    *
-   * @return
+   * @return int
    *   The number of rows affected by the last DELETE, INSERT, or UPDATE
    *   statement executed or throws \Drupal\Core\Database\RowCountException
    *   if the last executed statement was SELECT.
@@ -97,7 +97,7 @@ public function setFetchMode($mode, $a1 = NULL, $a2 = []);
    * @param $cursor_offset
    *   Not implemented in all database drivers, don't use.
    *
-   * @return
+   * @return array|object
    *   A result, formatted according to $mode.
    */
   public function fetch($mode = NULL, $cursor_orientation = NULL, $cursor_offset = NULL);
@@ -108,7 +108,7 @@ public function fetch($mode = NULL, $cursor_orientation = NULL, $cursor_offset =
    * @param $index
    *   The numeric index of the field to return. Defaults to the first field.
    *
-   * @return
+   * @return mixed
    *   A single field from the next record, or FALSE if there is no next record.
    */
   public function fetchField($index = 0);
@@ -141,7 +141,7 @@ public function fetchObject(/* string $class_name = NULL, array $constructor_arg
    * associative arrays. For some reason \PDOStatement does not have a
    * corresponding array helper method, so one is added.
    *
-   * @return
+   * @return array|bool
    *   An associative array, or FALSE if there is no next row.
    */
   public function fetchAssoc();
@@ -156,7 +156,7 @@ public function fetchAssoc();
    * @param $constructor_arguments
    *   If $mode is \PDO::FETCH_CLASS, the arguments to pass to the constructor.
    *
-   * @return
+   * @return array
    *   An array of results.
    */
   public function fetchAll($mode = NULL, $column_index = NULL, $constructor_arguments = NULL);
@@ -169,7 +169,7 @@ public function fetchAll($mode = NULL, $column_index = NULL, $constructor_argume
    * @param $index
    *   The index of the column number to fetch.
    *
-   * @return
+   * @return array
    *   An indexed array, or an empty array if there is no result set.
    */
   public function fetchCol($index = 0);
@@ -189,7 +189,7 @@ public function fetchCol($index = 0);
    * @param $value_index
    *   The numeric index of the field to use as the array value.
    *
-   * @return
+   * @return array
    *   An associative array, or an empty array if there is no result set.
    */
   public function fetchAllKeyed($key_index = 0, $value_index = 1);
@@ -208,7 +208,7 @@ public function fetchAllKeyed($key_index = 0, $value_index = 1);
    *   other value it will be an array of objects. By default, the fetch mode
    *   set for the query will be used.
    *
-   * @return
+   * @return array
    *   An associative array, or an empty array if there is no result set.
    */
   public function fetchAllAssoc($key, $fetch = NULL);
diff --git a/core/lib/Drupal/Core/Datetime/Element/Datelist.php b/core/lib/Drupal/Core/Datetime/Element/Datelist.php
index 6ce98c13dee7..dbc44cafcbb1 100644
--- a/core/lib/Drupal/Core/Datetime/Element/Datelist.php
+++ b/core/lib/Drupal/Core/Datetime/Element/Datelist.php
@@ -358,7 +358,7 @@ protected static function checkEmptyInputs($input, $parts) {
    * @param $increment
    *   The value to round to.
    *
-   * @return
+   * @return \Drupal\Core\Datetime\DrupalDateTime
    */
   protected static function incrementRound(&$date, $increment) {
     // Round minutes and seconds, if necessary.
diff --git a/core/lib/Drupal/Core/Entity/EntityStorageInterface.php b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php
index eb99d5a90b39..99e6bbf7cb2b 100644
--- a/core/lib/Drupal/Core/Entity/EntityStorageInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php
@@ -145,7 +145,7 @@ public function delete(array $entities);
    * @param \Drupal\Core\Entity\EntityInterface $entity
    *   The entity to save.
    *
-   * @return
+   * @return int|null
    *   SAVED_NEW or SAVED_UPDATED is returned depending on the operation
    *   performed.
    *
diff --git a/core/lib/Drupal/Core/Entity/EntityViewBuilderInterface.php b/core/lib/Drupal/Core/Entity/EntityViewBuilderInterface.php
index 3da44873079f..8951a18d14ed 100644
--- a/core/lib/Drupal/Core/Entity/EntityViewBuilderInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityViewBuilderInterface.php
@@ -60,7 +60,7 @@ public function view(EntityInterface $entity, $view_mode = 'full', $langcode = N
    *   (optional) For which language the entity should be rendered, defaults to
    *   the current content language.
    *
-   * @return
+   * @return array
    *   A render array for the entities, indexed by the same keys as the
    *   entities array passed in $entities.
    *
diff --git a/core/lib/Drupal/Core/Entity/RevisionableInterface.php b/core/lib/Drupal/Core/Entity/RevisionableInterface.php
index 1ffe6e088e87..e268204f6e1b 100644
--- a/core/lib/Drupal/Core/Entity/RevisionableInterface.php
+++ b/core/lib/Drupal/Core/Entity/RevisionableInterface.php
@@ -48,7 +48,7 @@ public function setNewRevision($value = TRUE);
   /**
    * Gets the revision identifier of the entity.
    *
-   * @return
+   * @return int|null|string
    *   The revision identifier of the entity, or NULL if the entity does not
    *   have a revision identifier.
    */
diff --git a/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php
index 3933875768f4..6c66eefcfbf7 100644
--- a/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php
@@ -179,7 +179,7 @@ protected function isErrorDisplayable($error) {
    * @param $error
    *   Optional error to examine for ERROR_REPORTING_DISPLAY_SOME.
    *
-   * @return
+   * @return array
    *   The updated $error.
    */
   protected function simplifyFileInError($error) {
diff --git a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php
index 54a8ed26b4d2..70cbcad10164 100644
--- a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php
+++ b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php
@@ -103,7 +103,7 @@ public function addProfile($name, $path);
    *   information discovered during a Drupal\Core\Extension\ExtensionDiscovery
    *   scan.
    *
-   * @return
+   * @return array
    *   The same array with the new keys for each module:
    *   - requires: An array with the keys being the modules that this module
    *     requires.
diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php
index 69be62ed0913..60e35eecf2a2 100644
--- a/core/lib/Drupal/Core/Extension/module.api.php
+++ b/core/lib/Drupal/Core/Extension/module.api.php
@@ -74,7 +74,7 @@
  *
  * See system_hook_info() for all hook groups defined by Drupal core.
  *
- * @return
+ * @return array
  *   An associative array whose keys are hook names and whose values are an
  *   associative array containing:
  *   - group: A string defining the group to which the hook belongs. The module
@@ -797,7 +797,7 @@ function hook_removed_post_updates() {
  * Implementations of this hook should be placed in a mymodule.install file in
  * the same directory as mymodule.module.
  *
- * @return
+ * @return array
  *   A multidimensional array containing information about the module update
  *   dependencies. The first two levels of keys represent the module and update
  *   number (respectively) for which information is being returned, and the
@@ -843,7 +843,7 @@ function hook_update_dependencies() {
  * Implementations of this hook should be placed in a mymodule.install file in
  * the same directory as mymodule.module.
  *
- * @return
+ * @return int
  *   An integer, corresponding to hook_update_N() which has been removed from
  *   mymodule.install.
  *
@@ -864,7 +864,7 @@ function hook_update_last_removed() {
  * of the Drupal file system, for example to update modules that have newer
  * releases, or to install a new theme.
  *
- * @return
+ * @return array
  *   An associative array of information about the updater(s) being provided.
  *   This array is keyed by a unique identifier for each updater, and the
  *   values are subarrays that can contain the following keys:
@@ -962,7 +962,7 @@ function hook_updater_info_alter(&$updaters) {
  *   - runtime: The runtime requirements are being checked and shown on the
  *     status report page.
  *
- * @return
+ * @return array
  *   An associative array where the keys are arbitrary but must be unique (it
  *   is suggested to use the module short name as a prefix) and the values are
  *   themselves associative arrays with the following elements:
diff --git a/core/lib/Drupal/Core/File/file.api.php b/core/lib/Drupal/Core/File/file.api.php
index 33a5be1c85a4..a6c15a7db269 100644
--- a/core/lib/Drupal/Core/File/file.api.php
+++ b/core/lib/Drupal/Core/File/file.api.php
@@ -23,7 +23,7 @@
  * @param $uri
  *   The URI of the file.
  *
- * @return
+ * @return string[]|int
  *   If the user does not have permission to access the file, return -1. If the
  *   user has permission, return an array with the appropriate headers. If the
  *   file is not controlled by the current module, the return value should be
diff --git a/core/lib/Drupal/Core/Flood/FloodInterface.php b/core/lib/Drupal/Core/Flood/FloodInterface.php
index 5e3ead3a4c0d..fd98398fea83 100644
--- a/core/lib/Drupal/Core/Flood/FloodInterface.php
+++ b/core/lib/Drupal/Core/Flood/FloodInterface.php
@@ -54,7 +54,7 @@ public function clear($name, $identifier = NULL);
    *   (optional) Unique identifier of the current user. Defaults to the current
    *   user's IP address).
    *
-   * @return
+   * @return bool
    *   TRUE if the user is allowed to proceed. FALSE if they have exceeded the
    *   threshold and should not be allowed to proceed.
    */
diff --git a/core/lib/Drupal/Core/Queue/DatabaseQueue.php b/core/lib/Drupal/Core/Queue/DatabaseQueue.php
index 5a77827c8f21..3e2ed4272e36 100644
--- a/core/lib/Drupal/Core/Queue/DatabaseQueue.php
+++ b/core/lib/Drupal/Core/Queue/DatabaseQueue.php
@@ -76,7 +76,7 @@ public function createItem($data) {
    * @param $data
    *   Arbitrary data to be associated with the new task in the queue.
    *
-   * @return
+   * @return int|string
    *   A unique ID if the item was successfully created and was (best effort)
    *   added to the queue, otherwise FALSE. We don't guarantee the item was
    *   committed to disk etc, but as far as we know, the item is now in the
diff --git a/core/lib/Drupal/Core/Queue/QueueInterface.php b/core/lib/Drupal/Core/Queue/QueueInterface.php
index 449ad6a0dd05..8b9ff654c068 100644
--- a/core/lib/Drupal/Core/Queue/QueueInterface.php
+++ b/core/lib/Drupal/Core/Queue/QueueInterface.php
@@ -18,7 +18,7 @@ interface QueueInterface {
    * @param $data
    *   Arbitrary data to be associated with the new task in the queue.
    *
-   * @return
+   * @return bool|int|string
    *   A unique ID if the item was successfully created and was (best effort)
    *   added to the queue, otherwise FALSE. We don't guarantee the item was
    *   committed to disk etc, but as far as we know, the item is now in the
@@ -55,7 +55,7 @@ public function numberOfItems();
    *   more rare for a given task to run multiple times in cases of failure,
    *   at the cost of higher latency.
    *
-   * @return
+   * @return bool|object
    *   On success we return an item object. If the queue is unable to claim an
    *   item it returns false. This implies a best effort to retrieve an item
    *   and either the queue is empty or there is some other non-recoverable
diff --git a/core/lib/Drupal/Core/Render/Element/Details.php b/core/lib/Drupal/Core/Render/Element/Details.php
index cfd1b4ba8fda..794b36bb8a3d 100644
--- a/core/lib/Drupal/Core/Render/Element/Details.php
+++ b/core/lib/Drupal/Core/Render/Element/Details.php
@@ -66,7 +66,7 @@ public function getInfo() {
    *   An associative array containing the properties and children of the
    *   details.
    *
-   * @return
+   * @return array
    *   The modified element.
    */
   public static function preRenderDetails($element) {
diff --git a/core/lib/Drupal/Core/RouteProcessor/OutboundRouteProcessorInterface.php b/core/lib/Drupal/Core/RouteProcessor/OutboundRouteProcessorInterface.php
index 4a5bcf76922b..e6454d4aa87e 100644
--- a/core/lib/Drupal/Core/RouteProcessor/OutboundRouteProcessorInterface.php
+++ b/core/lib/Drupal/Core/RouteProcessor/OutboundRouteProcessorInterface.php
@@ -22,9 +22,6 @@ interface OutboundRouteProcessorInterface {
    *   reference.
    * @param \Drupal\Core\Render\BubbleableMetadata $bubbleable_metadata
    *   (optional) Object to collect route processors' bubbleable metadata.
-   *
-   * @return
-   *   The processed path.
    */
   public function processOutbound($route_name, Route $route, array &$parameters, BubbleableMetadata $bubbleable_metadata = NULL);
 
diff --git a/core/lib/Drupal/Core/Utility/ProjectInfo.php b/core/lib/Drupal/Core/Utility/ProjectInfo.php
index ef7d7faf2ce3..f0ea0afccfb6 100644
--- a/core/lib/Drupal/Core/Utility/ProjectInfo.php
+++ b/core/lib/Drupal/Core/Utility/ProjectInfo.php
@@ -169,7 +169,7 @@ public function getProjectName(Extension $file) {
    *   (optional) Array of additional elements to be collected from the .info.yml
    *   file. Defaults to array().
    *
-   * @return
+   * @return array
    *   Array of .info.yml file data we need for the update manager.
    *
    * @see \Drupal\Core\Utility\ProjectInfo::processInfoList()
diff --git a/core/lib/Drupal/Core/Utility/ThemeRegistry.php b/core/lib/Drupal/Core/Utility/ThemeRegistry.php
index 8abb17d78020..34b97dfb5db9 100644
--- a/core/lib/Drupal/Core/Utility/ThemeRegistry.php
+++ b/core/lib/Drupal/Core/Utility/ThemeRegistry.php
@@ -79,7 +79,7 @@ public function __construct($cid, CacheBackendInterface $cache, LockBackendInter
   /**
    * Initializes the full theme registry.
    *
-   * @return
+   * @return array
    *   An array with the keys of the full theme registry, but the values
    *   initialized to NULL.
    */
diff --git a/core/lib/Drupal/Core/Utility/token.api.php b/core/lib/Drupal/Core/Utility/token.api.php
index 4d1417d1736a..9fd09d9794d5 100644
--- a/core/lib/Drupal/Core/Utility/token.api.php
+++ b/core/lib/Drupal/Core/Utility/token.api.php
@@ -175,7 +175,7 @@ function hook_tokens_alter(array &$replacements, array $context, \Drupal\Core\Re
  * module will need to implement that hook in order to generate token
  * replacements from the tokens defined here.
  *
- * @return
+ * @return array
  *   An associative array of available tokens and token types. The outer array
  *   has two components:
  *   - types: An associative array of token types (groups). Each token type is
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index 42fec612eea2..1760113fe418 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -202,7 +202,7 @@ function book_pick_book_nojs_submit($form, FormStateInterface $form_state) {
  * This function is called via Ajax when the selected book is changed on a node
  * or book outline form.
  *
- * @return
+ * @return array
  *   The rendered parent page select element.
  */
 function book_form_update($form, FormStateInterface $form_state) {
diff --git a/core/modules/book/src/BookManagerInterface.php b/core/modules/book/src/BookManagerInterface.php
index e6f9c6f55d5a..21008fd244f1 100644
--- a/core/modules/book/src/BookManagerInterface.php
+++ b/core/modules/book/src/BookManagerInterface.php
@@ -271,7 +271,7 @@ public function bookTreeCheckAccess(&$tree, $node_links = []);
    * @param array $link
    *   A fully loaded book link.
    *
-   * @return
+   * @return array
    *   A subtree of book links in an array, in the order they should be rendered.
    */
   public function bookSubtreeData($link);
diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module
index 9910ba31bdc6..0e0a547dbe0b 100644
--- a/core/modules/content_translation/content_translation.module
+++ b/core/modules/content_translation/content_translation.module
@@ -574,7 +574,7 @@ function content_translation_enable_widget($entity_type, $bundle, array &$form,
  * @param array $element
  *   Form API element.
  *
- * @return
+ * @return array
  *   Processed language configuration element.
  */
 function content_translation_language_configuration_element_process(array $element, FormStateInterface $form_state, array &$form) {
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php
index 953d8816e7b8..82c0ed482dd7 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php
@@ -487,7 +487,7 @@ protected function getTranslation(EntityInterface $entity, $langcode) {
    * @param string $langcode
    *   The property value.
    *
-   * @return
+   * @return mixed
    *   The property value.
    */
   protected function getValue(EntityInterface $translation, $property, $langcode) {
diff --git a/core/modules/field/tests/modules/field_test/field_test.module b/core/modules/field/tests/modules/field_test/field_test.module
index ec567dc139f3..91ca8c0f9080 100644
--- a/core/modules/field/tests/modules/field_test/field_test.module
+++ b/core/modules/field/tests/modules/field_test/field_test.module
@@ -58,7 +58,7 @@
  * @param $value
  *   A value to store for $key.
  *
- * @return
+ * @return array|null
  *   An array mapping each $key to an array of each $value passed in
  *   for that key.
  */
diff --git a/core/modules/field/tests/src/Functional/FieldTestBase.php b/core/modules/field/tests/src/Functional/FieldTestBase.php
index 4656ed5dca43..5fffae3a45b0 100644
--- a/core/modules/field/tests/src/Functional/FieldTestBase.php
+++ b/core/modules/field/tests/src/Functional/FieldTestBase.php
@@ -18,7 +18,7 @@ abstract class FieldTestBase extends BrowserTestBase {
    * @param $cardinality
    *   Number of values to generate.
    *
-   * @return
+   * @return array
    *   An array of random values, in the format expected for field values.
    */
   public function _generateTestFieldValues($cardinality) {
diff --git a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php
index 2636fea80ee7..5ed8ec985eda 100644
--- a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php
+++ b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php
@@ -169,7 +169,7 @@ protected function entityValidateAndSave(EntityInterface $entity) {
    * @param $cardinality
    *   Number of values to generate.
    *
-   * @return
+   * @return array
    *   An array of random values, in the format expected for field values.
    */
   protected function _generateTestFieldValues($cardinality) {
diff --git a/core/modules/file/tests/file_test/file_test.module b/core/modules/file/tests/file_test/file_test.module
index 6551ae3274f5..22fc35d8992f 100644
--- a/core/modules/file/tests/file_test/file_test.module
+++ b/core/modules/file/tests/file_test/file_test.module
@@ -63,7 +63,7 @@ function file_test_get_calls($op) {
 /**
  * Get an array with the calls for all hooks.
  *
- * @return
+ * @return array
  *   An array keyed by hook name ('load', 'validate', 'download', 'insert',
  *   'update', 'copy', 'move', 'delete') with values being arrays of parameters
  *   passed to each call.
diff --git a/core/modules/forum/src/ForumManagerInterface.php b/core/modules/forum/src/ForumManagerInterface.php
index 7ab14ba30d23..8730d15ab909 100644
--- a/core/modules/forum/src/ForumManagerInterface.php
+++ b/core/modules/forum/src/ForumManagerInterface.php
@@ -72,7 +72,7 @@ public function checkNodeType(NodeInterface $node);
    * @param int $uid
    *   The user ID.
    *
-   * @return
+   * @return int
    *   The number of new posts in the forum that have not been read by the user.
    */
   public function unreadTopics($term, $uid);
diff --git a/core/modules/image/image.module b/core/modules/image/image.module
index 5d427d656486..aa9faef2d4e1 100644
--- a/core/modules/image/image.module
+++ b/core/modules/image/image.module
@@ -204,7 +204,7 @@ function image_path_flush($path) {
  * @param $include_empty
  *   If TRUE a '- None -' option will be inserted in the options array.
  *
- * @return
+ * @return string[]
  *   Array of image styles both key and value are set to style name.
  */
 function image_style_options($include_empty = TRUE) {
diff --git a/core/modules/mysql/src/Driver/Database/mysql/Schema.php b/core/modules/mysql/src/Driver/Database/mysql/Schema.php
index ab937ef2aec1..1d54466a6758 100644
--- a/core/modules/mysql/src/Driver/Database/mysql/Schema.php
+++ b/core/modules/mysql/src/Driver/Database/mysql/Schema.php
@@ -44,7 +44,7 @@ class Schema extends DatabaseSchema {
   /**
    * Get information about the table and database name from the prefix.
    *
-   * @return
+   * @return array
    *   A keyed array with information about the database, table name and prefix.
    */
   protected function getPrefixInfo($table = 'default', $add_prefix = TRUE) {
@@ -88,7 +88,7 @@ protected function buildTableNameCondition($table_name, $operator = '=', $add_pr
    * @param $table
    *   A Schema API table definition array.
    *
-   * @return
+   * @return string[]
    *   An array of SQL statements to create the table.
    */
   protected function createTableSql($name, $table) {
diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php
index b0006cf8cdd3..0f35404d7fdb 100644
--- a/core/modules/node/node.api.php
+++ b/core/modules/node/node.api.php
@@ -147,7 +147,7 @@ function hook_node_grants(\Drupal\Core\Session\AccountInterface $account, $op) {
  * @param \Drupal\node\NodeInterface $node
  *   The node that has just been saved.
  *
- * @return
+ * @return array|null
  *   An array of grants as defined above.
  *
  * @see hook_node_access_records_alter()
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 1a4b90e8f1b6..e94590376b6c 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -330,7 +330,7 @@ function node_entity_extra_field_info() {
  * @param string $new_id
  *   The new node type of the nodes.
  *
- * @return
+ * @return int
  *   The number of nodes whose node type field was modified.
  */
 function node_type_update_nodes($old_id, $new_id) {
@@ -893,7 +893,7 @@ function node_access_grants($op, AccountInterface $account) {
  *   (optional) The user object for the user whose access is being checked. If
  *   omitted, the current user is used. Defaults to NULL.
  *
- * @return
+ * @return bool
  *   TRUE if 'view' access to all nodes is granted, FALSE otherwise.
  *
  * @see hook_node_grants()
diff --git a/core/modules/path_alias/src/AliasManager.php b/core/modules/path_alias/src/AliasManager.php
index fb695dd34592..d19d8790ed91 100644
--- a/core/modules/path_alias/src/AliasManager.php
+++ b/core/modules/path_alias/src/AliasManager.php
@@ -275,9 +275,6 @@ public function cacheClear($source = NULL) {
    *
    * @param string $path
    *   An optional path for which an alias is being inserted.
-   *
-   * @return
-   *   An array containing a white list of path aliases.
    */
   protected function pathAliasWhitelistRebuild($path = NULL) {
     // When paths are inserted, only rebuild the whitelist if the path has a top
diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module
index b78a8ddf973a..53479f5727fe 100644
--- a/core/modules/shortcut/shortcut.module
+++ b/core/modules/shortcut/shortcut.module
@@ -123,7 +123,7 @@ function shortcut_set_switch_access($account = NULL) {
  *   (optional) The user account whose shortcuts will be returned. Defaults to
  *   the currently logged-in user.
  *
- * @return
+ * @return \Drupal\shortcut\ShortcutSetInterface
  *   An object representing the shortcut set that should be displayed to the
  *   current user. If the user does not have an explicit shortcut set defined,
  *   the default set is returned.
@@ -163,7 +163,7 @@ function shortcut_current_displayed_set($account = NULL) {
  *   If not provided, the function will return the currently logged-in user's
  *   default shortcut set.
  *
- * @return
+ * @return \Drupal\shortcut\ShortcutSetInterface|null
  *   An object representing the default shortcut set.
  */
 function shortcut_default_set($account = NULL) {
diff --git a/core/modules/sqlite/src/Driver/Database/sqlite/Schema.php b/core/modules/sqlite/src/Driver/Database/sqlite/Schema.php
index ff893d27518b..02e28976af4c 100644
--- a/core/modules/sqlite/src/Driver/Database/sqlite/Schema.php
+++ b/core/modules/sqlite/src/Driver/Database/sqlite/Schema.php
@@ -51,7 +51,7 @@ public function fieldExists($table, $column) {
    * @param $table
    *   A Schema API table definition array.
    *
-   * @return
+   * @return array
    *   An array of SQL statements to create the table.
    */
   public function createTableSql($name, $table) {
@@ -475,7 +475,7 @@ protected function alterTable($table, $old_schema, $new_schema, array $mapping =
    * @param $table
    *   Name of the table.
    *
-   * @return
+   * @return array
    *   An array representing the schema.
    *
    * @throws \Exception
diff --git a/core/modules/system/src/SystemManager.php b/core/modules/system/src/SystemManager.php
index 89b2e7abf97b..d8fc9d36ee4c 100644
--- a/core/modules/system/src/SystemManager.php
+++ b/core/modules/system/src/SystemManager.php
@@ -127,7 +127,7 @@ public function listRequirements() {
    *   An array of requirements, in the same format as is returned by
    *   hook_requirements().
    *
-   * @return
+   * @return int
    *   The highest severity in the array.
    */
   public function getMaxSeverity(&$requirements) {
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 37a5b5760450..47b8324ce53b 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -458,9 +458,6 @@ function template_preprocess_entity_add_list(&$variables) {
  *   object created by authorize.php when the user authorizes the operation.
  * @param $page_title
  *   Optional string to use as the page title once redirected to authorize.php.
- *
- * @return
- *   Nothing, this function just initializes variables in the user's session.
  */
 function system_authorized_init($callback, $file, $arguments = [], $page_title = NULL) {
   $session = \Drupal::request()->getSession();
@@ -877,7 +874,7 @@ function system_check_directory($form_element, FormStateInterface $form_state) {
  *   Possible values: REGIONS_ALL or REGIONS_VISIBLE. Visible excludes hidden
  *   regions.
  *
- * @return
+ * @return string[]
  *   An array of regions in the form $region['name'] = 'description'.
  */
 function system_region_list($theme, $show = REGIONS_ALL) {
@@ -936,7 +933,7 @@ function system_system_info_alter(&$info, Extension $file, $type) {
  * @param $theme
  *   The name of a theme.
  *
- * @return
+ * @return string
  *   A string that is the region name.
  */
 function system_default_region($theme) {
diff --git a/core/modules/system/tests/src/Functional/Cache/CacheTestBase.php b/core/modules/system/tests/src/Functional/Cache/CacheTestBase.php
index 08c4db5e8ab9..007ae8736a44 100644
--- a/core/modules/system/tests/src/Functional/Cache/CacheTestBase.php
+++ b/core/modules/system/tests/src/Functional/Cache/CacheTestBase.php
@@ -23,7 +23,7 @@ abstract class CacheTestBase extends BrowserTestBase {
    * @param $bin
    *   The bin the cache item was stored in.
    *
-   * @return
+   * @return bool
    *   TRUE on pass, FALSE on fail.
    */
   protected function checkCacheExists($cid, $var, $bin = NULL) {
diff --git a/core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php b/core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php
index ecb9e2605470..b9d00c44b94d 100644
--- a/core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php
+++ b/core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php
@@ -25,7 +25,7 @@ class HtmlToTextTest extends BrowserTestBase {
    * @param $text
    *   The text string to convert.
    *
-   * @return
+   * @return string
    *   An HTML representation of the text string that, when displayed in a
    *   browser, represents the PHP source code equivalent of $text.
    */
diff --git a/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php b/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php
index 8b123f0882a7..a300f3c4436a 100644
--- a/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php
+++ b/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php
@@ -271,7 +271,7 @@ protected function assertSessionIds(string $sid, string $assertion_text): void {
    * @param $url
    *   A Drupal path such as 'user/login'.
    *
-   * @return
+   * @return string
    *   URL prepared for the https.php mock front controller.
    */
   protected function httpsUrl($url) {
@@ -284,7 +284,7 @@ protected function httpsUrl($url) {
    * @param $url
    *   A Drupal path such as 'user/login'.
    *
-   * @return
+   * @return string
    *   URL prepared for the http.php mock front controller.
    */
   protected function httpUrl($url) {
diff --git a/core/modules/text/text.module b/core/modules/text/text.module
index 509b3b72426f..c0a03c62f978 100644
--- a/core/modules/text/text.module
+++ b/core/modules/text/text.module
@@ -58,7 +58,7 @@ function text_help($route_name, RouteMatchInterface $route_match) {
  *   The desired character length of the summary. If omitted, the default value
  *   will be used. Ignored if the special delimiter is present in $text.
  *
- * @return
+ * @return string
  *   The generated summary.
  */
 function text_summary($text, $format = NULL, $size = NULL) {
diff --git a/core/modules/toolbar/toolbar.api.php b/core/modules/toolbar/toolbar.api.php
index 34be7a8156ca..bf2ddf362b7f 100644
--- a/core/modules/toolbar/toolbar.api.php
+++ b/core/modules/toolbar/toolbar.api.php
@@ -36,7 +36,7 @@
  *
  * This hook is invoked in Toolbar::preRenderToolbar().
  *
- * @return
+ * @return array
  *   An array of toolbar items, keyed by unique identifiers such as 'home' or
  *   'administration', or the short name of the module implementing the hook.
  *   The corresponding value is a render element of type 'toolbar_item'.
diff --git a/core/modules/update/update.api.php b/core/modules/update/update.api.php
index 1a6e0ef00b9f..18ff68f9d0c5 100644
--- a/core/modules/update/update.api.php
+++ b/core/modules/update/update.api.php
@@ -114,7 +114,7 @@ function hook_update_status_alter(&$projects) {
  * @param string $directory
  *   The directory that the archive was extracted into.
  *
- * @return
+ * @return array
  *   If there are any problems, return an array of error messages. If there are
  *   no problems, return an empty array.
  *
diff --git a/core/modules/update/update.compare.inc b/core/modules/update/update.compare.inc
index 7f4033bae49f..8f134037c963 100644
--- a/core/modules/update/update.compare.inc
+++ b/core/modules/update/update.compare.inc
@@ -77,7 +77,7 @@ function update_process_project_info(&$projects) {
  * @param array $available
  *   Data about available project releases.
  *
- * @return
+ * @return array
  *   An array of installed projects with current update status information.
  *
  * @see update_get_available()
diff --git a/core/modules/update/update.install b/core/modules/update/update.install
index ed845df6fdda..f3b9e64f1a64 100644
--- a/core/modules/update/update.install
+++ b/core/modules/update/update.install
@@ -101,7 +101,7 @@ function update_uninstall() {
  * @param $type
  *   What kind of project this is ('core' or 'contrib').
  *
- * @return
+ * @return array
  *   An array to be included in the nested $requirements array.
  *
  * @see hook_requirements()
diff --git a/core/modules/update/update.manager.inc b/core/modules/update/update.manager.inc
index 7895b5599020..0de8675ad11a 100644
--- a/core/modules/update/update.manager.inc
+++ b/core/modules/update/update.manager.inc
@@ -79,7 +79,7 @@ function update_manager_download_batch_finished($success, $results) {
  *   The update manager operation we're in the middle of. Can be either 'update'
  *   or 'install'. Use to provide operation-specific interface text.
  *
- * @return
+ * @return bool
  *   TRUE if the update manager should continue to the next step in the
  *   workflow, or FALSE if we've hit a fatal configuration and must halt the
  *   workflow.
@@ -307,7 +307,7 @@ function update_manager_batch_project_get($project, $url, &$context) {
  * it. However, it is supported here because it is a common configuration on
  * shared hosting, and there is nothing Drupal can do to prevent it.
  *
- * @return
+ * @return bool
  *   TRUE if local file transfers are allowed on this server, or FALSE if not.
  *
  * @see install_check_requirements()
diff --git a/core/modules/update/update.module b/core/modules/update/update.module
index 84e02d971809..4e24834e43ee 100644
--- a/core/modules/update/update.module
+++ b/core/modules/update/update.module
@@ -131,7 +131,7 @@ function update_page_top() {
  * It both enforces the 'administer software updates' permission and the global
  * kill switch for the authorize.php script.
  *
- * @return
+ * @return bool
  *   TRUE if the current user can access the updater menu items; FALSE
  *   otherwise.
  */
@@ -268,7 +268,7 @@ function _update_no_data() {
  *   (optional) Boolean to indicate if this method should refresh automatically
  *   if there's no data. Defaults to FALSE.
  *
- * @return
+ * @return array
  *   Array of data about available releases, keyed by project shortname.
  *
  * @see update_refresh()
@@ -429,7 +429,7 @@ function update_mail($key, &$message, $params) {
  * @param $langcode
  *   (optional) A language code to use. Defaults to NULL.
  *
- * @return
+ * @return \Drupal\Core\StringTranslation\TranslatableMarkup
  *   The properly translated error message for the given key.
  */
 function _update_message_text($msg_type, $msg_reason, $langcode = NULL) {
@@ -604,7 +604,7 @@ function update_storage_clear() {
 /**
  * Returns a short unique identifier for this Drupal installation.
  *
- * @return
+ * @return string
  *   An eight character string uniquely identifying this Drupal installation.
  */
 function _update_manager_unique_identifier() {
@@ -622,7 +622,7 @@ function _update_manager_unique_identifier() {
  *   (optional) Whether to attempt to create the directory if it does not
  *   already exist. Defaults to TRUE.
  *
- * @return
+ * @return string
  *   The full path to the temporary directory where update file archives should
  *   be extracted.
  */
@@ -644,7 +644,7 @@ function _update_manager_extract_directory($create = TRUE) {
  *   (optional) Whether to attempt to create the directory if it does not
  *   already exist. Defaults to TRUE.
  *
- * @return
+ * @return string
  *   The full path to the temporary directory where update file archives should
  *   be cached.
  */
diff --git a/core/modules/views/src/Plugin/views/ViewsPluginInterface.php b/core/modules/views/src/Plugin/views/ViewsPluginInterface.php
index ddc5341f0944..4aceb2415af2 100644
--- a/core/modules/views/src/Plugin/views/ViewsPluginInterface.php
+++ b/core/modules/views/src/Plugin/views/ViewsPluginInterface.php
@@ -151,7 +151,7 @@ public function destroy();
   /**
    * Validate that the plugin is correct and can be saved.
    *
-   * @return
+   * @return array|null
    *   An array of error strings to tell the user what is wrong with this
    *   plugin.
    */
diff --git a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
index d156ad72a7f3..ff5042485c1c 100644
--- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
+++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
@@ -741,7 +741,7 @@ public function defaultSummaryForm(&$form, FormStateInterface $form_state) {
    *
    * Override this method only with extreme care.
    *
-   * @return
+   * @return bool
    *   A boolean value; if TRUE, continue building this view. If FALSE,
    *   building the view will be aborted here.
    */
@@ -894,9 +894,6 @@ protected function defaultSummary() {
    * - addField: add a 'num_nodes' field for the count. Usually it will
    *   be a count on $view->base_field
    * - setCountField: Reset the count field so we get the right paging.
-   *
-   * @return
-   *   The alias used to get the number of records (count) for this entry.
    */
   protected function summaryQuery() {
     $this->ensureMyTable();
@@ -904,7 +901,7 @@ protected function summaryQuery() {
     $this->base_alias = $this->query->addField($this->tableAlias, $this->realField);
 
     $this->summaryNameField();
-    return $this->summaryBasics();
+    $this->summaryBasics();
   }
 
   /**
diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php b/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php
index abf16ebe8fbf..abc03be58ca8 100644
--- a/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php
+++ b/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php
@@ -247,7 +247,7 @@ public function getUrl();
   /**
    * Determines if an option is set to use the default or current display.
    *
-   * @return
+   * @return bool
    *   TRUE for the default display.
    */
   public function isDefaulted($option);
@@ -516,7 +516,7 @@ public function getType();
   /**
    * Make sure the display and all associated handlers are valid.
    *
-   * @return
+   * @return array
    *   Empty array if the display is valid; an array of error strings if it is
    *   not.
    */
diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
index b777f41c04c0..12e2235216a9 100644
--- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
+++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
@@ -1700,7 +1700,7 @@ protected function getFieldTokenPlaceholder() {
    * @param $parent_keys
    *   An array of parent keys. This will represent the array depth.
    *
-   * @return
+   * @return array
    *   An array of available tokens, with nested keys representative of the array structure.
    */
   protected function getTokenValuesRecursive(array $array, array $parent_keys = []) {
diff --git a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
index 639a249e6109..582023b3ea8f 100644
--- a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
+++ b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
@@ -172,7 +172,7 @@ public function getLimit() {
    * @param $where
    *   'where' or 'having'.
    *
-   * @return
+   * @return int|string
    *   The group ID generated.
    */
   public function setWhereGroup($type = 'AND', $group = NULL, $where = 'where') {
diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php
index 28571aecfe89..0672bf6e7ddf 100644
--- a/core/modules/views/src/Plugin/views/query/Sql.php
+++ b/core/modules/views/src/Plugin/views/query/Sql.php
@@ -580,7 +580,7 @@ protected function markTable($table, $relationship, $alias) {
    * @param \Drupal\views\Plugin\views\join\JoinPluginBase $join
    *   A Join object (or derived object) to join the alias in.
    *
-   * @return
+   * @return string|null
    *   The alias used to refer to this specific table, or NULL if the table
    *   cannot be ensured.
    */
diff --git a/core/modules/views/src/Plugin/views/style/Rss.php b/core/modules/views/src/Plugin/views/style/Rss.php
index 8095e36f8634..bea3089ab24d 100644
--- a/core/modules/views/src/Plugin/views/style/Rss.php
+++ b/core/modules/views/src/Plugin/views/style/Rss.php
@@ -84,7 +84,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
   /**
    * Return an array of additional XHTML elements to add to the channel.
    *
-   * @return
+   * @return array
    *   A render array.
    */
   protected function getChannelElements() {
diff --git a/core/modules/views/src/Plugin/views/style/StylePluginBase.php b/core/modules/views/src/Plugin/views/style/StylePluginBase.php
index 1d2a63a62fa9..029e443097cb 100644
--- a/core/modules/views/src/Plugin/views/style/StylePluginBase.php
+++ b/core/modules/views/src/Plugin/views/style/StylePluginBase.php
@@ -526,7 +526,7 @@ public function renderGroupingSets($sets) {
    *   $groupings is an old-style string or if the rendered option is missing
    *   for a grouping instruction.
    *
-   * @return
+   * @return array
    *   The grouped record set.
    *   A nested set structure is generated if multiple grouping fields are used.
    *
diff --git a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
index 206cf86430db..f575a18ca919 100644
--- a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
+++ b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
@@ -514,7 +514,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
    *   An array representing the current version of the #select element within
    *   the form.
    *
-   * @return
+   * @return array|string
    *   The current value of the #select element. A common use for this is to feed
    *   it back into $element['#default_value'] so that the form will be rendered
    *   with the correct value selected.
diff --git a/core/modules/views/src/Views.php b/core/modules/views/src/Views.php
index 11b049ed27fa..33ec07304a35 100644
--- a/core/modules/views/src/Views.php
+++ b/core/modules/views/src/Views.php
@@ -137,7 +137,7 @@ public static function getView($id) {
    * @param array $base
    *   An array of possible base tables.
    *
-   * @return
+   * @return array
    *   A keyed array of in the form of 'base_table' => 'Description'.
    */
   public static function fetchPluginNames($type, $key = NULL, array $base = []) {
diff --git a/core/modules/views_ui/admin.inc b/core/modules/views_ui/admin.inc
index 31d0ddaed182..230dd773ae19 100644
--- a/core/modules/views_ui/admin.inc
+++ b/core/modules/views_ui/admin.inc
@@ -182,7 +182,7 @@ function views_ui_add_ajax_wrapper($element, FormStateInterface $form_state) {
 /**
  * Updates a part of the add view form via AJAX.
  *
- * @return
+ * @return array
  *   The part of the form that has changed.
  */
 function views_ui_ajax_update_form($form, FormStateInterface $form_state) {
diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php
index 30dc3edba53e..1af5cabb25bc 100644
--- a/core/modules/views_ui/src/ViewUI.php
+++ b/core/modules/views_ui/src/ViewUI.php
@@ -835,7 +835,7 @@ public function renderPreview($display_id, $args = []) {
   /**
    * Get the user's current progress through the form stack.
    *
-   * @return
+   * @return array|bool
    *   FALSE if the user is not currently in a multiple-form stack. Otherwise,
    *   an associative array with the following keys:
    *   - current: The number of the current form on the stack.
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index c8a0dbdf8732..a1e107442575 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -71,7 +71,6 @@
     <exclude name="Drupal.Commenting.FunctionComment.Missing"/>
     <exclude name="Drupal.Commenting.FunctionComment.MissingParamType"/>
     <exclude name="Drupal.Commenting.FunctionComment.MissingReturnComment"/>
-    <exclude name="Drupal.Commenting.FunctionComment.MissingReturnType"/>
     <exclude name="Drupal.Commenting.FunctionComment.ParamCommentFullStop"/>
     <exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
   </rule>
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php
index 1b62d89451ff..e476ce54f16d 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php
@@ -28,7 +28,7 @@ class DatabaseBackendTest extends GenericCacheBackendUnitTestBase {
   /**
    * Creates a new instance of DatabaseBackend.
    *
-   * @return
+   * @return \Drupal\Core\Cache\DatabaseBackend
    *   A new DatabaseBackend object.
    */
   protected function createCacheBackend($bin) {
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/MemoryBackendTest.php b/core/tests/Drupal/KernelTests/Core/Cache/MemoryBackendTest.php
index 4518532cf6ef..ad6da493024a 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/MemoryBackendTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/MemoryBackendTest.php
@@ -14,7 +14,7 @@ class MemoryBackendTest extends GenericCacheBackendUnitTestBase {
   /**
    * Creates a new instance of MemoryBackend.
    *
-   * @return
+   * @return \Drupal\Core\Cache\CacheBackendInterface
    *   A new MemoryBackend object.
    */
   protected function createCacheBackend($bin) {
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/PhpBackendTest.php b/core/tests/Drupal/KernelTests/Core/Cache/PhpBackendTest.php
index 486d2d43f799..b35a3b94f035 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/PhpBackendTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/PhpBackendTest.php
@@ -14,8 +14,8 @@ class PhpBackendTest extends GenericCacheBackendUnitTestBase {
   /**
    * Creates a new instance of MemoryBackend.
    *
-   * @return
-   *   A new MemoryBackend object.
+   * @return \Drupal\Core\Cache\CacheBackendInterface
+   *   A new PhpBackend object.
    */
   protected function createCacheBackend($bin) {
     $backend = new PhpBackend($bin, \Drupal::service('cache_tags.invalidator.checksum'));
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php
index 9e8998461f1d..fe523eecf071 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php
@@ -151,11 +151,11 @@ public function assertDirectoryPermissions($directory, $expected_mode, $message
   /**
    * Create a directory and assert it exists.
    *
-   * @param $path
+   * @param string $path
    *   Optional string with a directory path. If none is provided, a random
    *   name in the site's files directory will be used.
    *
-   * @return
+   * @return string
    *   The path to the directory.
    */
   public function createDirectory($path = NULL) {
@@ -181,7 +181,7 @@ public function createDirectory($path = NULL) {
    *   Optional string indicating the stream scheme to use. Drupal core includes
    *   public, private, and temporary. The public wrapper is the default.
    *
-   * @return
+   * @return string
    *   File URI.
    */
   public function createUri($filepath = NULL, $contents = NULL, $scheme = NULL) {
-- 
GitLab