Code Duplication    Length = 9-9 lines in 2 locations

src/POData/Writers/Atom/AtomODataWriter.php 2 locations

@@ 310-318 (lines=9) @@
307
308
        if ($entry->isMediaLinkEntry) {
309
            $this->xmlWriter->startElement(ODataConstants::ATOM_LINK_ELEMENT_NAME);
310
            if ($entry->mediaLink->eTag != null) {
311
                $this->xmlWriter->startAttributeNs(
312
                    ODataConstants::ODATA_METADATA_NAMESPACE_PREFIX,
313
                    ODataConstants::ATOM_ETAG_ATTRIBUTE_NAME,
314
                    null
315
                );
316
                $this->xmlWriter->text($entry->mediaLink->eTag);
317
                $this->xmlWriter->endAttribute();
318
            }
319
            $this->xmlWriter->startAttribute(
320
                ODataConstants::ATOM_LINK_RELATION_ATTRIBUTE_NAME
321
            );
@@ 341-349 (lines=9) @@
338
339
            foreach ($entry->mediaLinks as $mediaLink) {
340
                $this->xmlWriter->startElement(ODataConstants::ATOM_LINK_ELEMENT_NAME);
341
                if ($mediaLink->eTag != null) {
342
                    $this->xmlWriter->startAttributeNs(
343
                        ODataConstants::ODATA_METADATA_NAMESPACE_PREFIX,
344
                        ODataConstants::ATOM_ETAG_ATTRIBUTE_NAME,
345
                        null
346
                    );
347
                    $this->xmlWriter->text($mediaLink->eTag);
348
                    $this->xmlWriter->endAttribute();
349
                }
350
                $this->xmlWriter->startAttribute(ODataConstants::ATOM_LINK_RELATION_ATTRIBUTE_NAME);
351
                $this->xmlWriter->text($mediaLink->rel);
352
                $this->xmlWriter->endAttribute();