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