Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a common tag to indicate that there are no undeclared magic methods/properties. #2

Open
TysonAndre opened this issue Oct 26, 2019 · 1 comment

Comments

@TysonAndre
Copy link
Member

In Psalm, this is psalm-seal-methods/psalm-seal-properties.

In Phan, this is phan-forbid-undeclared-magic-methods/phan-forbid-undeclared-magic-properties.

In the majority of use cases, you'd want a single tag that would apply to any analyzer/IDE that exists.

  • x(experimental) is the best prefix I can come up with - Having a hyphen is needed to avoid tools such as doctrine from treating the annotations like
  • For a few exceptions (e.g. there's a plugin that's only implemented for one analyzer/IDE that adds the methods), having analyzer-specific tags that other analyzers ignore is still useful.

Something along the lines of @seal-properties/@seal-methods on classes, interfaces, and traits would work for that. (Or @x-seal-properties, but there's probably no reason for a prefix in names that have hyphens already)

  • I'd prefer for that to be inheritable, and possibly add @unseal-properties (name to be determined)

cc @muglug

@muglug
Copy link

muglug commented Oct 26, 2019

I like seal-methods/seal-properties. It’s not as obvious, but it aligns with some widely-used terminology (sealed) with somewhat similar meaning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants