Swagger\Annotations\AbstractAnnotation::nested PHP Méthode

nested() private méthode

Wrap the context with a reference to the annotation it is nested in.
private nested ( AbstractAnnotation $annotation, Context $nestedContext ) : AbstractAnnotation
$annotation AbstractAnnotation
$nestedContext Swagger\Context
Résultat AbstractAnnotation
    private function nested($annotation, $nestedContext)
    {
        if (property_exists($annotation, '_context') && $annotation->_context === $this->_context) {
            $annotation->_context = $nestedContext;
        }
        return $annotation;
    }