Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 165-178 (lines=14) @@
162
     *
163
     * @return \eZ\Publish\Core\REST\Server\Values\TemporaryRedirect
164
     */
165
    public function redirectCurrentVersion($contentId)
166
    {
167
        $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId);
168
169
        return new Values\TemporaryRedirect(
170
            $this->router->generate(
171
                'ezpublish_rest_loadContentInVersion',
172
                array(
173
                    'contentId' => $contentId,
174
                    'versionNumber' => $contentInfo->currentVersionNo,
175
                )
176
            )
177
        );
178
    }
179
180
    /**
181
     * Loads a specific version of a given content object.
@@ 565-578 (lines=14) @@
562
     *
563
     * @return \eZ\Publish\Core\REST\Server\Values\TemporaryRedirect
564
     */
565
    public function redirectCurrentVersionRelations($contentId)
566
    {
567
        $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId);
568
569
        return new Values\TemporaryRedirect(
570
            $this->router->generate(
571
                'ezpublish_rest_redirectCurrentVersionRelations',
572
                array(
573
                    'contentId' => $contentId,
574
                    'versionNumber' => $contentInfo->currentVersionNo,
575
                )
576
            )
577
        );
578
    }
579
580
    /**
581
     * Loads the relations of the given version.