Exemplo n.º 1
0
 /**
  * @param \TokenReflection\IReflectionMethod $method
  * @return string
  */
 private function writeReturnType(IReflectionMethod $method)
 {
     $returnType = '';
     preg_match('/\\*\\h+@return\\h+([^\\h]+)/', (string) $method->getDocComment(), $matches);
     if (isset($matches[1])) {
         $returnType = $matches[1];
         if ($method->getDeclaringClass()) {
             $returnType = $this->expandNamespaceAlias($method->getDeclaringClass(), $returnType);
         }
         $returnType = ' : ' . $this->formatClassName($returnType);
     }
     return $returnType;
 }