Skip to content

Require @see annotations for plugin classes and methods #173

Open
@navarr

Description

@navarr

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\* or Vendor\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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions