/**
  * @return Collection
  */
 public function getMagicProperties()
 {
     /** @var Collection $propertyTags */
     $propertyTags = clone $this->getTags()->get('property', new Collection());
     $propertyTags = $propertyTags->merge($this->getTags()->get('property-read', new Collection()));
     $propertyTags = $propertyTags->merge($this->getTags()->get('property-write', new Collection()));
     $properties = new Collection();
     /** @var Tag\PropertyDescriptor $propertyTag */
     foreach ($propertyTags as $propertyTag) {
         $property = new PropertyDescriptor();
         $property->setName(ltrim($propertyTag->getVariableName(), '$'));
         $property->setDescription($propertyTag->getDescription());
         $property->setTypes($propertyTag->getTypes());
         $property->setParent($this);
         $properties->add($property);
     }
     if ($this->getParent() instanceof ClassDescriptor) {
         $properties = $properties->merge($this->getParent()->getMagicProperties());
     }
     return $properties;
 }