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

merge-requests/828/head^2
Alex Pott 2022-09-27 11:02:42 +01:00
parent b083e4075f
commit 452bf180c4
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
92 changed files with 203 additions and 213 deletions

View File

@ -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

View File

@ -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) {

View File

@ -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

View File

@ -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) {

View File

@ -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'

View File

@ -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') {

View File

@ -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.

View File

@ -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.

View File

@ -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.
*

View File

@ -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.

View File

@ -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();

View File

@ -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) {

View File

@ -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.

View File

@ -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 = '') {

View File

@ -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();

View File

@ -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) {

View File

@ -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.

View File

@ -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.
*/

View File

@ -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

View File

@ -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);

View File

@ -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();

View File

@ -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

View File

@ -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;
}
}

View File

@ -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();

View File

@ -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);

View File

@ -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;
}
/**

View File

@ -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.
*/

View File

@ -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) {

View File

@ -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);

View File

@ -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.

View File

@ -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.
*

View File

@ -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.
*

View File

@ -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.
*/

View File

@ -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) {

View File

@ -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.

View File

@ -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:

View File

@ -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

View File

@ -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.
*/

View File

@ -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

View File

@ -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

View File

@ -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) {

View File

@ -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);

View File

@ -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()

View File

@ -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.
*/

View File

@ -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

View File

@ -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) {

View File

@ -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);

View File

@ -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) {

View File

@ -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) {

View File

@ -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.
*/

View File

@ -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) {

View File

@ -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) {

View File

@ -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.

View File

@ -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);

View File

@ -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) {

View File

@ -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) {

View File

@ -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()

View File

@ -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()

View File

@ -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

View File

@ -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()

View File

@ -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) {

View File

@ -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

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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.
*/

View File

@ -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) {

View File

@ -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

View File

@ -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) {

View File

@ -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'.

View File

@ -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.
*

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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();
}
/**

View File

@ -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.
*/

View File

@ -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 = []) {

View File

@ -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') {

View File

@ -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.
*/

View File

@ -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() {

View File

@ -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.
*

View File

@ -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.

View File

@ -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 = []) {

View File

@ -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) {

View File

@ -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.

View File

@ -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>

View File

@ -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) {

View File

@ -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) {

View File

@ -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'));

View File

@ -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) {