Go\Proxy\FunctionProxy::override PHP Method

override() public method

Override function with new body
public override ( ReflectionFunction $function, string $body )
$function ReflectionFunction Function reflection
$body string New body for function
    public function override(ReflectionFunction $function, $body)
    {
        $this->functionsCode[$function->name] = $this->getOverriddenFunction($function, $body);
        return $this;
    }