I am using PhpStorm to experiment with cleaning up my code in a custom module. For the following function, I'm getting this warning:
Hook implementations should not duplicate @param documentation.
/**
* Implements hook_field_widget_form_alter().
*
* @param array $element
* @param array $form_state
* @param array $context
*/
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';
}
}
What should I do to fix this? I thought I needed to delete the @param
comments, but when I do that, PhpStorm complains that I don't have any param comments.