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
     * {@inheritdoc}
@@ 201-210 (lines=10) @@
198
     *
199
     * @return \eZ\Publish\API\Repository\Values\Content\ContentInfo
200
     */
201
    public function loadContentInfoByRemoteId($remoteId)
202
    {
203
        $contentInfo = $this->internalLoadContentInfo($remoteId, true);
204
205
        if (!$this->repository->canUser('content', 'read', $contentInfo)) {
206
            throw new UnauthorizedException('content', 'read', array('remoteId' => $remoteId));
207
        }
208
209
        return $contentInfo;
210
    }
211
212
    /**
213
     * Loads a version info of the given content object.