public function getFunction(string $name): ?FunctionModelInterface
    {
        $functions = $this->functions->filter(function (FunctionModelInterface $function) use ($name) {
            return $function->getName() === $name;
        });
        if ($functions->isEmpty()) {
            return null;
        }
        return $functions->first();
    }