PHP TypeLang Help

@seal-methods

The @seal-methods tag closes off a class's __call()/__callStatic() surface to exactly the magic methods already declared with @method, nothing more. A class documenting several magic methods normally leaves the door open for an analyzer to assume __call() might answer to other, undocumented method names too; writing @seal-methods on the class tells the analyzer that assumption is wrong, so a call to any magic method not already listed can be reported as an error instead of silently allowed through.

"@seal-methods" [ <Description> ]

Parsing a @seal-methods tag produces a FlagTag instance. Being a pure marker, it adds nothing beyond the $name and optional $description every tag already carries.

final class SealMethodsTag extends FlagTag {}

The equivalent tag for magic properties declared through @property is @seal-properties.

This is a Psalm-only convention: Psalm's own vocabulary is @psalm-seal-methods/@psalm-no-seal-methods, but its docs explicitly list the bare @seal-methods/@no-seal-methods spellings as equivalent. See Psalm's reference. PHPStan has no equivalent concept.

05 July 2026