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.
@@ 554-567 (lines=14) @@
551
     *
552
     * @return \eZ\Publish\Core\REST\Server\Values\TemporaryRedirect
553
     */
554
    public function redirectCurrentVersionRelations($contentId)
555
    {
556
        $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId);
557
558
        return new Values\TemporaryRedirect(
559
            $this->router->generate(
560
                'ezpublish_rest_redirectCurrentVersionRelations',
561
                array(
562
                    'contentId' => $contentId,
563
                    'versionNumber' => $contentInfo->currentVersionNo,
564
                )
565
            )
566
        );
567
    }
568
569
    /**
570
     * Loads the relations of the given version.