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.
@@ 532-545 (lines=14) @@
529
     *
530
     * @return \eZ\Publish\Core\REST\Server\Values\TemporaryRedirect
531
     */
532
    public function redirectCurrentVersionRelations($contentId)
533
    {
534
        $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId);
535
536
        return new Values\TemporaryRedirect(
537
            $this->router->generate(
538
                'ezpublish_rest_redirectCurrentVersionRelations',
539
                array(
540
                    'contentId' => $contentId,
541
                    'versionNumber' => $contentInfo->currentVersionNo,
542
                )
543
            )
544
        );
545
    }
546
547
    /**
548
     * Loads the relations of the given version.