diff --git a/core/includes/common.inc b/core/includes/common.inc index 2bee0e5547e..b61593949c9 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -383,7 +383,7 @@ function drupal_attach_tabledrag(&$element, array $options) { * @param $element * The element to be rendered. * - * @return + * @return \Drupal\Component\Render\MarkupInterface|null * The rendered element. * * @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use @@ -429,7 +429,7 @@ function render(&$element) { * @param $element * The element to be hidden. * - * @return + * @return array * The element. * * @see \Drupal\Core\Render\RendererInterface @@ -459,7 +459,7 @@ function hide(&$element) { * @param $element * The element to be shown. * - * @return + * @return array * The element. * * @see \Drupal\Core\Render\RendererInterface @@ -664,7 +664,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 a4bffb2f3b1..4bf4fade14c 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/file.inc b/core/includes/file.inc index 29bbae45fa3..32543a4c1b3 100644 --- a/core/includes/file.inc +++ b/core/includes/file.inc @@ -203,7 +203,7 @@ function file_munge_filename($filename, $extensions, $alerts = TRUE) { * @param $filename * String with the filename to be unmunged. * - * @return + * @return string * An unmunged filename string. * * @deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use diff --git a/core/includes/form.inc b/core/includes/form.inc index 5959b598e8e..4f353d00882 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 60d9bae8178..c0decec1dd8 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -551,7 +551,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) { @@ -608,7 +608,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) { @@ -711,7 +711,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) { @@ -747,7 +747,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(). */ @@ -908,7 +908,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. * @@ -981,7 +981,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() @@ -996,7 +996,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() @@ -1074,7 +1074,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) { @@ -1120,7 +1120,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. */ @@ -1224,7 +1224,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. @@ -1312,7 +1312,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(). * @@ -1343,7 +1343,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 @@ -1560,7 +1560,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) { @@ -1669,7 +1669,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) { @@ -1720,7 +1720,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) { @@ -1850,9 +1850,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']; @@ -2262,7 +2259,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 adc4a787e3c..fe8ac5bd109 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 5bb5497b419..55e73b485af 100644 --- a/core/includes/module.inc +++ b/core/includes/module.inc @@ -13,7 +13,7 @@ use Drupal\Core\Extension\ExtensionDiscovery; * @param $module * The name of the module (without the .module extension). * - * @return + * @return bool|string * The name of the module's install file, if successful; FALSE otherwise. * * @deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. Use @@ -63,7 +63,7 @@ function module_load_install($module) { * (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 14bdbc9608b..5bc2fa18a4f 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -84,7 +84,7 @@ const RESPONSIVE_PRIORITY_LOW = 'priority-low'; * 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. */ @@ -307,7 +307,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) { @@ -476,7 +476,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) { @@ -1459,7 +1459,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 28dc0958b0c..2d552f888c8 100644 --- a/core/includes/update.inc +++ b/core/includes/update.inc @@ -335,7 +335,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 @@ -453,7 +453,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 @@ -519,7 +519,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 @@ -577,7 +577,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 @@ -645,7 +645,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. */ @@ -661,7 +661,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. */ @@ -677,7 +677,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 8bc912d3bd9..a54377aa53c 100644 --- a/core/lib/Drupal/Component/Gettext/PoHeader.php +++ b/core/lib/Drupal/Component/Gettext/PoHeader.php @@ -183,10 +183,11 @@ class PoHeader { * @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 @@ class PoHeader { * @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 33534ecafb1..59992991294 100644 --- a/core/lib/Drupal/Component/Gettext/PoStreamInterface.php +++ b/core/lib/Drupal/Component/Gettext/PoStreamInterface.php @@ -23,7 +23,7 @@ interface PoStreamInterface { /** * 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 9b444260668..87f50601e62 100644 --- a/core/lib/Drupal/Component/Gettext/PoStreamReader.php +++ b/core/lib/Drupal/Component/Gettext/PoStreamReader.php @@ -237,7 +237,7 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface { * 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 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface { * @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 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface { * @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 b155faa6625..6fe9cf21b00 100644 --- a/core/lib/Drupal/Component/Graph/Graph.php +++ b/core/lib/Drupal/Component/Graph/Graph.php @@ -44,7 +44,7 @@ class 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 b23a2135184..79e275bdc05 100644 --- a/core/lib/Drupal/Component/Utility/UrlHelper.php +++ b/core/lib/Drupal/Component/Utility/UrlHelper.php @@ -73,7 +73,7 @@ class UrlHelper { * @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 f9f8a7b486f..c5637b676c3 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 c01a1ba8717..9d12c6773c4 100644 --- a/core/lib/Drupal/Core/Asset/CssOptimizer.php +++ b/core/lib/Drupal/Core/Asset/CssOptimizer.php @@ -118,7 +118,7 @@ class CssOptimizer implements AssetOptimizerInterface { * @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) { @@ -180,7 +180,7 @@ class CssOptimizer implements AssetOptimizerInterface { * 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() @@ -211,7 +211,7 @@ class CssOptimizer implements AssetOptimizerInterface { * (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 107126903ed..f171e184941 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php @@ -186,7 +186,7 @@ class ConfigDependencyManager { * @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 15b07b561f6..97c5c4d4860 100644 --- a/core/lib/Drupal/Core/Database/Connection.php +++ b/core/lib/Drupal/Core/Database/Connection.php @@ -1917,7 +1917,7 @@ abstract class Connection { * @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() @@ -1953,7 +1953,7 @@ abstract class Connection { * 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 6499a2b6703..f2988946887 100644 --- a/core/lib/Drupal/Core/Database/Log.php +++ b/core/lib/Drupal/Core/Database/Log.php @@ -70,7 +70,7 @@ class Log { * @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) { @@ -144,7 +144,7 @@ class Log { * 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 a77c26acd37..347019569c7 100644 --- a/core/lib/Drupal/Core/Database/Query/AlterableInterface.php +++ b/core/lib/Drupal/Core/Database/Query/AlterableInterface.php @@ -30,7 +30,7 @@ interface AlterableInterface { * @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 @@ interface AlterableInterface { * @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 @@ interface AlterableInterface { * @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 @@ interface AlterableInterface { * @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 5c08c980101..347f25645af 100644 --- a/core/lib/Drupal/Core/Database/Query/ConditionInterface.php +++ b/core/lib/Drupal/Core/Database/Query/ConditionInterface.php @@ -170,7 +170,7 @@ interface ConditionInterface { /** * 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 @@ interface ConditionInterface { /** * 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 af4e32820f0..cb2ee9d336b 100644 --- a/core/lib/Drupal/Core/Database/Query/Insert.php +++ b/core/lib/Drupal/Core/Database/Query/Insert.php @@ -57,7 +57,7 @@ class Insert extends Query implements \Countable { /** * 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 fffca6ce9f7..1a13acf5c01 100644 --- a/core/lib/Drupal/Core/Database/Query/Merge.php +++ b/core/lib/Drupal/Core/Database/Query/Merge.php @@ -356,7 +356,7 @@ class Merge extends Query implements ConditionInterface { /** * 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. @@ -420,6 +420,7 @@ class Merge extends Query implements ConditionInterface { } throw $e; } + return NULL; } } diff --git a/core/lib/Drupal/Core/Database/Query/PlaceholderInterface.php b/core/lib/Drupal/Core/Database/Query/PlaceholderInterface.php index f2a00dec5c1..9295a369ad6 100644 --- a/core/lib/Drupal/Core/Database/Query/PlaceholderInterface.php +++ b/core/lib/Drupal/Core/Database/Query/PlaceholderInterface.php @@ -15,7 +15,7 @@ interface PlaceholderInterface { /** * 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 449d0b64d3c..d89693fd6fd 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 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend * $fields =& $query->getExpressions(); * @endcode * - * @return + * @return array * A reference to the expression array structure. */ public function &getExpressions(); @@ -62,7 +62,7 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend * $fields =& $query->getOrderBy(); * @endcode * - * @return + * @return array * A reference to the expression array structure. */ public function &getOrderBy(); @@ -80,7 +80,7 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend * $fields =& $query->getGroupBy(); * @endcode * - * @return + * @return array * A reference to the group-by array structure. */ public function &getGroupBy(); @@ -98,7 +98,7 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend * $tables =& $query->getTables(); * @endcode * - * @return + * @return array * A reference to the tables array structure. */ public function &getTables(); @@ -117,7 +117,7 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend * $fields =& $query->getUnion(); * @endcode * - * @return + * @return array * A reference to the union query array structure. */ public function &getUnion(); @@ -145,7 +145,7 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend * @param string $string * An unsanitized field name. * - * @return + * @return string * The sanitized field name string. */ public function escapeField($string); @@ -157,7 +157,7 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend * 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 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend * 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 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend * @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 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend * @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 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend * @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 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend * @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 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend * @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 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend /** * 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 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend /** * 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 7cfce9cd7d3..01f0c9d47da 100644 --- a/core/lib/Drupal/Core/Database/Query/Truncate.php +++ b/core/lib/Drupal/Core/Database/Query/Truncate.php @@ -38,7 +38,7 @@ class Truncate extends Query { /** * 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 @@ class Truncate extends Query { 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 1311083e102..fb7db437af8 100644 --- a/core/lib/Drupal/Core/Database/Query/Update.php +++ b/core/lib/Drupal/Core/Database/Query/Update.php @@ -115,7 +115,7 @@ class Update extends Query implements ConditionInterface { /** * 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 6c91b5d4a01..87c29583bdd 100644 --- a/core/lib/Drupal/Core/Database/Schema.php +++ b/core/lib/Drupal/Core/Database/Schema.php @@ -162,7 +162,7 @@ abstract class Schema implements PlaceholderInterface { * @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) { @@ -248,7 +248,7 @@ abstract class Schema implements PlaceholderInterface { * @param string $column * The name of the column. * - * @return + * @return bool * TRUE if the given column exists, otherwise FALSE. */ public function fieldExists($table, $column) { @@ -296,7 +296,7 @@ abstract class Schema implements PlaceholderInterface { * @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. */ @@ -340,7 +340,7 @@ abstract class Schema implements PlaceholderInterface { * @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. */ @@ -354,7 +354,7 @@ abstract class Schema implements PlaceholderInterface { * @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); @@ -380,7 +380,7 @@ abstract class Schema implements PlaceholderInterface { * @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. */ @@ -431,7 +431,7 @@ abstract class Schema implements PlaceholderInterface { * @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. */ @@ -507,7 +507,7 @@ abstract class Schema implements PlaceholderInterface { * @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. */ @@ -633,7 +633,7 @@ abstract class Schema implements PlaceholderInterface { * @param $fields * An array of key/index column specifiers. * - * @return + * @return array * An array of field names. */ public function fieldNames($fields) { @@ -657,7 +657,7 @@ abstract class Schema implements PlaceholderInterface { * @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 e1012deccea..74507d36678 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 @@ interface StatementInterface extends \Traversable { /** * Gets the query string of this statement. * - * @return + * @return string * The query string, in its form with placeholders. */ public function getQueryString(); @@ -57,7 +57,7 @@ interface StatementInterface extends \Traversable { /** * 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. @@ -99,7 +99,7 @@ interface StatementInterface extends \Traversable { * @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); @@ -110,7 +110,7 @@ interface StatementInterface extends \Traversable { * @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); @@ -143,7 +143,7 @@ interface StatementInterface extends \Traversable { * 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(); @@ -158,7 +158,7 @@ interface StatementInterface extends \Traversable { * @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); @@ -171,7 +171,7 @@ interface StatementInterface extends \Traversable { * @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); @@ -191,7 +191,7 @@ interface StatementInterface extends \Traversable { * @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); @@ -210,7 +210,7 @@ interface StatementInterface extends \Traversable { * 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 610c2d48dfe..1c455f49417 100644 --- a/core/lib/Drupal/Core/Datetime/Element/Datelist.php +++ b/core/lib/Drupal/Core/Datetime/Element/Datelist.php @@ -359,7 +359,7 @@ class Datelist extends DateElementBase { * @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 eb99d5a90b3..99e6bbf7cb2 100644 --- a/core/lib/Drupal/Core/Entity/EntityStorageInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php @@ -145,7 +145,7 @@ interface EntityStorageInterface { * @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 3da44873079..8951a18d14e 100644 --- a/core/lib/Drupal/Core/Entity/EntityViewBuilderInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityViewBuilderInterface.php @@ -60,7 +60,7 @@ interface EntityViewBuilderInterface { * (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 1ffe6e088e8..e268204f6e1 100644 --- a/core/lib/Drupal/Core/Entity/RevisionableInterface.php +++ b/core/lib/Drupal/Core/Entity/RevisionableInterface.php @@ -48,7 +48,7 @@ interface RevisionableInterface extends EntityInterface { /** * 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 fefd1c17561..261a3bbe9d3 100644 --- a/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php @@ -179,7 +179,7 @@ class FinalExceptionSubscriber implements EventSubscriberInterface { * @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 909ce63d449..489ccef5bae 100644 --- a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php +++ b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php @@ -103,7 +103,7 @@ interface ModuleHandlerInterface { * 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 69be62ed091..60e35eecf2a 100644 --- a/core/lib/Drupal/Core/Extension/module.api.php +++ b/core/lib/Drupal/Core/Extension/module.api.php @@ -74,7 +74,7 @@ use Drupal\Core\Utility\UpdateException; * * 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 33a5be1c85a..a6c15a7db26 100644 --- a/core/lib/Drupal/Core/File/file.api.php +++ b/core/lib/Drupal/Core/File/file.api.php @@ -23,7 +23,7 @@ use Drupal\Core\StreamWrapper\StreamWrapperManager; * @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 5e3ead3a4c0..fd98398fea8 100644 --- a/core/lib/Drupal/Core/Flood/FloodInterface.php +++ b/core/lib/Drupal/Core/Flood/FloodInterface.php @@ -54,7 +54,7 @@ interface FloodInterface { * (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 2af4360dcab..55b690ad370 100644 --- a/core/lib/Drupal/Core/Queue/DatabaseQueue.php +++ b/core/lib/Drupal/Core/Queue/DatabaseQueue.php @@ -76,7 +76,7 @@ class DatabaseQueue implements ReliableQueueInterface, QueueGarbageCollectionInt * @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 449ad6a0dd0..8b9ff654c06 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 @@ interface QueueInterface { * 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 cfd1b4ba8fd..794b36bb8a3 100644 --- a/core/lib/Drupal/Core/Render/Element/Details.php +++ b/core/lib/Drupal/Core/Render/Element/Details.php @@ -66,7 +66,7 @@ class Details extends RenderElement { * 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 4a5bcf76922..e6454d4aa87 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 ef7d7faf2ce..f0ea0afccfb 100644 --- a/core/lib/Drupal/Core/Utility/ProjectInfo.php +++ b/core/lib/Drupal/Core/Utility/ProjectInfo.php @@ -169,7 +169,7 @@ class ProjectInfo { * (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 8abb17d7802..34b97dfb5db 100644 --- a/core/lib/Drupal/Core/Utility/ThemeRegistry.php +++ b/core/lib/Drupal/Core/Utility/ThemeRegistry.php @@ -79,7 +79,7 @@ class ThemeRegistry extends CacheCollector implements DestructableInterface { /** * 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 4d1417d1736..9fd09d9794d 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 42fec612eea..1760113fe41 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 44107f2f906..959c45cb9a9 100644 --- a/core/modules/book/src/BookManagerInterface.php +++ b/core/modules/book/src/BookManagerInterface.php @@ -274,7 +274,7 @@ interface BookManagerInterface { * @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 9910ba31bdc..0e0a547dbe0 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 953d8816e7b..82c0ed482dd 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 @@ abstract class ContentTranslationUITestBase extends ContentTranslationTestBase { * @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 ec567dc139f..91ca8c0f908 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 @@ require_once __DIR__ . '/field_test.field.inc'; * @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 4656ed5dca4..5fffae3a45b 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 6ee56cd81c3..abb7050afeb 100644 --- a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php +++ b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php @@ -169,7 +169,7 @@ abstract class FieldKernelTestBase extends KernelTestBase { * @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 6551ae3274f..22fc35d8992 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 7ab14ba30d2..8730d15ab90 100644 --- a/core/modules/forum/src/ForumManagerInterface.php +++ b/core/modules/forum/src/ForumManagerInterface.php @@ -72,7 +72,7 @@ interface ForumManagerInterface { * @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 27713afbb0a..c835449534e 100644 --- a/core/modules/image/image.module +++ b/core/modules/image/image.module @@ -206,7 +206,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 cdadb045da4..6a0cb188af0 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 @@ class Schema extends DatabaseSchema { * @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 b0006cf8cdd..0f35404d7fd 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 7e194d91b6a..71cf4edad70 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) { @@ -894,7 +894,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 fb695dd3459..d19d8790ed9 100644 --- a/core/modules/path_alias/src/AliasManager.php +++ b/core/modules/path_alias/src/AliasManager.php @@ -275,9 +275,6 @@ class AliasManager implements AliasManagerInterface { * * @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/quickedit/quickedit.api.php b/core/modules/quickedit/quickedit.api.php index daebe6c95e1..ff9a179f8aa 100644 --- a/core/modules/quickedit/quickedit.api.php +++ b/core/modules/quickedit/quickedit.api.php @@ -64,7 +64,7 @@ function hook_quickedit_editor_alter(&$editors) { * @param string $langcode * (Optional) The language code the field values are to be shown in. * - * @return + * @return array * A renderable array for the field value. * * @see \Drupal\Core\Field\FieldItemListInterface::view() diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index 85905c98b59..e86bf622fd9 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 ff893d27518..02e28976af4 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 @@ class Schema extends DatabaseSchema { * @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 @@ class Schema extends DatabaseSchema { * @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 89b2e7abf97..d8fc9d36ee4 100644 --- a/core/modules/system/src/SystemManager.php +++ b/core/modules/system/src/SystemManager.php @@ -127,7 +127,7 @@ class SystemManager { * 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 deba8f16a01..13f97debade 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) { @@ -949,7 +946,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 08c4db5e8ab..007ae8736a4 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 ecb9e260547..b9d00c44b94 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 8b123f0882a..a300f3c4436 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 @@ class SessionHttpsTest extends BrowserTestBase { * @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 @@ class SessionHttpsTest extends BrowserTestBase { * @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/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index c221d7c4a79..52e7e69f7a5 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -209,7 +209,7 @@ function taxonomy_vocabulary_get_names() { * @param $vocabulary * (optional) Vocabulary machine name to limit the search. Defaults to NULL. * - * @return + * @return \Drupal\taxonomy\TermInterface[] * An array of matching term objects. * * @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use @@ -259,7 +259,7 @@ function taxonomy_implode_tags($tags, $vid = NULL) { * @param \Drupal\taxonomy\Entity\Term $term * A taxonomy term entity. * - * @return + * @return string * The term name to be used as the page title. * * @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use diff --git a/core/modules/text/text.module b/core/modules/text/text.module index 509b3b72426..c0a03c62f97 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 34be7a8156c..bf2ddf362b7 100644 --- a/core/modules/toolbar/toolbar.api.php +++ b/core/modules/toolbar/toolbar.api.php @@ -36,7 +36,7 @@ use Drupal\Core\Url; * * 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 1a6e0ef00b9..18ff68f9d0c 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 f4dfb70d267..1d3aa580cf1 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 ed845df6fdd..f3b9e64f1a6 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 7895b559902..0de8675ad11 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 84e02d97180..4e24834e43e 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 ddc5341f094..4aceb2415af 100644 --- a/core/modules/views/src/Plugin/views/ViewsPluginInterface.php +++ b/core/modules/views/src/Plugin/views/ViewsPluginInterface.php @@ -151,7 +151,7 @@ interface ViewsPluginInterface extends PluginInspectionInterface, DerivativeInsp /** * 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 21060900327..c0e70e364b1 100644 --- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php @@ -701,7 +701,7 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend * * 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. */ @@ -854,9 +854,6 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend * - 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(); @@ -864,7 +861,7 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend $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 abf16ebe8fb..abc03be58ca 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 @@ interface DisplayPluginInterface { /** * 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 @@ interface DisplayPluginInterface { /** * 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 98351f05ce3..9768d0a0d1f 100644 --- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php @@ -1685,7 +1685,7 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf * @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 4a2aac59a28..4a255b25bed 100644 --- a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php +++ b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php @@ -167,7 +167,7 @@ abstract class QueryPluginBase extends PluginBase implements CacheableDependency * @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 48c956e3ed7..faaf79847ae 100644 --- a/core/modules/views/src/Plugin/views/query/Sql.php +++ b/core/modules/views/src/Plugin/views/query/Sql.php @@ -575,7 +575,7 @@ class Sql extends QueryPluginBase { * @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 6693c4863e7..1442276c594 100644 --- a/core/modules/views/src/Plugin/views/style/Rss.php +++ b/core/modules/views/src/Plugin/views/style/Rss.php @@ -74,7 +74,7 @@ class Rss extends StylePluginBase { /** * 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 33c8af36ece..e39e5cd7cfc 100644 --- a/core/modules/views/src/Plugin/views/style/StylePluginBase.php +++ b/core/modules/views/src/Plugin/views/style/StylePluginBase.php @@ -545,7 +545,7 @@ abstract class StylePluginBase extends PluginBase { * $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 2aa71a94a8f..fdf903c13d3 100644 --- a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php +++ b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php @@ -518,7 +518,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface { * 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 11b049ed27f..33ec07304a3 100644 --- a/core/modules/views/src/Views.php +++ b/core/modules/views/src/Views.php @@ -137,7 +137,7 @@ class Views { * @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 31d0ddaed18..230dd773ae1 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 4e897085718..a686f31b97e 100644 --- a/core/modules/views_ui/src/ViewUI.php +++ b/core/modules/views_ui/src/ViewUI.php @@ -835,7 +835,7 @@ class ViewUI implements ViewEntityInterface { /** * 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 c8a0dbdf873..a1e10744257 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -71,7 +71,6 @@ - diff --git a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php index 1b62d89451f..e476ce54f16 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 4518532cf6e..ad6da493024 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 486d2d43f79..b35a3b94f03 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 ae15cde0cfd..374bf6239ed 100644 --- a/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php @@ -153,11 +153,11 @@ abstract class FileTestBase extends KernelTestBase { /** * 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) { @@ -183,7 +183,7 @@ abstract class FileTestBase extends KernelTestBase { * 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) {