Unverified Commit 4f61b6f6 authored by alexpott's avatar alexpott

Issue #2937513 by longwave, eltori, klausi, catch, idebr, xjm: Fix...

Issue #2937513 by longwave, eltori, klausi, catch, idebr, xjm: Fix 'Drupal.Commenting.DocComment.TagGroupSpacing' coding standard
parent e12e1ce8
......@@ -478,6 +478,7 @@ function _drupal_rewrite_settings_global(&$ref, $variable) {
* The container for variable values.
* @param string $variable_name
* Name of variable.
*
* @return string
* A string containing valid PHP code of the variable suitable for placing
* into settings.php.
......@@ -508,6 +509,7 @@ function _drupal_rewrite_settings_dump($variable, $variable_name) {
* A string to prepend to the variable's value.
* @param string $suffix
* A string to append to the variable's value.
*
* @return string
* A string containing valid PHP code of the variable suitable for placing
* into settings.php.
......
......@@ -222,6 +222,7 @@ protected function getUncachedMTime($directory) {
* The directory where the temporary filename will be created.
* @param $prefix
* The prefix of the generated temporary filename.
*
* @return string
* Returns the new temporary filename (with path), or FALSE on failure.
*/
......
......@@ -32,6 +32,7 @@ public function getDerivativeDefinition($derivative_id, $base_plugin_definition)
*
* @param array $base_plugin_definition
* The definition array of the base plugin.
*
* @return array
* An array of full derivative definitions keyed on derivative id.
*
......
......@@ -249,6 +249,7 @@ public function sentences($min_word_count, $capitalize = FALSE) {
* Generate paragraphs separated by double new line.
*
* @param int $paragraph_count
*
* @return string
*/
public function paragraphs($paragraph_count = 12) {
......
......@@ -188,6 +188,7 @@ public function getCssAssets(AttachedAssetsInterface $assets, $optimize) {
*
* @param \Drupal\Core\Asset\AttachedAssetsInterface $assets
* The assets attached to the current response.
*
* @return array
* A (possibly optimized) collection of JavaScript assets.
*/
......
......@@ -26,6 +26,7 @@ protected function configure() {
*
* @param \Symfony\Component\Console\Input\InputInterface $input
* Input object.
*
* @return \Drupal\Core\Database\Connection
*/
protected function getDatabaseConnection(InputInterface $input) {
......
......@@ -70,6 +70,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
* The database connection to use.
* @param array $schema_only
* Table patterns for which to only dump the schema, no data.
*
* @return string
* The PHP script.
*/
......@@ -105,6 +106,7 @@ protected function generateScript(Connection $connection, array $schema_only = [
*
* @param \Drupal\Core\Database\Connection $connection
* The database connection to use.
*
* @return array
* An array of table names.
*/
......
......@@ -269,6 +269,7 @@ protected function getFallbackName($name) {
* Configuration name with variables in square brackets.
* @param mixed $data
* Configuration data for the element.
*
* @return string
* Configuration name with variables replaced.
*/
......
......@@ -778,6 +778,7 @@ protected function expandArguments(&$query, &$args) {
*
* @param string $class
* The class for which we want the potentially driver-specific class.
*
* @return string
* The name of the class that should be used for this driver.
*/
......
......@@ -87,6 +87,7 @@ protected function buildTableNameCondition($table_name, $operator = '=', $add_pr
* The name of the table to create.
* @param $table
* A Schema API table definition array.
*
* @return
* An array of SQL statements to create the table.
*/
......
......@@ -281,6 +281,7 @@ public function escapeTable($table) {
*
* @param $string
* The string to escape.
*
* @return string
* The escaped string.
*/
......
......@@ -99,6 +99,7 @@ protected function ensureIdentifiersLength($table_identifier_part, $column_ident
*
* @param $table_name
* The non-prefixed name of the table.
*
* @return
* An object with two member variables:
* - 'blob_fields' that lists all the blob fields in the table.
......@@ -264,6 +265,7 @@ public function queryFieldInformation($table, $field, $constraint_type = 'c') {
* The name of the table to create.
* @param $table
* A Schema API table definition array.
*
* @return
* An array of SQL statements to create the table.
*/
......@@ -1074,6 +1076,7 @@ public function getComment($table, $column = NULL) {
*
* @param $data
* String to be hashed.
*
* @return string
* A base-64 encoded sha-256 hash, with + and / replaced with _ and any =
* padding characters removed.
......
......@@ -48,6 +48,7 @@ public function fieldExists($table, $column) {
* The name of the table to create.
* @param $table
* A Schema API table definition array.
*
* @return
* An array of SQL statements to create the table.
*/
......
......@@ -69,6 +69,7 @@ public function start($logging_key) {
*
* @param $logging_key
* The logging key to fetch.
*
* @return
* An indexed array of all query records for this logging key.
*/
......
......@@ -169,6 +169,7 @@ public function getArguments(PlaceholderInterface $queryPlaceholder = NULL);
*
* @param $distinct
* TRUE to flag this query DISTINCT, FALSE to disable it.
*
* @return $this
* The called object.
*/
......@@ -188,6 +189,7 @@ public function distinct($distinct = TRUE);
* automatically based on the $table_alias and $field. The alias will be
* checked for uniqueness, so the requested alias may not be the alias
* that is assigned in all cases.
*
* @return
* The unique alias that was assigned for this field.
*/
......@@ -211,6 +213,7 @@ public function addField($table_alias, $field, $alias = NULL);
* An indexed array of fields present in the specified table that should be
* included in this query. If not specified, $table_alias.* will be generated
* without any aliases.
*
* @return $this
* The called object.
*/
......@@ -232,6 +235,7 @@ public function fields($table_alias, array $fields = []);
* in all cases.
* @param $arguments
* Any placeholder arguments needed for this expression.
*
* @return
* The unique alias that was assigned for this expression.
*/
......@@ -260,6 +264,7 @@ public function addExpression($expression, $alias = NULL, $arguments = []);
* system, for example, when joining the same table more than once.
* @param $arguments
* An array of arguments to replace into the $condition of this join.
*
* @return
* The unique alias that was assigned for this table.
*/
......@@ -286,6 +291,7 @@ public function join($table, $alias = NULL, $condition = NULL, $arguments = []);
* system, for example, when joining the same table more than once.
* @param $arguments
* An array of arguments to replace into the $condition of this join.
*
* @return
* The unique alias that was assigned for this table.
*/
......@@ -312,6 +318,7 @@ public function innerJoin($table, $alias = NULL, $condition = NULL, $arguments =
* system, for example, when joining the same table more than once.
* @param $arguments
* An array of arguments to replace into the $condition of this join.
*
* @return
* The unique alias that was assigned for this table.
*/
......@@ -338,6 +345,7 @@ public function leftJoin($table, $alias = NULL, $condition = NULL, $arguments =
* system, for example, when joining the same table more than once.
* @param $arguments
* An array of arguments to replace into the $condition of this join.
*
* @return
* The unique alias that was assigned for this table.
*
......@@ -379,6 +387,7 @@ public function rightJoin($table, $alias = NULL, $condition = NULL, $arguments =
* system, for example, when joining the same table more than once.
* @param $arguments
* An array of arguments to replace into the $condition of this join.
*
* @return
* The unique alias that was assigned for this table.
*/
......@@ -411,6 +420,7 @@ public function addJoin($type, $table, $alias = NULL, $condition = NULL, $argume
* @param $direction
* The direction to sort. Legal values are "ASC" and "DESC". Any other value
* will be converted to "ASC".
*
* @return $this
* The called object.
*/
......@@ -449,6 +459,7 @@ public function orderRandom();
* range directives that are set.
* @param $length
* The number of records to return from the result set.
*
* @return $this
* The called object.
*/
......@@ -474,6 +485,7 @@ public function range($start = NULL, $length = NULL);
* @param $type
* The type of UNION to add to the query. Defaults to plain
* UNION.
*
* @return $this
* The called object.
*/
......@@ -484,6 +496,7 @@ public function union(SelectInterface $query, $type = '');
*
* @param $field
* The field on which to group. This should be the field as aliased.
*
* @return $this
* The called object.
*/
......@@ -539,6 +552,7 @@ public function execute();
* The comparison operator, such as =, <, or >=. It also accepts more complex
* options such as IN, LIKE, or BETWEEN. Defaults to IN if $value is an array
* = otherwise.
*
* @return \Drupal\Core\Database\Query\ConditionInterface
* The called object.
*/
......
......@@ -216,6 +216,7 @@ protected function throwPDOException() {
* The query.
* @param array|null $args
* An array of arguments. This can be NULL.
*
* @return \PDOStatement
* A PDOStatement object.
*/
......
......@@ -452,6 +452,7 @@ protected function getFieldDefinitions() {
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $definition
* A field definition.
*
* @return array|null
*/
private function fieldHasDisplayOptions(FieldDefinitionInterface $definition) {
......
......@@ -35,6 +35,7 @@ public function condition($field, $function = NULL, $value = NULL, $operator = N
*
* @param $field
* @param string $langcode
*
* @return ConditionInterface
* @see \Drupal\Core\Entity\Query\QueryInterface::exists()
*/
......@@ -44,6 +45,7 @@ public function exists($field, $function, $langcode = NULL);
* Queries for the nonexistence of a field.
*
* @param string $field
*
* @return ConditionInterface
* @see \Drupal\Core\Entity\Query\QueryInterface::notExists()
*/
......
......@@ -107,6 +107,7 @@ public function condition($field, $value = NULL, $operator = NULL, $langcode = N
* Name of a field.
* @param $langcode
* Language code (optional).
*
* @return $this
*/
public function exists($field, $langcode = NULL);
......@@ -118,6 +119,7 @@ public function exists($field, $langcode = NULL);
* Name of a field.
* @param $langcode
* Language code (optional).
*
* @return $this
*/
public function notExists($field, $langcode = NULL);
......
......@@ -144,6 +144,7 @@ protected function finish() {
* The field as passed in by the caller.
* @param string $sql_field
* The sql field as returned by getSqlField.
*
* @return string
* The SQL alias expected in the return value. The dots in $sql_field are
* replaced with underscores and if a default fallback to .value happened,
......
......@@ -373,7 +373,9 @@ protected function ensureEntityTable($index_prefix, $property, $type, $langcode,
*
* @param $field_name
* Name of the field.
*
* @return string
*
* @throws \Drupal\Core\Entity\Query\QueryException
*/
protected function ensureFieldTable($index_prefix, &$field, $type, $langcode, $base_table, $entity_id_field, $field_id_field, $delta) {
......
......@@ -22,6 +22,7 @@
*
* @param $uri
* The URI of the file.
*
* @return
* 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
......
......@@ -1459,6 +1459,7 @@ protected static function schemaDefinition() {
*
* @param array $definitions
* The new menu link definitions.
*
* @return array
* A list of menu link IDs that no longer exist.
*/
......
......@@ -802,6 +802,7 @@ public function destruct() {
*
* @param $prefixes
* An array of function prefixes by which the list can be limited.
*
* @return array
* Functions grouped by the first prefix.
*/
......
......@@ -58,6 +58,7 @@ public function resetActiveTheme();
*
* @param \Drupal\Core\Theme\ActiveTheme $active_theme
* The new active theme.
*
* @return $this
*/
public function setActiveTheme(ActiveTheme $active_theme);
......
......@@ -25,6 +25,7 @@ interface TranslatorInterface {
* The domain for the message or null to use the default.
* @param string|null $locale
* The locale or null to use the default.
*
* @return string
* The translated string.
*
......
......@@ -45,6 +45,7 @@ public function isInternal();
*
* @param \Drupal\editor\Entity\Editor $editor
* A configured text editor object.
*
* @return array
* An unindexed array of plugin names this plugin requires. Each plugin is
* is identified by its annotated ID.
......@@ -59,6 +60,7 @@ public function getDependencies(Editor $editor);
*
* @param \Drupal\editor\Entity\Editor $editor
* A configured text editor object.
*
* @return array
* An array of libraries suitable for usage in a render API #attached
* property.
......@@ -91,6 +93,7 @@ public function getFile();
*
* @param \Drupal\editor\Entity\Editor $editor
* A configured text editor object.
*
* @return array
* A keyed array, whose keys will end up as keys under CKEDITOR.config.
*/
......
......@@ -60,6 +60,7 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac
* @param bool $include_internal_plugins
* Defaults to FALSE. When set to TRUE, plugins whose isInternal() method
* returns TRUE will also be included.
*
* @return array
* A list of the enabled CKEditor plugins, with the plugin IDs as keys and
* the Drupal root-relative plugin files as values.
......
......@@ -117,6 +117,7 @@ public function validateStylesValue(array $element, FormStateInterface $form_sta
*
* @param string $styles
* The "styles" setting.
*
* @return array|false
* An array containing the "stylesSet" configuration, or FALSE when the
* syntax is invalid.
......
......@@ -403,6 +403,7 @@ public function getLibraries(Editor $editor) {
*
* @param \Drupal\editor\Entity\Editor $editor
* A configured text editor object.
*
* @return array
* An array containing the "toolbar" configuration.
*/
......@@ -426,6 +427,7 @@ public function buildToolbarJSSetting(Editor $editor) {
*
* @param \Drupal\editor\Entity\Editor $editor
* A configured text editor object.
*
* @return array
* An array containing the "contentsCss" configuration.
*/
......
......@@ -75,6 +75,7 @@ public function getDisplayOrdinal(CommentInterface $comment, $comment_mode, $div
*
* @param \Drupal\comment\CommentInterface[] $comments
* An array of comment entities keyed by their ids.
*
* @return array
* The entity ids of the passed comment entities' children as an array.
*/
......
......@@ -39,6 +39,7 @@ protected function setUpLanguage() {
*
* @param string $langcode
* The language code.
*
* @return string
* Contents for the test .po file.
*/
......
......@@ -99,6 +99,7 @@ public function prepareTranslation(ContentEntityInterface $entity, LanguageInter
* The route match.
* @param string $entity_type_id
* (optional) The entity type ID.
*
* @return array
* Array of page elements to render.
*/
......
......@@ -24,6 +24,7 @@ abstract class FieldTestBase extends WebTestBase {
*
* @param $cardinality
* Number of values to generate.
*
* @return
* An array of random values, in the format expected for field values.
*/
......
......@@ -58,6 +58,7 @@
* The key under which to store to $value, or NULL as described above.
* @param $value
* A value to store for $key.
*
* @return
* An array mapping each $key to an array of each $value passed in
* for that key.
......
......@@ -17,6 +17,7 @@ abstract class FieldTestBase extends BrowserTestBase {
*
* @param $cardinality
* Number of values to generate.
*
* @return
* An array of random values, in the format expected for field values.
*/
......
......@@ -163,6 +163,7 @@ protected function entityValidateAndSave(EntityInterface $entity) {
*
* @param $cardinality
* Number of values to generate.
*
* @return
* An array of random values, in the format expected for field values.
*/
......
......@@ -225,6 +225,7 @@ public function assertNodeViewText(EntityInterface $node, $view_mode, $text, $me
* Plain text to look for.
* @param $message
* Message to display.
*
* @return
* TRUE on pass, FALSE on fail.
*/
......
......@@ -18,6 +18,7 @@
*
* @param \Drupal\file\FileInterface $file
* The file entity being validated.
*
* @return array
* An array of error messages. If there are no problems with the file return
* an empty array.
......
......@@ -148,6 +148,7 @@ public function assertSameFile(FileInterface $file1, FileInterface $file2) {
* @param string $scheme
* Optional string indicating the stream scheme to use. Drupal core includes
* public, private, and temporary. The public wrapper is the default.
*
* @return \Drupal\file\FileInterface
* File entity.
*/
......
......@@ -50,6 +50,7 @@ protected function setUp() {
*
* @param $usage array
* Array of file usage information as returned from file_usage subsystem.
*
* @return int
* Total usage count.
*/
......
......@@ -143,6 +143,7 @@ public function assertSameFile(FileInterface $file1, FileInterface $file2) {
* @param string $scheme
* Optional string indicating the stream scheme to use. Drupal core includes
* public, private, and temporary. The public wrapper is the default.
*
* @return \Drupal\file\FileInterface
* File entity.
*/
......
......@@ -156,6 +156,7 @@ public function assertSameFile(FileInterface $file1, FileInterface $file2) {
* @param string $scheme
* Optional string indicating the stream scheme to use. Drupal core includes
* public, private, and temporary. The public wrapper is the default.
*
* @return \Drupal\file\FileInterface
* File entity.
*/
......
......@@ -248,6 +248,7 @@ function image_path_flush($path) {
*
* @param $include_empty
* If TRUE a '- None -' option will be inserted in the options array.
*
* @return
* Array of image styles both key and value are set to style name.
*/
......
......@@ -621,6 +621,7 @@ public function updateConfigTranslations(array $names, array $langcodes = []) {
* Configuration override data.
* @param array $translatable
* Translatable data array. @see self::getTranslatableData()
*
* @return array
* Nested array of any items of $override_data which did not have keys in
* $translatable. May be empty if $override_data only had items which were
......
......@@ -160,6 +160,7 @@ protected function moduleExists($module) {
* Name of the variable.
* @param $default
* The default value.
*
* @return mixed
*/
protected function variableGet($name, $default) {
......
......@@ -288,6 +288,7 @@ public function deleteNodeRecords(array $nids) {
*
* @param array $node_access_grants
* An array of grants, as returned by node_access_grants().
*
* @return \Drupal\Core\Database\Query\Condition
* A condition object to be passed to $query->condition().
*
......
......@@ -15,6 +15,7 @@ interface MetadataGeneratorInterface {
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity, in the language in which one of its fields is being edited.
*
* @return array
* An array containing metadata with the following keys:
* - label: the user-visible label for the entity in the given language.
......@@ -28,6 +29,7 @@ public function generateEntityMetadata(EntityInterface $entity);
* The field values to be in-place edited.
* @param string $view_mode
* The view mode the field should be rerendered in.
*
* @return array
* An array containing metadata with the following keys:
* - label: the user-visible label for the field.
......
......@@ -58,6 +58,7 @@ public function __construct(ResourcePluginManager $manager, EntityTypeManagerInt
*
* @param \Drupal\Core\Routing\RouteBuildEvent $event
* The route build event.
*
* @return array
*/
public function onDynamicRouteEvent(RouteBuildEvent $event) {
......
......@@ -37,6 +37,7 @@ trait TimeStampItemNormalizerTrait {
*
* @param array $normalized
* The normalized field data to process.
*
* @return array
* The processed data.
*/
......
......@@ -26,6 +26,7 @@
*
* @param $account
* The user account whose default shortcut set is being requested.
*
* @return string
* The name of the shortcut set that this module recommends for that user, if
* there is one.
......
......@@ -422,6 +422,7 @@ function _simpletest_batch_finished($success, $results, $operations, $elapsed) {
*