Drupal - How to fix "Hook implementations should not duplicate @param documentation."?
The problem is that if you're implementing a hook and you don't need to write more than this:
/**
* Implements hook_field_widget_form_alter().
*/
Because you will have all the information in the hook_field_widget_form_alter()
definition, so just write always in the hooks implementations only this:
/**
* Implements hook_hook_name().
*/
In your case:
/**
* Implements hook_field_widget_form_alter().
*/
function mymodule_field_widget_form_alter(&$element, $form_state, $context) {
if ($context['widget'] instanceof \Drupal\text\Plugin\Field\FieldWidget\TextareaWidget) {
$element['#after_build'][] = '_mymodule_remove_textarea_help';
}
}
Adding an answer for posterity; as per Clive's comment:
You need to turn off the built in PHPStorm inspection that checks for "Missing PHPDoc Comments", then you can safely delete your @param
blocks.