private function outputChildren($children, $depth)
    {
        if ($children) {
            foreach ($children as $childNode) {
                if ($childNode->getInfo() === 'Prototype') {
                    $childNode->setInfo('');
                    $hasChildren = !$childNode instanceof ArrayNode || !$childNode->getChildren();
                    $this->writeNode($childNode, $depth + 1, $hasChildren);
                } else {
                    $this->writeNode($childNode, $depth + 1);
                }
            }
        }

        if ($children || $this->example || $this->defaultArray) {
            $this->writeLine('],', $depth * 4);
        }
    }