diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 07961ed4c0cc920d0964b1bccd3fa9a7c7ff0427..f931d44cd85f5c9039ec67c2111083f9ff75da7b 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -10,7 +10,7 @@ /** * Initializes blocks for installed themes. * - * @param $theme_list + * @param string[] $theme_list * An array of theme names. * * @see block_modules_installed() @@ -40,7 +40,7 @@ function block_themes_installed($theme_list) { * a particular region isn't available in the new theme, the block is assigned * to the new theme's default region. * - * @param $theme + * @param string $theme * The name of a theme. */ function block_theme_initialize($theme) { diff --git a/core/modules/block/src/BlockViewBuilder.php b/core/modules/block/src/BlockViewBuilder.php index b4cdf0c7aad70c24f8aeb79bf900d3945ecf3290..852ad0c98f5712f8b74ee7fd7994319ceae84e35 100644 --- a/core/modules/block/src/BlockViewBuilder.php +++ b/core/modules/block/src/BlockViewBuilder.php @@ -146,9 +146,9 @@ public static function trustedCallbacks() { /** * #lazy_builder callback; builds a #pre_render-able block. * - * @param $entity_id + * @param string $entity_id * A block config entity ID. - * @param $view_mode + * @param string $view_mode * The view mode the block is being viewed in. * * @return array diff --git a/core/modules/config/src/StorageReplaceDataWrapper.php b/core/modules/config/src/StorageReplaceDataWrapper.php index 8c9fa138a72f573302303c78f000b098b47a5e8f..8a16553d645e0a1cc9d789a61ad5fda6b466bd4d 100644 --- a/core/modules/config/src/StorageReplaceDataWrapper.php +++ b/core/modules/config/src/StorageReplaceDataWrapper.php @@ -188,7 +188,7 @@ public function getCollectionName() { /** * Replaces the configuration object data with the supplied data. * - * @param $name + * @param string $name * The configuration object name whose data to replace. * @param array $data * The configuration data. diff --git a/core/modules/config/tests/config_test/src/Entity/ConfigTest.php b/core/modules/config/tests/config_test/src/Entity/ConfigTest.php index 7f73622e5a23ea8d2adb85429578b8473f875b0c..61ec27d9400bb950da2613771af7c96391915715 100644 --- a/core/modules/config/tests/config_test/src/Entity/ConfigTest.php +++ b/core/modules/config/tests/config_test/src/Entity/ConfigTest.php @@ -208,7 +208,7 @@ public function isInstallable() { /** * Sets the protected property value. * - * @param $value + * @param string $value * The value to set. * * @return $this @@ -233,9 +233,9 @@ public function getProtectedProperty(): string { /** * Concatenates the two params and sets the protected property value. * - * @param $value1 + * @param string $value1 * The first value to concatenate. - * @param $value2 + * @param string $value2 * The second value to concatenate. * * @return $this @@ -250,9 +250,9 @@ public function concatProtectedProperty(string $value1, string $value2): static /** * Concatenates up to two params and sets the protected property value. * - * @param $value1 + * @param string $value1 * The first value to concatenate. - * @param $value2 + * @param string $value2 * (optional) The second value to concatenate. Defaults to ''. * * @return $this @@ -267,7 +267,7 @@ public function concatProtectedPropertyOptional(string $value1, string $value2 = /** * Appends to protected property. * - * @param $value + * @param mixed $value * The value to append. * * @return $this @@ -319,7 +319,7 @@ public function getArrayProperty(): array { /** * Sets the array property. * - * @param $value + * @param array $value * The value to set. * * @return $this diff --git a/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php b/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php index aacee5065b01fa15df4d3e342507e981965757be..121edd515f23bcd32f7ce0cc982b0afccee25a92 100644 --- a/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php +++ b/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php @@ -59,7 +59,7 @@ protected function setUp(): void { /** * Creates test blocks. * - * @param $title + * @param string $title * Title of the block. * * @return \Drupal\block_content\Entity\BlockContent diff --git a/core/modules/config_translation/src/ConfigNamesMapper.php b/core/modules/config_translation/src/ConfigNamesMapper.php index 63d579b16e06f0eaf6fbd421962e3468b7d96c9c..1e1db7c8e2df0d874bfc62395734fe23ce6084a3 100644 --- a/core/modules/config_translation/src/ConfigNamesMapper.php +++ b/core/modules/config_translation/src/ConfigNamesMapper.php @@ -99,7 +99,7 @@ class ConfigNamesMapper extends PluginBase implements ConfigMapperInterface, Con /** * Constructs a ConfigNamesMapper. * - * @param $plugin_id + * @param string $plugin_id * The config mapper plugin ID. * @param mixed $plugin_definition * An array of plugin information with the following keys: diff --git a/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModerationInterface.php b/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModerationInterface.php index 0188a87e2004e70eff25c39ac0666e2c9cc5bee8..d2d128cba54fdd40501f88733e87e026a8dfd24a 100644 --- a/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModerationInterface.php +++ b/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModerationInterface.php @@ -68,7 +68,7 @@ public function addEntityTypeAndBundle($entity_type_id, $bundle_id); /** * {@inheritdoc} * - * @param $entity + * @param \Drupal\Core\Entity\EntityInterface|null $entity * Content Moderation uses this parameter to determine the initial state * based on publishing status. */ diff --git a/core/modules/content_translation/src/ContentTranslationHandlerInterface.php b/core/modules/content_translation/src/ContentTranslationHandlerInterface.php index c3b9e4cf8907d69b0650bd1f6ec98ea25fcacc7c..1ceafbc942f3c28f09ec579a6dba8c47d0c13f86 100644 --- a/core/modules/content_translation/src/ContentTranslationHandlerInterface.php +++ b/core/modules/content_translation/src/ContentTranslationHandlerInterface.php @@ -25,7 +25,7 @@ public function getFieldDefinitions(); * * @param \Drupal\Core\Entity\EntityInterface $entity * The entity whose translation has to be accessed. - * @param $op + * @param string $op * The operation to be performed on the translation. Possible values are: * - "create" * - "update" diff --git a/core/modules/contextual/contextual.api.php b/core/modules/contextual/contextual.api.php index 0fe485a3bbdf6e71a6588038834d5688dacc5bb1..004947bf9b1471206c97d7a0c66968c72e950797 100644 --- a/core/modules/contextual/contextual.api.php +++ b/core/modules/contextual/contextual.api.php @@ -19,9 +19,9 @@ * data that is passed in by reference. Further links may be added or existing * links can be altered. * - * @param $element + * @param array $element * A renderable array representing the contextual links. - * @param $items + * @param array $items * An associative array containing the original contextual link items, as * generated by * \Drupal\Core\Menu\ContextualLinkManagerInterface::getContextualLinksArrayByGroup(), diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module index 46599d004fdfcad129ce68336c3f1dc83f46bf96..d760fafbd31874af6c0f996e619b1f0a117db480 100644 --- a/core/modules/editor/editor.module +++ b/core/modules/editor/editor.module @@ -236,7 +236,7 @@ function _editor_record_file_usage(array $uuids, EntityInterface $entity) { * An array of file entity UUIDs. * @param \Drupal\Core\Entity\EntityInterface $entity * An entity whose fields to inspect for file references. - * @param $count + * @param int $count * The number of references to delete. Should be 1 when deleting a single * revision and 0 when deleting an entity entirely. * diff --git a/core/modules/field/field.api.php b/core/modules/field/field.api.php index eb2af3b555cfbc454a4e982d1d5532e86bf53e02..610a7b566fc054da50f0e0ad7a083378d67feb01 100644 --- a/core/modules/field/field.api.php +++ b/core/modules/field/field.api.php @@ -56,7 +56,7 @@ /** * Perform alterations on Field API field types. * - * @param $info + * @param array $info * Array of information on field types as collected by the "field type" plugin * manager. */ @@ -272,7 +272,7 @@ function hook_field_widget_single_element_WIDGET_TYPE_form_alter(array &$element * \Drupal\Core\Field\WidgetBaseInterface::form(). * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. - * @param $context + * @param array $context * An associative array containing the following key-value pairs: * - form: The form structure to which widgets are being attached. This may be * a full form structure, or a sub-element of a larger form. @@ -299,12 +299,12 @@ function hook_field_widget_complete_form_alter(&$field_widget_complete_form, For * to modify a specific widget form, rather than using * hook_field_widget_complete_form_alter() and checking the widget type. * - * @param $field_widget_complete_form + * @param array $field_widget_complete_form * The field widget form element as constructed by * \Drupal\Core\Field\WidgetBaseInterface::form(). - * @param $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. - * @param $context + * @param array $context * An associative array containing the following key-value pairs: * - form: The form structure to which widgets are being attached. This may be * a full form structure, or a sub-element of a larger form. @@ -414,7 +414,7 @@ function hook_field_info_max_weight($entity_type, $bundle, $context, $context_mo * field definitions cache has been cleared, this hook is invoked on all modules * to allow them to respond to the field storage being purged. * - * @param $field_storage \Drupal\field\Entity\FieldStorageConfig + * @param \Drupal\field\Entity\FieldStorageConfig $field_storage * The field storage being purged. */ function hook_field_purge_field_storage(FieldStorageConfig $field_storage) { @@ -431,7 +431,7 @@ function hook_field_purge_field_storage(FieldStorageConfig $field_storage) { * field info cache has been cleared, this hook is invoked on all modules to * allow them to respond to the field being purged. * - * @param $field + * @param \Drupal\field\Entity\FieldConfig $field * The field being purged. */ function hook_field_purge_field(FieldConfig $field) { diff --git a/core/modules/field/src/Plugin/migrate/process/d6/FieldFormatterSettingsDefaults.php b/core/modules/field/src/Plugin/migrate/process/d6/FieldFormatterSettingsDefaults.php index 6398203243e4e83ac51b1d30909b701a1f66ffcb..bf72f37cb5a080356c8c75c6f7d7394fa611372d 100644 --- a/core/modules/field/src/Plugin/migrate/process/d6/FieldFormatterSettingsDefaults.php +++ b/core/modules/field/src/Plugin/migrate/process/d6/FieldFormatterSettingsDefaults.php @@ -42,7 +42,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable /** * @param string $type * The field type. - * @param $format + * @param string $format * The format selected for the field on the display. * * @return array diff --git a/core/modules/field/tests/modules/field_test/src/FieldTestHelper.php b/core/modules/field/tests/modules/field_test/src/FieldTestHelper.php index 0caaf99624694ca30eb228730cf35c8df16a90f7..06f5407b2f49c1e654992bb6de9daa5b49c20690 100644 --- a/core/modules/field/tests/modules/field_test/src/FieldTestHelper.php +++ b/core/modules/field/tests/modules/field_test/src/FieldTestHelper.php @@ -70,9 +70,9 @@ public static function defaultValue(FieldableEntityInterface $entity, FieldDefin * assertEquals([$field], $mem['fieldStorageConfigCreate'][0]); * @endcode * - * @param $key + * @param string $key * The key under which to store to $value, or NULL as described above. - * @param $value + * @param mixed|null $value * A value to store for $key. * * @return array|null diff --git a/core/modules/field_ui/src/EntityDisplayModeListBuilder.php b/core/modules/field_ui/src/EntityDisplayModeListBuilder.php index aa5cbb59e5876a4a38c97258c539cb77225c8f6b..4c7b9e5bce31742f8abf0e6dd87b8fb62c1d442d 100644 --- a/core/modules/field_ui/src/EntityDisplayModeListBuilder.php +++ b/core/modules/field_ui/src/EntityDisplayModeListBuilder.php @@ -175,7 +175,7 @@ public function render() { /** * Filters entities based on their view builder handlers. * - * @param $entity_type + * @param string $entity_type * The entity type of the entity that needs to be validated. * * @return bool diff --git a/core/modules/field_ui/src/EntityFormModeListBuilder.php b/core/modules/field_ui/src/EntityFormModeListBuilder.php index 6cab12f453fe5c4dcb1fa27a2b219649a39980eb..e4424eeeb430985e99eea0336d4922d908927778 100644 --- a/core/modules/field_ui/src/EntityFormModeListBuilder.php +++ b/core/modules/field_ui/src/EntityFormModeListBuilder.php @@ -12,7 +12,7 @@ class EntityFormModeListBuilder extends EntityDisplayModeListBuilder { /** * Filters entities based on their form mode handlers. * - * @param $entity_type + * @param string $entity_type * The entity type of the entity that needs to be validated. * * @return bool diff --git a/core/modules/file/src/Plugin/rest/resource/FileUploadResource.php b/core/modules/file/src/Plugin/rest/resource/FileUploadResource.php index caab7bcc6b0cf10f4db86d11933d4bf6c1004dd9..97bb0e4b458af482271aea1c16797226d53f1e4a 100644 --- a/core/modules/file/src/Plugin/rest/resource/FileUploadResource.php +++ b/core/modules/file/src/Plugin/rest/resource/FileUploadResource.php @@ -271,7 +271,7 @@ protected function getBaseRouteRequirements($method) { /** * Generates a lock ID based on the file URI. * - * @param $file_uri + * @param string $file_uri * The file URI. * * @return string diff --git a/core/modules/help/src/HelpTopicTwigLoader.php b/core/modules/help/src/HelpTopicTwigLoader.php index 743015f9e5384f3a5e8811db55106461ea023e65..fc2e61bbaafcf1d10e8f59aba51f9c08b90ce3df 100644 --- a/core/modules/help/src/HelpTopicTwigLoader.php +++ b/core/modules/help/src/HelpTopicTwigLoader.php @@ -53,7 +53,7 @@ public function __construct($root_path, ModuleHandlerInterface $module_handler, /** * Adds an extensions help_topics directory to the Twig loader. * - * @param $path + * @param string $path * The path to the extension. */ protected function addExtension($path) { diff --git a/core/modules/help/tests/modules/help_topics_twig_tester/src/HelpTestTwigNodeVisitor.php b/core/modules/help/tests/modules/help_topics_twig_tester/src/HelpTestTwigNodeVisitor.php index af317d9efbb2ca5feca86c99a6095bddb30f8966..953f2aa2ce4fb57151e1ddcbf0f70b348fc0c136 100644 --- a/core/modules/help/tests/modules/help_topics_twig_tester/src/HelpTestTwigNodeVisitor.php +++ b/core/modules/help/tests/modules/help_topics_twig_tester/src/HelpTestTwigNodeVisitor.php @@ -169,7 +169,7 @@ public static function getState() { * each rendering run. * - return_chunk: Chunk index to keep intact for translated_chunk * processing. All others are removed. - * @param $value + * @param int $value * Value to set for $key. */ public static function setStateValue(string $key, $value) { diff --git a/core/modules/history/history.module b/core/modules/history/history.module index 1d53c536054607004a55757ee3fdc92abec86704..44426cdd41af418bbed0ce27728092b9f27ec73f 100644 --- a/core/modules/history/history.module +++ b/core/modules/history/history.module @@ -76,9 +76,9 @@ function history_read_multiple($nids) { /** * Updates 'last viewed' timestamp of the specified entity for the current user. * - * @param $nid + * @param string|int|null $nid * The node ID that has been read. - * @param $account + * @param \Drupal\User\UserInterface $account * (optional) The user account to update the history for. Defaults to the * current user. */ diff --git a/core/modules/image/image.api.php b/core/modules/image/image.api.php index bac226320f2fd670866f5135daec43fd91f61d26..f70c634cc4b0518398962d919733e5d978ba1de0 100644 --- a/core/modules/image/image.api.php +++ b/core/modules/image/image.api.php @@ -13,7 +13,7 @@ /** * Alter the information provided in \Drupal\image\Annotation\ImageEffect. * - * @param $effects + * @param array $effects * The array of image effects, keyed on the machine-readable effect name. */ function hook_image_effect_info_alter(&$effects) { diff --git a/core/modules/image/image.module b/core/modules/image/image.module index 8f3e0542e96a5313d8a4c4e309b6270d00030c08..5da1c3d3fcabb771d6fedaaa0ae84ca103e5efb3 100644 --- a/core/modules/image/image.module +++ b/core/modules/image/image.module @@ -14,7 +14,7 @@ /** * Clears cached versions of a specific file in all styles. * - * @param $path + * @param string $path * The Drupal file path to the original image. */ function image_path_flush($path) { @@ -27,7 +27,7 @@ function image_path_flush($path) { /** * Gets an array of image styles suitable for using as select list options. * - * @param $include_empty + * @param bool $include_empty * If TRUE a '- None -' option will be inserted in the options array. * * @return string[] diff --git a/core/modules/migrate/src/Plugin/Discovery/StaticReflectionParser.php b/core/modules/migrate/src/Plugin/Discovery/StaticReflectionParser.php index a26a2c1e422a93f07ff21be98fe29b56431496cb..029cef457006e1f2f46ff9620e474e267ef409ea 100644 --- a/core/modules/migrate/src/Plugin/Discovery/StaticReflectionParser.php +++ b/core/modules/migrate/src/Plugin/Discovery/StaticReflectionParser.php @@ -19,7 +19,7 @@ class StaticReflectionParser extends BaseStaticReflectionParser { * * @param \Drupal\Component\Annotation\Doctrine\StaticReflectionParser $parser * The current static parser. - * @param $finder + * @param \Doctrine\Common\Reflection\ClassFinderInterface $finder * The class finder. Must implement * \Drupal\Component\ClassFinder\ClassFinderInterface, but can do so * implicitly (i.e., implements the interface's methods but not the actual diff --git a/core/modules/migrate/src/Plugin/migrate/process/EntityExists.php b/core/modules/migrate/src/Plugin/migrate/process/EntityExists.php index 3af401e2517283463739d1b00a3949c8f95d4962..1babf06ef222cd903a3b87c6906c9253445ee1fc 100644 --- a/core/modules/migrate/src/Plugin/migrate/process/EntityExists.php +++ b/core/modules/migrate/src/Plugin/migrate/process/EntityExists.php @@ -42,7 +42,7 @@ class EntityExists extends ProcessPluginBase implements ContainerFactoryPluginIn * The plugin ID. * @param mixed $plugin_definition * The plugin implementation definition. - * @param $storage + * @param \Drupal\Core\Entity\EntityStorageInterface $storage * The entity storage. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityStorageInterface $storage) { diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php index e5c094342b210f75509fa75651f40ae44389d00d..e5e014224dc657c816c8912ad70e0b8b15ad2a8e 100644 --- a/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php @@ -153,9 +153,9 @@ protected function moduleExists($module) { /** * Reads a variable from a source Drupal database. * - * @param $name + * @param string $name * Name of the variable. - * @param $default + * @param mixed $default * The default value. * * @return mixed diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 917aa8e47f050e9ce60efc430e93d29e3cbbed93..448845844af3cde872081941632ccb662c7e2e57 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -29,8 +29,9 @@ * query joins the {comment_entity_statistics} table so that the comment_count * field is available, a title attribute will be added to show the number of * comments. - * @param $title - * (optional) A heading for the resulting list. + * @param string|null $title + * (optional) A heading for the resulting list. NULL results in no heading. + * Defaults to NULL. * * @return array|false * A renderable array containing a list of linked node titles fetched from @@ -446,7 +447,7 @@ function node_access_grants($operation, AccountInterface $account) { * 'node_access'; when this function returns TRUE, no node access joins are * added to the query. * - * @param $account + * @param \Drupal\Core\Session\AccountProxyInterface|null $account * (optional) The user object for the user whose access is being checked. If * omitted, the current user is used. Defaults to NULL. * @@ -491,8 +492,9 @@ function node_access_view_all_nodes($account = NULL) { * When unsure if the current user is an administrator, node_access_rebuild() * should be used instead. * - * @param $rebuild - * (optional) The boolean value to be written. + * @param bool|null $rebuild + * (optional) The boolean value to be written. Defaults to NULL, which returns + * the current value. * * @return bool|null * The current value of the flag if no value was provided for $rebuild. If a @@ -524,7 +526,7 @@ function node_access_needs_rebuild($rebuild = NULL) { * Note : As of Drupal 6, node access modules are not required to (and actually * should not) call node_access_rebuild() in hook_install/uninstall anymore. * - * @param $batch_mode + * @param bool $batch_mode * (optional) Set to TRUE to process in 'batch' mode, spawning processing over * several HTTP requests (thus avoiding the risk of PHP timeout if the site * has a large number of nodes). hook_update_N() and any form submit handler diff --git a/core/modules/node/src/NodeViewBuilder.php b/core/modules/node/src/NodeViewBuilder.php index 1e79ca0d59179d922cd0d69c2873271e341e9a1f..e9b491d21d490d6a1ee737bddb9c29ffa6849a49 100644 --- a/core/modules/node/src/NodeViewBuilder.php +++ b/core/modules/node/src/NodeViewBuilder.php @@ -81,7 +81,7 @@ protected function getBuildDefaults(EntityInterface $entity, $view_mode) { * The language in which the node entity is being viewed. * @param bool $is_in_preview * Whether the node is currently being previewed. - * @param $revision_id + * @param int|string $revision_id * (optional) The identifier of the node revision to be loaded. If none * is provided, the default revision will be loaded. * diff --git a/core/modules/node/src/Plugin/Search/NodeSearch.php b/core/modules/node/src/Plugin/Search/NodeSearch.php index da195681714f41219e4144894733ad9a6aafa3ab..c6173d76487426270e23b11d666610e0ae47d1c3 100644 --- a/core/modules/node/src/Plugin/Search/NodeSearch.php +++ b/core/modules/node/src/Plugin/Search/NodeSearch.php @@ -434,7 +434,7 @@ public function removeSubmittedInfo(array $build) { /** * Adds the configured rankings to the search query. * - * @param $query + * @param \Drupal\Core\Database\Query\SelectExtender $query * A query object that has been extended with the Search DB Extender. */ protected function addNodeRankings(SelectExtender $query) { diff --git a/core/modules/node/tests/src/Traits/NodeCreationTrait.php b/core/modules/node/tests/src/Traits/NodeCreationTrait.php index 74898811a7d3e1a5e4341cf687125eb85f8ba3ff..7830b545a831ec8238f416c15abc44d741b0663e 100644 --- a/core/modules/node/tests/src/Traits/NodeCreationTrait.php +++ b/core/modules/node/tests/src/Traits/NodeCreationTrait.php @@ -19,7 +19,7 @@ trait NodeCreationTrait { * * @param string|\Drupal\Component\Render\MarkupInterface $title * A node title, usually generated by $this->randomMachineName(). - * @param $reset + * @param bool $reset * (optional) Whether to reset the entity cache. * * @return \Drupal\node\NodeInterface|false diff --git a/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php b/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php index 250fe8812eaf5d7ca8409824391a47a1ffa165eb..83b155a8f56d1992061e98d731f2b6fc54da8b94 100644 --- a/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php +++ b/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php @@ -336,7 +336,7 @@ abstract protected function allowedValuesDescription(); /** * #element_validate callback for options field allowed values. * - * @param $element + * @param array $element * An associative array containing the properties and children of the * generic form element. * @param \Drupal\Core\Form\FormStateInterface $form_state diff --git a/core/modules/path_alias/src/AliasManagerInterface.php b/core/modules/path_alias/src/AliasManagerInterface.php index 207905625d39f675af58bce5e0035dc7bce8784f..dca8fd11143691f2f927a20c3d3e0ce1cae6b8c6 100644 --- a/core/modules/path_alias/src/AliasManagerInterface.php +++ b/core/modules/path_alias/src/AliasManagerInterface.php @@ -44,7 +44,7 @@ public function getAliasByPath($path, $langcode = NULL); /** * Clears the static caches in alias manager and rebuilds the prefix list. * - * @param $source + * @param string|null $source * Source path of the alias that is being inserted/updated. If omitted, the * entire lookup static cache will be cleared and the prefix list will be * rebuilt. diff --git a/core/modules/responsive_image/responsive_image.module b/core/modules/responsive_image/responsive_image.module index 00744ae91fbede3c5e579a58a2bead1cc4c22f84..092e454be1e206445f1058f816f11225afe874c1 100644 --- a/core/modules/responsive_image/responsive_image.module +++ b/core/modules/responsive_image/responsive_image.module @@ -68,7 +68,7 @@ function template_preprocess_responsive_image_formatter(&$variables): void { * * Default template: responsive-image.html.twig. * - * @param $variables + * @param array $variables * An associative array containing: * - uri: The URI of the image. * - width: The width of the image (if known). diff --git a/core/modules/rest/src/Plugin/ResourceBase.php b/core/modules/rest/src/Plugin/ResourceBase.php index b3951f8488b989ad108f879644c420886b2b6f79..aff6df95423000078a53cc52c14749c3f33cf1d1 100644 --- a/core/modules/rest/src/Plugin/ResourceBase.php +++ b/core/modules/rest/src/Plugin/ResourceBase.php @@ -184,7 +184,7 @@ protected function getBaseRoute($canonical_path, $method) { /** * Gets the base route requirements for a particular method. * - * @param $method + * @param string $method * The HTTP method to be used for the route. * * @return array diff --git a/core/modules/serialization/src/Normalizer/NormalizerBase.php b/core/modules/serialization/src/Normalizer/NormalizerBase.php index b0220ce933f78bb288da2a816dad7b4695ad8cb9..46d286d4aaa5ed8f5f0d2315a5fe36a16c2cccf9 100644 --- a/core/modules/serialization/src/Normalizer/NormalizerBase.php +++ b/core/modules/serialization/src/Normalizer/NormalizerBase.php @@ -83,7 +83,7 @@ protected function checkFormat($format = NULL) { * * @param array $context * Context options for the normalizer. - * @param $data + * @param mixed $data * The data that might have cacheability information. */ protected function addCacheableDependency(array $context, $data) { diff --git a/core/modules/shortcut/src/ShortcutSetStorageInterface.php b/core/modules/shortcut/src/ShortcutSetStorageInterface.php index 409a986cbdc717375470aab3484607eb93ae59b8..3deabb115b6684b3c28225e2f76915864ba24592 100644 --- a/core/modules/shortcut/src/ShortcutSetStorageInterface.php +++ b/core/modules/shortcut/src/ShortcutSetStorageInterface.php @@ -15,7 +15,7 @@ interface ShortcutSetStorageInterface extends ConfigEntityStorageInterface { * * @param \Drupal\shortcut\ShortcutSetInterface $shortcut_set * An object representing the shortcut set. - * @param $account + * @param \Drupal\user\UserInterface $account * A user account that will be assigned to use the set. */ public function assignUser(ShortcutSetInterface $shortcut_set, $account); @@ -25,7 +25,7 @@ public function assignUser(ShortcutSetInterface $shortcut_set, $account); * * The user will go back to using whatever default set applies. * - * @param $account + * @param \Drupal\user\UserInterface $account * A user account that will be removed from the shortcut set assignment. * * @return bool diff --git a/core/modules/system/src/Controller/DbUpdateController.php b/core/modules/system/src/Controller/DbUpdateController.php index 42a8c7b8a41f10c1ddb666dcac1c45d20055cfb3..40f8a5b2249710c5845394fa19607b833fc2814c 100644 --- a/core/modules/system/src/Controller/DbUpdateController.php +++ b/core/modules/system/src/Controller/DbUpdateController.php @@ -532,7 +532,7 @@ protected function results(Request $request) { /** * Renders a list of requirement errors or warnings. * - * @param $severity + * @param int $severity * The severity of the message, as per RFC 3164. * @param array $requirements * The array of requirement values. @@ -664,7 +664,7 @@ protected function triggerBatch(Request $request) { * page in update.php). Additionally, if the site was off-line, now that the * update process is completed, the site is set back online. * - * @param $success + * @param bool $success * Indicate that the batch API tasks were all completed successfully. * @param array $results * An array of all the results that were updated in update_do_one(). diff --git a/core/modules/system/src/Form/ModulesListForm.php b/core/modules/system/src/Form/ModulesListForm.php index 5a233b3807b1df9a66c3653f4408a03f01f8a4bc..fc0d10a4f0d2201a56bba98dff84161e741daa38 100644 --- a/core/modules/system/src/Form/ModulesListForm.php +++ b/core/modules/system/src/Form/ModulesListForm.php @@ -247,7 +247,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { * The list existing modules. * @param \Drupal\Core\Extension\Extension $module * The module for which to build the form row. - * @param $distribution + * @param string $distribution * The distribution. * * @return array diff --git a/core/modules/system/src/SystemManager.php b/core/modules/system/src/SystemManager.php index 7c88d95c3e7785b82193619dcb5835b0f3dd9564..9e3d61ef3f9f173b85c929f765f604551a03d47b 100644 --- a/core/modules/system/src/SystemManager.php +++ b/core/modules/system/src/SystemManager.php @@ -124,7 +124,7 @@ public function listRequirements() { /** * Extracts the highest severity from the requirements array. * - * @param $requirements + * @param array $requirements * An array of requirements, in the same format as is returned by * hook_requirements(). * diff --git a/core/modules/system/src/Tests/Routing/MockAliasManager.php b/core/modules/system/src/Tests/Routing/MockAliasManager.php index 7412e6d6dbe69c9d213f80328c4c4fd8d0beab93..a9b88bfbc5c7d470f3b6947dcd2723a4b4ec6c17 100644 --- a/core/modules/system/src/Tests/Routing/MockAliasManager.php +++ b/core/modules/system/src/Tests/Routing/MockAliasManager.php @@ -73,6 +73,13 @@ public function getPathByAlias($alias, $langcode = NULL) { /** * {@inheritdoc} + * + * @param string $path + * The path of the alias. + * @param string $langcode + * The language code. + * + * @return string */ public function getAliasByPath($path, $langcode = NULL) { if ($path[0] !== '/') { diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index ca1e02c9864fda97bf97f4c6f4d1246075597a12..7f259f27d5ec33f89cd5142e711fbd64a785249c 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -15,7 +15,7 @@ /** * Alters theme operation links. * - * @param $theme_groups + * @param array $theme_groups * An associative array containing groups of themes. * * @see system_themes_page() diff --git a/core/modules/system/system.module b/core/modules/system/system.module index ea45920ab0b04d6120764b985e4f4c64abba0420..184e6ab02b5cdfa2cbbe24421efcc3a24e906f96 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -220,13 +220,13 @@ function template_preprocess_entity_add_list(&$variables): void { * * @param callable $callback * The name of the function to invoke once the user authorizes the operation. - * @param $file + * @param string $file * The full path to the file where the callback function is implemented. - * @param $arguments + * @param array $arguments * Optional array of arguments to pass into the callback when it is invoked. * Note that the first argument to the callback is always the FileTransfer * object created by authorize.php when the user authorizes the operation. - * @param $page_title + * @param string $page_title * Optional string to use as the page title once redirected to authorize.php. */ function system_authorized_init($callback, $file, $arguments = [], $page_title = NULL) { @@ -332,7 +332,7 @@ function system_preprocess_block(&$variables): void { * This function is called from the system_settings form to check all core * file directories (file_public_path, file_private_path, file_temporary_path). * - * @param $form_element + * @param array $form_element * The form element containing the name of the directory to check. * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. @@ -376,7 +376,7 @@ function system_check_directory($form_element, FormStateInterface $form_state) { * * @param \Drupal\Core\Extension\Extension|string $theme * A theme extension object, or the name of a theme. - * @param $show + * @param string $show * Possible values: REGIONS_ALL or REGIONS_VISIBLE. Visible excludes hidden * regions. * @@ -425,7 +425,7 @@ function system_sort_themes($a, $b) { /** * Gets the name of the default region for a given theme. * - * @param $theme + * @param string $theme * The name of a theme. * * @return string diff --git a/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameForm.php b/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameForm.php index 56dd003831ac8d2676c9145eaf2cca056e4a90ff..6b5415cdb5ccf4fcf6e31bf30121dc890225d57f 100644 --- a/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameForm.php +++ b/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameForm.php @@ -83,7 +83,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { /** * Loading stub for machine name. * - * @param $machine_name + * @param string $machine_name * The machine name. * * @return bool diff --git a/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameValidationForm.php b/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameValidationForm.php index af2d4cc1af9b8faf050907938f0b488ba92a1954..48e72015230f8f1072b0b1eb8dbba94bb098e281 100644 --- a/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameValidationForm.php +++ b/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameValidationForm.php @@ -122,7 +122,7 @@ public function buildAjaxSnackConfigureForm(array $form, FormStateInterface $for /** * Loading stub for machine name. * - * @param $machine_name + * @param string $machine_name * The machine name. * * @return bool diff --git a/core/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectFormBase.php b/core/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectFormBase.php index 1420e444743978634524534eb2dfd2ff5b9de6a6..075eaf200698151c98bbbdaeac8f21c3b16cb5d3 100644 --- a/core/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectFormBase.php +++ b/core/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectFormBase.php @@ -22,7 +22,7 @@ abstract class FormTestTableSelectFormBase extends FormBase { * An associative array containing the structure of the form. * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. - * @param $element_properties + * @param array $element_properties * An array of element properties for the tableselect element. * * @return array diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index d00cf3f80502039b46696c3679bb7433916380ba..8f5afb1c24e23958417305b0561a6dfd17777ab8 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -95,7 +95,7 @@ function taxonomy_term_is_page(Term $term) { * The index lists all terms that are related to a given node entity, and is * therefore maintained at the entity level. * - * @param \Drupal\node\Entity\Node $node + * @param \Drupal\node\NodeInterface $node * The node entity. */ function taxonomy_build_node_index($node) { diff --git a/core/modules/text/text.module b/core/modules/text/text.module index b7bc4208561ce49d320c1a5607ef82e599b8976a..8ab9db5390609dcc76caf6700c28d75a316ee808 100644 --- a/core/modules/text/text.module +++ b/core/modules/text/text.module @@ -16,14 +16,14 @@ * place such as the end of a paragraph, a line break, or the end of a sentence * (in that order of preference). * - * @param $text + * @param string $text * The content for which a summary will be generated. - * @param $format + * @param string $format * The format of the content. If the line break filter is present then we * treat newlines embedded in $text as line breaks. If the htmlcorrector * filter is present, it will be run on the generated summary (if different * from the incoming $text). - * @param $size + * @param string|null $size * The desired character length of the summary. If omitted, the default value * will be used. Ignored if the special delimiter is present in $text. * diff --git a/core/modules/toolbar/toolbar.api.php b/core/modules/toolbar/toolbar.api.php index 27faac80bc019601989b53379adf60ab299c41d0..8dbdc82698c6ebcfdf73a0ca8c710f42ba6ac78b 100644 --- a/core/modules/toolbar/toolbar.api.php +++ b/core/modules/toolbar/toolbar.api.php @@ -157,7 +157,7 @@ function hook_toolbar(): array { * element of the $items array is one item returned by a module from * hook_toolbar(). Additional items may be added, or existing items altered. * - * @param $items + * @param array $items * Associative array of toolbar menu definitions returned from hook_toolbar(). */ function hook_toolbar_alter(&$items) { diff --git a/core/modules/update/update.api.php b/core/modules/update/update.api.php index b76fad3363fad7b0e606133e0445b2cafdce5aa3..050db6161a1392ab7615494a38b2bec841baaa36 100644 --- a/core/modules/update/update.api.php +++ b/core/modules/update/update.api.php @@ -25,7 +25,7 @@ * updates report. In rare cases, a module might want to alter the data * associated with a project already in the list. * - * @param $projects + * @param array $projects * Reference to an array of the projects installed on the system. This * includes all the metadata documented in the comments below for each project * (either module or theme) that is currently installed. The array is @@ -78,7 +78,7 @@ function hook_update_projects_alter(&$projects) { /** * Alter the information about available updates for projects. * - * @param $projects + * @param array $projects * Reference to an array of information about available updates to each * project installed on the system. * diff --git a/core/modules/update/update.install b/core/modules/update/update.install index 694fe84af710de0727816bf76b4976a576fedeb9..b9fb4d70e4e6839e1f25e7d6c44edf382560e7c8 100644 --- a/core/modules/update/update.install +++ b/core/modules/update/update.install @@ -97,10 +97,10 @@ function update_uninstall(): void { * This is shared for both core and contrib to generate the right elements in * the array for hook_requirements(). * - * @param $project + * @param array $project * Array of information about the project we're testing as returned by * update_calculate_project_data(). - * @param $type + * @param string $type * What kind of project this is ('core' or 'contrib'). * * @return array diff --git a/core/modules/update/update.module b/core/modules/update/update.module index 0ddab79fbfaf287686b69dc1a8cf471f13185a7f..bef8ee1e44e6d1e26a66dc9389bf70eb64dd668a 100644 --- a/core/modules/update/update.module +++ b/core/modules/update/update.module @@ -49,7 +49,7 @@ function _update_no_data() { * logic in update_calculate_project_data() will be wrong and produce confusing, * bogus results. * - * @param $refresh + * @param bool $refresh * (optional) Boolean to indicate if this method should refresh automatically * if there's no data. Defaults to FALSE. * @@ -115,7 +115,7 @@ function update_get_available($refresh = FALSE) { * We only create a new fetch task if there's no task already in the queue for * this particular project (based on 'update_fetch_task' key-value collection). * - * @param $project + * @param array $project * Associative array of information about a project as created by * \Drupal\update\UpdateManager::getProjects(), including keys such as 'name' * (short name), and the 'info' array with data from a .info.yml file for the @@ -146,9 +146,9 @@ function update_fetch_data() { /** * Batch callback: Performs actions when all fetch tasks have been completed. * - * @param $success + * @param bool $success * TRUE if the batch operation was successful; FALSE if there were errors. - * @param $results + * @param array $results * An associative array of results from the batch operation, including the key * 'updated' which holds the total number of projects we fetched available * update data for. @@ -176,12 +176,12 @@ function update_fetch_data_finished($success, $results) { * site-wide status report at admin/reports/status and in the body of the * notification email messages generated by update_cron(). * - * @param $msg_type + * @param string $msg_type * String to indicate what kind of message to generate. Can be either 'core' * or 'contrib'. - * @param $msg_reason + * @param int $msg_reason * Integer constant specifying why message is generated. - * @param $langcode + * @param string $langcode * (optional) A language code to use. Defaults to NULL. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup @@ -266,7 +266,7 @@ function _update_project_status_sort($a, $b) { * provides a "Check manually" link that refreshes the available update and * redirects back to the same page. * - * @param $variables + * @param array $variables * An associative array containing: * - last: The timestamp when the site last checked for available updates. * @@ -302,7 +302,7 @@ function _update_manager_unique_identifier() { /** * Returns the directory where update archive files should be extracted. * - * @param $create + * @param bool $create * (optional) Whether to attempt to create the directory if it does not * already exist. Defaults to TRUE. * @@ -324,7 +324,7 @@ function _update_manager_extract_directory($create = TRUE) { /** * Returns the directory where update archive files should be cached. * - * @param $create + * @param bool $create * (optional) Whether to attempt to create the directory if it does not * already exist. Defaults to TRUE. * @@ -377,7 +377,7 @@ function update_clear_update_disk_cache() { * left alone by tar and correctly set to the time the archive file was * unpacked. * - * @param $path + * @param string $path * A string containing a file path or (streamwrapper) URI. * * @return bool diff --git a/core/modules/workflows/src/StateInterface.php b/core/modules/workflows/src/StateInterface.php index d4fe9871c46d62487554638c775a3668f66e1fdc..5ae57da528b37622233c122ad2a4509b26be784f 100644 --- a/core/modules/workflows/src/StateInterface.php +++ b/core/modules/workflows/src/StateInterface.php @@ -43,7 +43,7 @@ public function weight(); /** * Determines if the state can transition to the provided state ID. * - * @param $to_state_id + * @param string $to_state_id * The state to transition to. * * @return bool @@ -54,7 +54,7 @@ public function canTransitionTo($to_state_id); /** * Gets the Transition object for the provided state ID. * - * @param $to_state_id + * @param string $to_state_id * The state to transition to. * * @return \Drupal\workflows\TransitionInterface diff --git a/core/modules/workflows/src/WorkflowTypeInterface.php b/core/modules/workflows/src/WorkflowTypeInterface.php index 36a7f4a40bc9e52be44623a8f0d335fb94f1a84e..6bd5e95c2fca7ab44f7cd370b6ac9b5ea9b3e8ac 100644 --- a/core/modules/workflows/src/WorkflowTypeInterface.php +++ b/core/modules/workflows/src/WorkflowTypeInterface.php @@ -246,7 +246,7 @@ public function getTransitions(?array $transition_ids = NULL); /** * Gets the transitions for a state for the provided direction. * - * @param $state_id + * @param string $state_id * The state to get transitions for. * @param string $direction * (optional) The direction of the transition, defaults to