From c11045f9be963903f79dc2323737ec5a912f94f1 Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Thu, 29 Dec 2016 20:45:10 +0900 Subject: [PATCH] [Definition] ClassDefintion - fix possible bug on addProperty --- src/Definition/ClassDefinition.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Definition/ClassDefinition.php b/src/Definition/ClassDefinition.php index 0010b094..692b35df 100644 --- a/src/Definition/ClassDefinition.php +++ b/src/Definition/ClassDefinition.php @@ -118,9 +118,8 @@ public function addProperty(Node\Stmt\Property $property) { foreach ($property->props as $propertyDefinition) { $this->properties[$propertyDefinition->name] = $propertyDefinition; + $this->propertyStatements[$propertyDefinition->name] = $property; } - - $this->propertyStatements[$propertyDefinition->name] = $property; } /**