Issue #2623718 by attiks, vsujeetkumar, andypost, MerryHamster, ankithashetty, anmolgoyal74, pfrenssen, longwave, alexpott, borisson_: Fix 'Drupal.Commenting.HookComment' coding standard

merge-requests/328/head
catch 2021-02-18 20:32:15 +00:00
parent 05ce3e81a1
commit 5152d6638f
14 changed files with 29 additions and 46 deletions

View File

@ -37,14 +37,14 @@ function breakpoint_help($route_name, RouteMatchInterface $route_match) {
}
/**
* Implements hook_themes_installed()
* Implements hook_themes_installed().
*/
function breakpoint_themes_installed($theme_list) {
\Drupal::service('breakpoint.manager')->clearCachedDefinitions();
}
/**
* Implements hook_themes_uninstalled()
* Implements hook_themes_uninstalled().
*/
function breakpoint_themes_uninstalled($theme_list) {
\Drupal::service('breakpoint.manager')->clearCachedDefinitions();

View File

@ -8,7 +8,7 @@
use Drupal\Core\Entity\EntityInterface;
/**
* Implements hook_ENTITY_TYPE_create.
* Implements hook_ENTITY_TYPE_create().
*/
function config_install_dependency_test_config_test_create(EntityInterface $entity) {
// Add an enforced dependency on this module so that we can test if this is

View File

@ -11,11 +11,6 @@ use Drupal\views\ViewExecutable;
/**
* Implements hook_views_query_alter().
*
* @param \Drupal\views\ViewExecutable $view
* The view object about to be processed.
* @param \Drupal\views\Plugin\views\query\QueryPluginBase $query
* The query plugin object for the query.
*
* @see \Drupal\Tests\content_moderation\Kernel\ViewsModerationStateSortTest::testSortRevisionBaseTable()
*/
function content_moderation_test_views_views_query_alter(ViewExecutable $view, QueryPluginBase $query) {

View File

@ -801,9 +801,6 @@ function _filter_html_image_secure_process($text) {
*
* Formats an image DOM element that has an invalid source.
*
* @param DOMElement $image
* An IMG node to format, parsed from the filtered text.
*
* @see _filter_html_image_secure_process()
*/
function filter_filter_secure_image_alter(&$image) {

View File

@ -33,9 +33,7 @@ function image_uninstall() {
}
/**
* Implements hook_requirements() to check the PHP GD Library.
*
* @param $phase
* Implements hook_requirements().
*/
function image_requirements($phase) {
if ($phase != 'runtime') {

View File

@ -374,7 +374,7 @@ function language_field_info_alter(&$info) {
}
/**
* Implements hook_entity_field_access()
* Implements hook_entity_field_access().
*/
function language_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, FieldItemListInterface $items = NULL) {
// Only allow edit access on a langcode field if the entity it is attached to

View File

@ -8,7 +8,9 @@
use Drupal\Core\Database\Query\AlterableInterface;
/**
* Implements hook_query_TAG_alter(): tag search_$type with $type node_search.
* Implements hook_query_TAG_alter().
*
* Tags search_$type with $type node_search.
*/
function search_date_query_alter_query_search_node_search_alter(AlterableInterface $query) {
// Start date Sat, 19 Mar 2016 00:00:00 GMT.

View File

@ -8,7 +8,9 @@
use Drupal\Core\Database\Query\AlterableInterface;
/**
* Implements hook_query_TAG_alter(): tag search_$type with $type node_search.
* Implements hook_query_TAG_alter().
*
* Tags search_$type with $type node_search.
*/
function search_query_alter_query_search_node_search_alter(AlterableInterface $query) {
// For testing purposes, restrict the query to node type 'article' only.

View File

@ -47,7 +47,7 @@ function common_test_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) {
}
/**
* Implements hook_TYPE_alter() on behalf of Bartik theme.
* Implements hook_TYPE_alter().
*
* Same as common_test_drupal_alter_alter(), but here, we verify that themes
* can also alter and come last.
@ -81,7 +81,7 @@ function bartik_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) {
}
/**
* Implements hook_TYPE_alter() on behalf of block module.
* Implements hook_TYPE_alter().
*
* This is to verify that
* \Drupal::moduleHandler()->alter(array(TYPE1, TYPE2), ...) allows

View File

@ -8,7 +8,7 @@
use Drupal\Core\Form\FormStateInterface;
/**
* Implements hook_form_FORM_ID_alter() on behalf of block.module.
* Implements hook_form_FORM_ID_alter().
*/
function block_form_form_test_alter_form_alter(&$form, FormStateInterface $form_state) {
\Drupal::messenger()->addStatus('block_form_form_test_alter_form_alter() executed.');
@ -31,7 +31,7 @@ function form_test_form_form_test_alter_form_alter(&$form, FormStateInterface $f
}
/**
* Implements hook_form_FORM_ID_alter() on behalf of system.module.
* Implements hook_form_FORM_ID_alter().
*/
function system_form_form_test_alter_form_alter(&$form, FormStateInterface $form_state) {
\Drupal::messenger()->addStatus('system_form_form_test_alter_form_alter() executed.');

View File

@ -95,7 +95,7 @@ function module_test_modules_uninstalled($modules) {
}
/**
* Implements hook_module_implements_alter()
* Implements hook_module_implements_alter().
*
* @see module_test_altered_test_hook()
* @see \Drupal\system\Tests\Module\ModuleImplementsAlterTest::testModuleImplementsAlter()

View File

@ -15,20 +15,18 @@ use Drupal\update\UpdateManagerInterface;
/**
* Implements hook_requirements().
*
* @return
* An array describing the status of the site regarding available updates. If
* there is no update data, only one record will be returned, indicating that
* the status of core can't be determined. If data is available, there will be
* two records: one for core, and another for all of contrib (assuming there
* are any contributed modules or themes enabled on the site). In addition to
* the fields expected by hook_requirements ('value', 'severity', and
* optionally 'description'), this array will contain a 'reason' attribute,
* which is an integer constant to indicate why the given status is being
* returned (UpdateManagerInterface::NOT_SECURE,
* UpdateManagerInterface::NOT_CURRENT, or UpdateManagerInterface::UNKNOWN).
* This is used for generating the appropriate email notification messages
* during update_cron(), and might be useful for other modules that invoke
* update_requirements() to find out if the site is up to date or not.
* Describes the status of the site regarding available updates. If
* there is no update data, only one record will be returned, indicating that
* the status of core can't be determined. If data is available, there will be
* two records: one for core, and another for all of contrib (assuming there
* are any contributed modules or themes enabled on the site). In addition to
* the fields expected by hook_requirements ('value', 'severity', and
* optionally 'description'), this array will contain a 'reason' attribute,
* which is an integer constant to indicate why the given status is being
* returned (UPDATE_NOT_SECURE, UPDATE_NOT_CURRENT, or UPDATE_UNKNOWN). This
* is used for generating the appropriate email notification messages during
* update_cron(), and might be useful for other modules that invoke
* update_requirements() to find out if the site is up to date or not.
*
* @see _update_message_text()
* @see _update_cron_notify()

View File

@ -390,16 +390,6 @@ function update_fetch_data_finished($success, $results) {
*
* Constructs the email notification message when the site is out of date.
*
* @param $key
* Unique key to indicate what message to build, always 'status_notify'.
* @param $message
* Reference to the message array being built.
* @param $params
* Array of parameters to indicate what kind of text to include in the message
* body. This is a keyed array of message type ('core' or 'contrib') as the
* keys, and the status reason constant (UpdateManagerInterface::NOT_SECURE,
* etc) for the values.
*
* @see \Drupal\Core\Mail\MailManagerInterface::mail()
* @see _update_cron_notify()
* @see _update_message_text()

View File

@ -75,6 +75,7 @@
<exclude name="Drupal.Commenting.FunctionComment.ParamMissingDefinition"/>
<exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
</rule>
<rule ref="Drupal.Commenting.HookComment"/>
<rule ref="Drupal.Commenting.GenderNeutralComment" />
<rule ref="Drupal.Commenting.VariableComment">
<!-- Sniff for: DuplicateVar, EmptyVar, InlineVariableName -->