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