Interface PHPStan\Reflection\PropertyReflection

extends ClassMemberReflection

Reflection for a class property. This is the interface extension developers should implement when creating custom PropertiesClassReflectionExtension implementations for magic properties. Properties have separate readable and writable types to support:

  • Asymmetric types (PHP 8.4+ property hooks with different get/set types)
  • Read-only properties (readable but not writable)
  • Write-only properties (writable but not readable, rare) For additional property metadata (native types, PHPDoc types, hooks, attributes), see ExtendedPropertyReflection which extends this interface.
Methods
Methods inherited from PHPStan\Reflection\ClassMemberReflection
getDeclaringClass(), isStatic(), isPrivate(), isPublic(), getDocComment()