X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fnikic%2Fphp-parser%2Flib%2FPhpParser%2FBuilder%2FTrait_.php;fp=vendor%2Fnikic%2Fphp-parser%2Flib%2FPhpParser%2FBuilder%2FTrait_.php;h=7b004fa962e0325d8f778f3c6b81b7c76599f4b6;hp=153437d7941c1f5154414daee09b0a93ba6d72e1;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php index 153437d79..7b004fa96 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php @@ -8,6 +8,7 @@ use PhpParser\Node\Stmt; class Trait_ extends Declaration { protected $name; + protected $uses = array(); protected $properties = array(); protected $methods = array(); @@ -34,6 +35,8 @@ class Trait_ extends Declaration $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())); } @@ -49,7 +52,7 @@ class Trait_ extends Declaration 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 ); }