Code Duplication    Length = 9-9 lines in 2 locations

eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/RelationList.php 1 location

@@ 34-42 (lines=9) @@
31
        $visitor->setHeader('Content-Type', $generator->getMediaType('RelationList'));
32
33
        $path = $data->path;
34
        if ($path === null) {
35
            $path = $this->router->generate(
36
                'ezpublish_rest_loadVersionRelations',
37
                array(
38
                    'contentId' => $data->contentId,
39
                    'versionNumber' => $data->versionNo,
40
                )
41
            );
42
        }
43
44
        $generator->startAttribute('href', $path);
45
        $generator->endAttribute('href');

eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/Version.php 1 location

@@ 95-103 (lines=9) @@
92
        $contentType = $data->contentType;
93
94
        $path = $data->path;
95
        if ($path == null) {
96
            $path = $this->router->generate(
97
                'ezpublish_rest_loadContentInVersion',
98
                array(
99
                    'contentId' => $content->id,
100
                    'versionNumber' => $versionInfo->versionNo,
101
                )
102
            );
103
        }
104
105
        $generator->startAttribute('href', $path);
106
        $generator->endAttribute('href');