private function getReturnTypeStringFromMethod(\ReflectionMethod $reflectionMethod)
{
$phpDoc = $reflectionMethod->getDocComment();
if ($phpDoc === false) {
return null;
}
$count = preg_match_all('#@return\\s+' . FileTypeMapper::TYPE_PATTERN . '#', $phpDoc, $matches);
if ($count !== 1) {
return null;
}
return $matches[1][0];
}