Code Duplication    Length = 9-10 lines in 2 locations

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

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