Code Duplication    Length = 14-14 lines in 2 locations

eZ/Publish/Core/REST/Server/Controller/Content.php 2 locations

@@ 166-179 (lines=14) @@
163
     *
164
     * @return \eZ\Publish\Core\REST\Server\Values\TemporaryRedirect
165
     */
166
    public function redirectCurrentVersion($contentId)
167
    {
168
        $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId);
169
170
        return new Values\TemporaryRedirect(
171
            $this->router->generate(
172
                'ezpublish_rest_loadContentInVersion',
173
                array(
174
                    'contentId' => $contentId,
175
                    'versionNumber' => $contentInfo->currentVersionNo,
176
                )
177
            )
178
        );
179
    }
180
181
    /**
182
     * Loads a specific version of a given content object.
@@ 580-593 (lines=14) @@
577
     *
578
     * @return \eZ\Publish\Core\REST\Server\Values\TemporaryRedirect
579
     */
580
    public function redirectCurrentVersionRelations($contentId)
581
    {
582
        $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId);
583
584
        return new Values\TemporaryRedirect(
585
            $this->router->generate(
586
                'ezpublish_rest_redirectCurrentVersionRelations',
587
                array(
588
                    'contentId' => $contentId,
589
                    'versionNumber' => $contentInfo->currentVersionNo,
590
                )
591
            )
592
        );
593
    }
594
595
    /**
596
     * Loads the relations of the given version.