Пример #1
0
 /**
  * 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;
 }
Пример #2
0
 /**
  * Maps a method
  *
  * @param  php.ReflectionMethod $reflect
  * @return [:var]
  */
 protected function method($reflect)
 {
     $method = parent::method($reflect);
     if ($type = $reflect->getReturnTypeText()) {
         $method['returns'] = function () use($type) {
             return $this->types->map($type);
         };
     }
     return $method;
 }