<NME> ReturnTag.php
<BEF> <?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the canonical source repository
 * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

namespace Zend\Code\Generator\DocBlock\Tag;

use Zend\Code\Reflection\DocBlock\Tag\TagInterface as ReflectionTagInterface;

class ReturnTag extends AbstractTypeableTag implements TagInterface
{
    /**
     * @param  ReflectionTagInterface $reflectionTagReturn
     * @return ReturnTag
     * @deprecated Use TagManager::createTag() instead
     */
    public static function fromReflection(ReflectionTagInterface $reflectionTagReturn)
    {
        // @todo TagManager
    }

    /**
     * @return string
     */
    public function getName()
    {
        return 'return';
    }

    /**
     * @param string $datatype
     * @return ReturnTag
     * @deprecated Deprecated in 2.3. Use setTypes() instead
     */
    public function setDatatype($datatype)
    {
        return $this->setTypes($datatype);
    }

    /**
     * @return string
     * @deprecated Deprecated in 2.3. Use getTypes() or getTypesAsString() instead
     */
    public function getDatatype()
    {
        return $this->getTypesAsString();
    }

    /**
     * @return string
     */
    public function generate()
    {
        $output = '@return '
        . $this->getTypesAsString()
        . (! empty($this->description) ? ' ' . $this->description : '');

        return $output;
    }
}

<MSG> use TagManager in deprecated ::fromReflection() methods

<DFF> @@ -9,18 +9,21 @@
 
 namespace Zend\Code\Generator\DocBlock\Tag;
 
+use Zend\Code\Generator\DocBlock\TagManager;
 use Zend\Code\Reflection\DocBlock\Tag\TagInterface as ReflectionTagInterface;
 
 class ReturnTag extends AbstractTypeableTag implements TagInterface
 {
     /**
-     * @param  ReflectionTagInterface $reflectionTagReturn
+     * @param ReflectionTagInterface $reflectionTag
      * @return ReturnTag
      * @deprecated Use TagManager::createTag() instead
      */
-    public static function fromReflection(ReflectionTagInterface $reflectionTagReturn)
+    public static function fromReflection(ReflectionTagInterface $reflectionTag)
     {
-        // @todo TagManager
+        $tagManager = new TagManager();
+        $tagManager->initializeDefaultTags();
+        return $tagManager->createTagFromReflection($reflectionTag);
     }
 
     /**

use TagManager in deprecated ::fromReflection() methods