public function invoke(DocumentationInterface $parent, array $annotations): void
    {
        foreach ($annotations as $annotation) {
            if ($parent instanceof FunctionModelInterface) {
                // Parent is a function, save params, assertions and mocks annotations.
                $this->saveFunctionAnnotation($parent, $annotation);
            }
            if ($parent instanceof InterfaceModelInterface) {
                // Parent is a class like, save mock and constructor annotations.
                $this->saveClassLikeAnnotation($parent, $annotation);
            }
        }
    }