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
     * Loads a content info object.
@@ 183-192 (lines=10) @@
180
     *
181
     * @return \eZ\Publish\API\Repository\Values\Content\ContentInfo
182
     */
183
    public function loadContentInfoByRemoteId($remoteId)
184
    {
185
        $contentInfo = $this->internalLoadContentInfo($remoteId, true);
186
187
        if (!$this->repository->canUser('content', 'read', $contentInfo)) {
188
            throw new UnauthorizedException('content', 'read', array('remoteId' => $remoteId));
189
        }
190
191
        return $contentInfo;
192
    }
193
194
    /**
195
     * Loads a version info of the given content object.