/**
  * @param string $stringType
  *
  * @return string
  */
 public function filterNamespace($stringType)
 {
     $type = new ModelType($stringType);
     if (!$type->isObject()) {
         return $stringType;
     }
     $fullyQualifiedName = new FullyQualifiedName($stringType);
     return $fullyQualifiedName->getName();
 }
 /**
  * @param string $current
  * @param array  $collection
  *
  * @return string
  */
 public function align($current, $collection)
 {
     $elementLength = strlen($current);
     $longestElement = $elementLength;
     foreach ($collection as $element) {
         if ('Memio\\Model\\Phpdoc\\ParameterTag' === get_class($element)) {
             $type = $element->getType();
             $modelType = new ModelType($element->getType());
             if ($modelType->isObject()) {
                 $fullyQualifiedName = new FullyQualifiedName($type);
                 $type = $fullyQualifiedName->getName();
             }
             $longestElement = max($longestElement, strlen($type));
         }
     }
     return $current . str_repeat(' ', $longestElement - $elementLength);
 }
Example #3
0
 /**
  * {@inheritDoc}
  */
 public function getName()
 {
     return $this->fullyQualifiedName->getName();
 }