Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 132-140 (lines=9) @@
129
     *
130
     * @return \eZ\Publish\API\Repository\Values\Content\ContentInfo
131
     */
132
    public function loadContentInfo($contentId)
133
    {
134
        $contentInfo = $this->internalLoadContentInfo($contentId);
135
        if (!$this->repository->canUser('content', 'read', $contentInfo)) {
136
            throw new UnauthorizedException('content', 'read', array('contentId' => $contentId));
137
        }
138
139
        return $contentInfo;
140
    }
141
142
    /**
143
     * {@inheritdoc}
@@ 202-211 (lines=10) @@
199
     *
200
     * @return \eZ\Publish\API\Repository\Values\Content\ContentInfo
201
     */
202
    public function loadContentInfoByRemoteId($remoteId)
203
    {
204
        $contentInfo = $this->internalLoadContentInfo($remoteId, true);
205
206
        if (!$this->repository->canUser('content', 'read', $contentInfo)) {
207
            throw new UnauthorizedException('content', 'read', array('remoteId' => $remoteId));
208
        }
209
210
        return $contentInfo;
211
    }
212
213
    /**
214
     * Loads a version info of the given content object.