for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Humbug\PhpScoper\PhpParser\NodeVisitor;
use PhpParser\Node\Name;
// TODO: review those classes
final class OriginalNameResolver
{
private const ORIGINAL_NAME_ATTRIBUTE = 'originalName';
public static function hasOriginalName(Name $namespace): bool
return $namespace->hasAttribute(self::ORIGINAL_NAME_ATTRIBUTE);
}
public static function getOriginalName(Name $name): Name
if (!self::hasOriginalName($name)) {
return $name;
return $name->getAttribute(self::ORIGINAL_NAME_ATTRIBUTE);
return $name->getAttribu...RIGINAL_NAME_ATTRIBUTE)
null
PhpParser\Node\Name
private function __construct()