Code Duplication    Length = 6-6 lines in 2 locations

Sitemap/Formatter/XmlFormatter.php 2 locations

@@ 141-146 (lines=6) @@
138
            $buffer .= "\t\t".'<video:restriction relationship="'.$relationship.'">'.$this->escape(implode(' ', $restrictions['countries'])).'</video:restriction>'."\n";
139
        }
140
141
        if ($video->getGalleryLoc() !== null) {
142
            $galleryLoc = $video->getGalleryLoc();
143
            $title = $galleryLoc['title'] !== null ? sprintf(' title="%s"', $this->escape($galleryLoc['title'])) : '';
144
145
            $buffer .= "\t\t".sprintf('<video:gallery_loc%s>', $title).$this->escape($galleryLoc['loc']).'</video:gallery_loc>'."\n";
146
        }
147
148
        if ($video->getRequiresSubscription() !== null) {
149
            $buffer .= "\t\t".'<video:requires_subscription>'.($video->getRequiresSubscription() ? 'yes' : 'no').'</video:requires_subscription>'."\n";
@@ 152-157 (lines=6) @@
149
            $buffer .= "\t\t".'<video:requires_subscription>'.($video->getRequiresSubscription() ? 'yes' : 'no').'</video:requires_subscription>'."\n";
150
        }
151
152
        if ($video->getUploader() !== null) {
153
            $uploader = $video->getUploader();
154
            $info = $uploader['info'] !== null ? sprintf(' info="%s"', $this->escape($uploader['info'])) : '';
155
156
            $buffer .= "\t\t".sprintf('<video:uploader%s>', $info).$this->escape($uploader['name']).'</video:uploader>'."\n";
157
        }
158
159
        if ($video->getPlatforms() !== null) {
160
            foreach ($video->getPlatforms() as $platform => $relationship) {