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.
@@ 496-509 (lines=14) @@
493
     *
494
     * @return \eZ\Publish\Core\REST\Server\Values\TemporaryRedirect
495
     */
496
    public function redirectCurrentVersionRelations($contentId)
497
    {
498
        $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId);
499
500
        return new Values\TemporaryRedirect(
501
            $this->router->generate(
502
                'ezpublish_rest_redirectCurrentVersionRelations',
503
                array(
504
                    'contentId' => $contentId,
505
                    'versionNumber' => $contentInfo->currentVersionNo,
506
                )
507
            )
508
        );
509
    }
510
511
    /**
512
     * Loads the relations of the given version.