@@ 8-17 (lines=10) @@ | ||
5 | use PhpParser\Node\Stmt; |
|
6 | use PhpParser\Node\Stmt\ClassMethod as BaseClassMethod; |
|
7 | ||
8 | class ClassMethod { |
|
9 | /** |
|
10 | * @param \PhpParser\Node\Stmt $context |
|
11 | * @param \PhpParser\Node\Stmt\ClassMethod $classMethod |
|
12 | * @return string |
|
13 | */ |
|
14 | public static function getFullyQualifiedName(Stmt $context, BaseClassMethod $classMethod) |
|
15 | { |
|
16 | $namespace = $context->name; |
|
17 | if (isset($context->namespacedName)) { |
|
18 | $namespace = $context->namespacedName->toString(); |
|
19 | } |
|
20 | return $namespace . '::' . $classMethod->name; |
@@ 8-17 (lines=10) @@ | ||
5 | use PhpParser\Node\Stmt; |
|
6 | use PhpParser\Node\Stmt\Property as BaseProperty; |
|
7 | ||
8 | class Property { |
|
9 | /** |
|
10 | * @param \PhpParser\Node\Stmt $context |
|
11 | * @param \PhpParser\Node\Stmt\Property $property |
|
12 | * @return string |
|
13 | */ |
|
14 | public static function getFullyQualifiedName(Stmt $context, BaseProperty $property) |
|
15 | { |
|
16 | $namespace = $context->name; |
|
17 | if (isset($context->namespacedName)) { |
|
18 | $namespace = $context->namespacedName->toString(); |
|
19 | } |
|
20 | return $namespace . '::$' . $property->props[0]->name; |