private function hasInnerDirective($name, $inSubDirective, DirectiveInterface $directive)
    {
        if (!$directive->isSimple()) {
            $inSubDirective = $inSubDirective || $directive->hasDirective($name);
        }

        return $inSubDirective;
    }