Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 167-180 (lines=14) @@
164
     *
165
     * @return \eZ\Publish\Core\REST\Server\Values\TemporaryRedirect
166
     */
167
    public function redirectCurrentVersion($contentId)
168
    {
169
        $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId);
170
171
        return new Values\TemporaryRedirect(
172
            $this->router->generate(
173
                'ezpublish_rest_loadContentInVersion',
174
                array(
175
                    'contentId' => $contentId,
176
                    'versionNumber' => $contentInfo->currentVersionNo,
177
                )
178
            )
179
        );
180
    }
181
182
    /**
183
     * Loads a specific version of a given content object.
@@ 549-562 (lines=14) @@
546
     *
547
     * @return \eZ\Publish\Core\REST\Server\Values\TemporaryRedirect
548
     */
549
    public function redirectCurrentVersionRelations($contentId)
550
    {
551
        $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId);
552
553
        return new Values\TemporaryRedirect(
554
            $this->router->generate(
555
                'ezpublish_rest_redirectCurrentVersionRelations',
556
                array(
557
                    'contentId' => $contentId,
558
                    'versionNumber' => $contentInfo->currentVersionNo,
559
                )
560
            )
561
        );
562
    }
563
564
    /**
565
     * Loads the relations of the given version.