Code Duplication    Length = 9-10 lines in 2 locations

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

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