@@ -61,6 +61,7 @@ class ReflectionConstant implements Reflection
61
61
/** @psalm-allow-private-mutation */
62
62
private CompiledValue |null $ compiledValue = null ;
63
63
64
+ /** @param non-empty-string|null $namespace */
64
65
private function __construct (
65
66
private Reflector $ reflector ,
66
67
Node \Stmt \Const_ |Node \Expr \FuncCall $ node ,
@@ -108,7 +109,8 @@ public static function createFromName(string $constantName): self
108
109
*
109
110
* @internal
110
111
*
111
- * @param Node\Stmt\Const_|Node\Expr\FuncCall $node Node has to be processed by the PhpParser\NodeVisitor\NameResolver
112
+ * @param Node\Stmt\Const_|Node\Expr\FuncCall $node Node has to be processed by the PhpParser\NodeVisitor\NameResolver
113
+ * @param non-empty-string|null $namespace
112
114
*/
113
115
public static function createFromNode (
114
116
Reflector $ reflector ,
@@ -126,6 +128,7 @@ public static function createFromNode(
126
128
return self ::createFromDefineFunctionCall ($ reflector , $ node , $ locatedSource );
127
129
}
128
130
131
+ /** @param non-empty-string|null $namespace */
129
132
private static function createFromConstKeyword (
130
133
Reflector $ reflector ,
131
134
Node \Stmt \Const_ $ node ,
@@ -182,6 +185,8 @@ public function getName(): string
182
185
/**
183
186
* Get the "namespace" name of the constant (e.g. for A\B\FOO, this will
184
187
* return "A\B").
188
+ *
189
+ * @return non-empty-string|null
185
190
*/
186
191
public function getNamespaceName (): string |null
187
192
{
0 commit comments