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