phan / ProposedAnnotations

Discussion for phpdoc annotations that are useful to static analyzers/out of the scope of PSR-5
2 stars 0 forks source link

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

Open TysonAndre opened 5 years ago

TysonAndre commented 5 years ago

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.

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)

cc @muglug

muglug commented 5 years ago

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