private function getMethodReturnType(\ReflectionMethod $method) { if (!method_exists($method, 'hasReturnType') || !$method->hasReturnType()) { return ''; } return ': ' . $this->formatType($method->getReturnType(), $method); }