You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will pass phpcs coding standards, but will fail drupal-check with Function mymodule_entity_type_build() has parameter $entity_types with no value type specified in iterable type array.
The fix for phpstan is to use an @param \Drupal\Core\Entity\EntityTypeInterface[] $entity_types, but this then causes phpcs to fail with Hook implementations should not duplicate @param documentation.
It's worth noting that hook_entity_type_build already has the correct typehint.
Suggested fix
Is there a way we can extend the phpdoc interpretation to follow Implements hook_HOOK_NAME(). in a similar way that {@inheritdoc} is followed for classes?
The text was updated successfully, but these errors were encountered:
How is drupal-check installed?
drupal-check is installed as a dependency to my project
Environment:
Describe the bug
phpcs coding standards and drupal-check conflict with hook implementations. An example:
This will pass phpcs coding standards, but will fail drupal-check with
Function mymodule_entity_type_build() has parameter $entity_types with no value type specified in iterable type array.
The fix for phpstan is to use an
@param \Drupal\Core\Entity\EntityTypeInterface[] $entity_types
, but this then causes phpcs to fail withHook implementations should not duplicate @param documentation
.It's worth noting that
hook_entity_type_build
already has the correct typehint.Suggested fix
Is there a way we can extend the phpdoc interpretation to follow
Implements hook_HOOK_NAME().
in a similar way that{@inheritdoc}
is followed for classes?The text was updated successfully, but these errors were encountered: