Open
Description
Rule
- A plugin class should have a
@see
annotation to the class(es) that it is intercepting. - Each plugin method should have a
@see
annotation to the method(s) it is intercepting
Reason
This rule would improve QOL for developers by providing a definitive link to what a plugin is intercepting. This can be especially useful for plugins that are intercepting more than one class.
Implementation
An implementation has been written by Mediotype and can be modified for this standard. Our implementation checks:
- The rule checks only a class that has a namespace like
Vendor\Module\Model\Plugin\*
orVendor\Module\Plugin\*
- The rule verifies that such a class has a class-level docblock containing a
@see
tag - The rule checks only methods that are public and begin with before, after, or around (case sensitive)
- The rule verifies that such methods have a method-level docblock containing a
@see
tag