protected function getOverriddenFunction(ReflectionFunctionAbstract $functionLike, $body)
{
$reflectionReturnType = PHP_VERSION_ID >= 50700 ? $functionLike->getReturnType() : '';
$modifiersLine = '';
if ($reflectionReturnType) {
$nsPrefix = $reflectionReturnType->isBuiltin() ? '' : '\\';
$reflectionReturnType = $nsPrefix . (string) $reflectionReturnType;
}
if ($functionLike instanceof ReflectionMethod) {
$modifiersLine = join(' ', Reflection::getModifierNames($functionLike->getModifiers()));
}
$code = preg_replace('/ {4}|\\t/', '', $functionLike->getDocComment()) . "\n" . $modifiersLine . ' function ' . ($functionLike->returnsReference() ? '&' : '') . $functionLike->name . '(' . join(', ', $this->getParameters($functionLike->getParameters())) . ")" . ($reflectionReturnType ? " : {$reflectionReturnType}" : '') . "\n" . "{\n" . $this->indent($body) . "\n" . "}\n";
return $code;
}