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);
            }
        }
    }
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);
            }
        }
    }
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 ) ; } } }
Register all annotations in the parent depending on annotation type.

@param DocumentationInterface $parent      The parent to register annotation in.
@param array                  $annotations Annotations to register.

@throws AnnotationParseException If the annotation can not compile.
Register all annotations in the parent depending on annotation type .