1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Reflection;
4:
5: /**
6: * Base interface for all class members: properties, methods, and constants.
7: *
8: * Provides common metadata shared by all class members — their declaring class,
9: * visibility (public/private/protected), static-ness, and raw PHPDoc comment.
10: *
11: * This is the parent interface for PropertyReflection, MethodReflection, and
12: * (via ConstantReflection) ClassConstantReflection. Extension developers typically
13: * work with the more specific child interfaces.
14: *
15: * @api
16: * @api-do-not-implement
17: */
18: interface ClassMemberReflection
19: {
20:
21: /**
22: * For inherited members, this returns the original declaring class,
23: * not the class where the member was accessed.
24: */
25: public function getDeclaringClass(): ClassReflection;
26:
27: public function isStatic(): bool;
28:
29: public function isPrivate(): bool;
30:
31: public function isPublic(): bool;
32:
33: public function getDocComment(): ?string;
34:
35: }
36: