Code Duplication    Length = 9-10 lines in 2 locations

eZ/Publish/Core/Repository/ContentService.php 2 locations

@@ 133-141 (lines=9) @@
130
     *
131
     * @return \eZ\Publish\API\Repository\Values\Content\ContentInfo
132
     */
133
    public function loadContentInfo($contentId)
134
    {
135
        $contentInfo = $this->internalLoadContentInfo($contentId);
136
        if (!$this->repository->canUser('content', 'read', $contentInfo)) {
137
            throw new UnauthorizedException('content', 'read', array('contentId' => $contentId));
138
        }
139
140
        return $contentInfo;
141
    }
142
143
    /**
144
     * Loads a content info object.
@@ 184-193 (lines=10) @@
181
     *
182
     * @return \eZ\Publish\API\Repository\Values\Content\ContentInfo
183
     */
184
    public function loadContentInfoByRemoteId($remoteId)
185
    {
186
        $contentInfo = $this->internalLoadContentInfo($remoteId, true);
187
188
        if (!$this->repository->canUser('content', 'read', $contentInfo)) {
189
            throw new UnauthorizedException('content', 'read', array('remoteId' => $remoteId));
190
        }
191
192
        return $contentInfo;
193
    }
194
195
    /**
196
     * Loads a version info of the given content object.