/** * Sets the property's type. * * @param string $type * * @return Property */ public function setType($type) { $this->type = (string) $type; $this->getDocBlock()->getTagCollection()->removeByName(Tag::TAG_VAR); $tag = Tag::createFromProperty($this); $this->getDocBlock()->addTag($tag); return $this; }