public function hasFunction(string $name): bool
    {
        return $this->functions->exists(function (int $key, FunctionModelInterface $function) use ($name) {
            return $function->getName() === $name;
        });
    }