/*
* This file is part of Psy Shell.
*
- * (c) 2012-2017 Justin Hileman
+ * (c) 2012-2018 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
public function beforeTraverse(array $nodes)
{
- $this->namespace = array();
- $this->currentScope = array();
+ $this->namespace = [];
+ $this->currentScope = [];
}
/**
public function enterNode(Node $node)
{
if ($node instanceof Namespace_) {
- $this->namespace = isset($node->name) ? $node->name->parts : array();
+ $this->namespace = isset($node->name) ? $node->name->parts : [];
}
}
} elseif ($name instanceof Name) {
$name = $name->parts;
} elseif (!is_array($name)) {
- $name = array($name);
+ $name = [$name];
}
return implode('\\', array_merge($this->namespace, $name));