@@ 548-555 (lines=8) @@ | ||
545 | } elseif ($item instanceof IdentifierInterface) { |
|
546 | assert($item->getPosition()->getLevel() <= ParserInterface::ROOT_LEVEL); |
|
547 | $writer->addIdentifierToData($item); |
|
548 | } else { |
|
549 | assert($item instanceof DocumentDataInterface); |
|
550 | if ($item->isCollection() === true) { |
|
551 | $writer->setDataAsArray(); |
|
552 | } elseif ($item->isNull() === true) { |
|
553 | $writer->setNullToData(); |
|
554 | } |
|
555 | } |
|
556 | } |
|
557 | ||
558 | // write footer |
|
@@ 614-621 (lines=8) @@ | ||
611 | } elseif ($item instanceof IdentifierInterface) { |
|
612 | assert($item->getPosition()->getLevel() <= ParserInterface::ROOT_LEVEL); |
|
613 | $writer->addIdentifierToData($item); |
|
614 | } else { |
|
615 | assert($item instanceof DocumentDataInterface); |
|
616 | if ($item->isCollection() === true) { |
|
617 | $writer->setDataAsArray(); |
|
618 | } elseif ($item->isNull() === true) { |
|
619 | $writer->setNullToData(); |
|
620 | } |
|
621 | } |
|
622 | } |
|
623 | ||
624 | // write footer |