1 | <?php |
||
22 | class ReflectionClassConstant extends BaseReflectionClassConstant |
||
23 | { |
||
24 | use InternalPropertiesEmulationTrait; |
||
25 | |||
26 | /** |
||
27 | * Concrete class constant node |
||
28 | * |
||
29 | * @var ClassConst |
||
30 | */ |
||
31 | private $classConstantNode; |
||
32 | |||
33 | /** |
||
34 | * @var Const_ |
||
35 | */ |
||
36 | private $constNode; |
||
37 | |||
38 | /** |
||
39 | * Name of the class |
||
40 | * |
||
41 | * @var string |
||
42 | */ |
||
43 | private $className; |
||
44 | |||
45 | /** |
||
46 | * Parses class constants from the concrete class node |
||
47 | * |
||
48 | * @param ClassLike $classLikeNode Class-like node |
||
49 | * @param string $reflectionClassName FQN of the class |
||
50 | * |
||
51 | * @return array|ReflectionClassConstant[] |
||
52 | */ |
||
53 | 8 | public static function collectFromClassNode(ClassLike $classLikeNode, string $reflectionClassName): array |
|
73 | |||
74 | /** |
||
75 | * Initializes a reflection for the class constant |
||
76 | * |
||
77 | * @param string $className Name of the class |
||
78 | * @param string $classConstantName Name of the class constant to reflect |
||
79 | * @param ?ClassConst $classConstNode ClassConstant definition node |
||
|
|||
80 | * @param Const_|null $constNode Concrete const definition node |
||
81 | */ |
||
82 | 7 | public function __construct( |
|
99 | |||
100 | /** |
||
101 | * Emulating original behaviour of reflection |
||
102 | */ |
||
103 | 1 | public function __debugInfo(): array |
|
110 | |||
111 | /** |
||
112 | * @inheritDoc |
||
113 | */ |
||
114 | 2 | public function getDeclaringClass() |
|
118 | |||
119 | /** |
||
120 | * @inheritDoc |
||
121 | */ |
||
122 | 1 | public function getDocComment() |
|
128 | |||
129 | /** |
||
130 | * @inheritDoc |
||
131 | */ |
||
132 | 2 | public function getModifiers() |
|
147 | |||
148 | /** |
||
149 | * @inheritDoc |
||
150 | */ |
||
151 | 4 | public function getName() |
|
155 | |||
156 | /** |
||
157 | * @inheritDoc |
||
158 | */ |
||
159 | 2 | public function getValue() |
|
165 | |||
166 | /** |
||
167 | * @inheritDoc |
||
168 | */ |
||
169 | 2 | public function isPrivate() |
|
173 | |||
174 | /** |
||
175 | * @inheritDoc |
||
176 | */ |
||
177 | 2 | public function isProtected() |
|
181 | |||
182 | /** |
||
183 | * @inheritDoc |
||
184 | */ |
||
185 | 2 | public function isPublic() |
|
189 | |||
190 | /** |
||
191 | * @inheritDoc |
||
192 | */ |
||
193 | 2 | public function __toString() |
|
216 | } |
||
217 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.