<NME> VarTag.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\Reflection\DocBlock\Tag;

class VarTag implements TagInterface, PhpDocTypedTagInterface
{
    /**
     * @var array
     */
    protected $types = [];

    /**
     * @var string
     */
    protected $variableName = null;

    /**
     * @var string
     */
    protected $description = null;

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

    /**
     * Initializer
     *
     * @param  string $tagDocblockLine
     */
    public function initialize($tagDocblockLine)
    {
        $match = [];
        if (!preg_match('#^(.+)?(\$[\S]+)\s*(.*)$#m', $tagDocblockLine, $match)) {
            return;
        }
            $match
        )) {
            return;
        }

        if ($match[1] !== '') {
            $this->types = explode('|', rtrim($match[1]));
        }

        if ($match[2] !== '') {
            $this->variableName = $match[2];
        }
    }

    public function getTypes()
    {
        return $this->types;
    }

    /**
     * @return null|string
     */
    public function getVariableName()
    {
        return $this->variableName;
    }

    /**
     * @return null|string
     */
    public function getDescription()
    {
        return $this->description;
    }

    public function __toString()
    {
        return 'DocBlock Tag [ * @' . $this->getName() . ' ]' . PHP_EOL;
    }
    public function __toString() : string
    {
        return 'DocBlock Tag [ * @' . $this->getName() . ' ]' . PHP_EOL;
    }
}

<MSG> #41 adding return hints where applicable in the reflection `VarTag`

<DFF> @@ -12,36 +12,35 @@ namespace Zend\Code\Reflection\DocBlock\Tag;
 class VarTag implements TagInterface, PhpDocTypedTagInterface
 {
     /**
-     * @var array
+     * @var string[]
      */
-    protected $types = [];
+    private $types = [];
 
     /**
-     * @var string
+     * @var string|null
      */
-    protected $variableName = null;
+    private $variableName;
 
     /**
-     * @var string
+     * @var string|null
      */
-    protected $description = null;
+    private $description;
 
     /**
-     * @return string
+     * {@inheritDoc}
      */
-    public function getName()
+    public function getName() : string
     {
         return 'var';
     }
 
     /**
-     * Initializer
-     *
-     * @param  string $tagDocblockLine
+     * {@inheritDoc}
      */
-    public function initialize($tagDocblockLine)
+    public function initialize($tagDocblockLine) : void
     {
         $match = [];
+
         if (!preg_match('#^(.+)?(\$[\S]+)\s*(.*)$#m', $tagDocblockLine, $match)) {
             return;
         }
@@ -59,28 +58,25 @@ class VarTag implements TagInterface, PhpDocTypedTagInterface
         }
     }
 
-    public function getTypes()
+    /**
+     * {@inheritDoc}
+     */
+    public function getTypes() : array
     {
         return $this->types;
     }
 
-    /**
-     * @return null|string
-     */
-    public function getVariableName()
+    public function getVariableName() : ?string
     {
         return $this->variableName;
     }
 
-    /**
-     * @return null|string
-     */
-    public function getDescription()
+    public function getDescription() : ?string
     {
         return $this->description;
     }
 
-    public function __toString()
+    public function __toString() : string
     {
         return 'DocBlock Tag [ * @' . $this->getName() . ' ]' . PHP_EOL;
     }

#41 adding return hints where applicable in the reflection `VarTag`