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

@@ 57-65 (lines=9) @@
54
        $visitor->setHeader('Accept-Patch', $generator->getMediaType('VersionUpdate'));
55
56
        $path = $data->path;
57
        if ($path == null) {
58
            $path = $this->router->generate(
59
                'ezpublish_rest_loadContentInVersion',
60
                array(
61
                    'contentId' => $content->id,
62
                    'versionNumber' => $versionInfo->versionNo,
63
                )
64
            );
65
        }
66
67
        $generator->startAttribute('href', $path);
68
        $generator->endAttribute('href');