axelerant / drupal-quality-checker

Pre-commit code quality checker for Drupal based projects.
https://packagist.org/packages/axelerant/drupal-quality-checker
12 stars 9 forks source link

Exclude "\Drupal\Component\Plugin\Factory\DefaultFactory" static access #15

Closed sbrindle closed 3 years ago

sbrindle commented 3 years ago

I purpose to exclude this static access to skip PHPMD warning when create custom plugin manager.

hussainweb commented 3 years ago

Thanks. I see that this class has public static methods but I can't actually find docs to show the usage. It's still useful considering the method getPluginClass could be used often.

sbrindle commented 3 years ago

You can use this class when you create your own plugin manager with custom annotation. You can find some examples in Drupal core.