/**
  * Maps a method
  *
  * @param  php.ReflectionMethod $reflect
  * @return [:var]
  */
 protected function method($reflect)
 {
     $method = parent::method($reflect);
     if ($type = $reflect->getReturnType()) {
         $method['returns'] = $this->mapReflectionType($reflect, (string) $type);
     }
     return $method;
 }
 /**
  * Maps method annotations
  *
  * @param  php.ReflectionMethod $reflect
  * @return [:var]
  */
 protected function methodAnnotations($reflect)
 {
     $annotations = [];
     foreach ($reflect->getAttributes() as $name => $value) {
         $annotations[$name] = empty($value) ? null : new Value($value[0]);
     }
     return empty($annotations) ? parent::methodAnnotations($reflect) : $annotations;
 }