예제 #1
0
 /**
  * @param ParameterReflection $parameterReflection
  * @param string $argumentName
  * @return array
  */
 protected function parseDocCommentOfArgument(ParameterReflection $parameterReflection, $argumentName)
 {
     $docCommentParser = new DocCommentParser();
     $docCommentParser->parseDocComment($parameterReflection->getDeclaringFunction()->getDocComment());
     $parameterAnnotations = $docCommentParser->getTagValues('param');
     foreach ($parameterAnnotations as $parameterAnnotation) {
         list($type, $name, $description) = explode(' ', $parameterAnnotation, 3);
         if ($name === '$' . $argumentName) {
             return [$type, $description];
         }
     }
     return ['mixed', 'Unknown argument - may not be supported by command controller!'];
 }