class Trait_ extends Declaration
{
protected $name;
+ protected $uses = array();
protected $properties = array();
protected $methods = array();
$this->properties[] = $stmt;
} else if ($stmt instanceof Stmt\ClassMethod) {
$this->methods[] = $stmt;
+ } else if ($stmt instanceof Stmt\TraitUse) {
+ $this->uses[] = $stmt;
} else {
throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType()));
}
public function getNode() {
return new Stmt\Trait_(
$this->name, array(
- 'stmts' => array_merge($this->properties, $this->methods)
+ 'stmts' => array_merge($this->uses, $this->properties, $this->methods)
), $this->attributes
);
}