use PhpParser\Node;
use PhpParser\Node\Name;
use PhpParser\Node\Name\FullyQualified as FullyQualifiedName;
-use PhpParser\Node\Stmt\Namespace_ as NamespaceStmt;
+use PhpParser\Node\Stmt\Namespace_;
/**
* Abstract namespace-aware code cleaner pass.
protected $currentScope;
/**
- * TODO: should this be final? Extending classes should be sure to either
+ * @todo should this be final? Extending classes should be sure to either
* use afterTraverse or call parent::beforeTraverse() when overloading.
*
- * Reset the namespace and the current scope before beginning analysis.
+ * Reset the namespace and the current scope before beginning analysis
*/
public function beforeTraverse(array $nodes)
{
}
/**
- * TODO: should this be final? Extending classes should be sure to either use
- * leaveNode or call parent::enterNode() when overloading.
+ * @todo should this be final? Extending classes should be sure to either use
+ * leaveNode or call parent::enterNode() when overloading
*
* @param Node $node
*/
public function enterNode(Node $node)
{
- if ($node instanceof NamespaceStmt) {
+ if ($node instanceof Namespace_) {
$this->namespace = isset($node->name) ? $node->name->parts : array();
}
}