Interface PHPStan\Reflection\ExtendedMethodReflection

extends MethodReflection

Extended method reflection with additional metadata beyond MethodReflection. This interface exists to allow PHPStan to add new method query methods in minor versions without breaking existing MethodsClassReflectionExtension implementations. Extension developers should implement MethodReflection, not this interface — PHPStan wraps MethodReflection implementations to provide ExtendedMethodReflection. Provides access to:

  • Extended parameter signatures (ExtendedParametersAcceptor with PHPDoc/native types)
  • Named argument variants (different signatures when using named arguments)
  • Type assertions (@phpstan-assert annotations)
  • Self-out types (@phpstan-self-out for fluent interfaces)
  • Purity information (@phpstan-pure/@phpstan-impure)
  • PHP attributes (including #[\NoDiscard])
  • Resolved PHPDoc block This is the return type of Type::getMethod() and Scope::getMethodReflection().
  • PHPStan\Reflection\ExtendedMethodReflection extends MethodReflection
    • PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection implements ExtendedMethodReflection
    • PHPStan\Reflection\Php\ClosureCallMethodReflection implements ExtendedMethodReflection
    • PHPStan\Reflection\Annotations\AnnotationMethodReflection implements ExtendedMethodReflection
    • PHPStan\Reflection\Type\UnionTypeMethodReflection implements ExtendedMethodReflection
    • PHPStan\Reflection\Php\PhpMethodReflection implements ExtendedMethodReflection
    • PHPStan\Reflection\ResolvedMethodReflection implements ExtendedMethodReflection
    • PHPStan\Reflection\Php\EnumCasesMethodReflection implements ExtendedMethodReflection
    • PHPStan\Reflection\WrappedExtendedMethodReflection implements ExtendedMethodReflection
    • PHPStan\Reflection\Native\NativeMethodReflection implements ExtendedMethodReflection
    • PHPStan\Reflection\Dummy\ChangedTypeMethodReflection implements ExtendedMethodReflection
    • PHPStan\Reflection\Dummy\DummyMethodReflection implements ExtendedMethodReflection
    • PHPStan\Reflection\Dummy\DummyConstructorReflection implements ExtendedMethodReflection
    • PHPStan\Reflection\Type\IntersectionTypeMethodReflection implements ExtendedMethodReflection
    • PHPStan\Rules\RestrictedUsage\RewrittenDeclaringClassMethodReflection implements ExtendedMethodReflection
Methods
Methods inherited from PHPStan\Reflection\MethodReflection
getName(), getPrototype(), isDeprecated(), getDeprecatedDescription(), isFinal(), isInternal(), getThrowType(), hasSideEffects()
Methods inherited from PHPStan\Reflection\ClassMemberReflection
getDeclaringClass(), isStatic(), isPrivate(), isPublic(), getDocComment()