setType() public method

Sets the type value
public setType ( string $type ) : StructAttribute
$type string
return StructAttribute
 /**
  * @param AttributeHandler $tagAttribute
  * @param AbstractModel $model
  * @param StructAttribute $structAttribute
  */
 protected function parseTagAttributeType(AttributeHandler $tagAttribute, AbstractModel $model, StructAttribute $structAttribute = null)
 {
     if ($structAttribute instanceof StructAttribute) {
         $type = $tagAttribute->getValue();
         if ($type !== null) {
             $typeModel = $this->generator->getStruct($type);
             $modelAttributeType = $structAttribute->getType();
             if ($typeModel instanceof Struct && (empty($modelAttributeType) || strtolower($modelAttributeType) === 'unknown')) {
                 if ($typeModel->getIsRestriction()) {
                     $structAttribute->setType($typeModel->getName());
                 } elseif (!$typeModel->getIsStruct() && $typeModel->getInheritance()) {
                     $structAttribute->setType($typeModel->getInheritance());
                 }
             }
         }
     } else {
         $model->addMeta($tagAttribute->getName(), $tagAttribute->getValue(true));
     }
 }