Code Duplication    Length = 18-18 lines in 2 locations

eZ/Publish/Core/Repository/TrashService.php 1 location

@@ 328-345 (lines=18) @@
325
     *
326
     * @return \eZ\Publish\API\Repository\Values\Content\TrashItem
327
     */
328
    protected function buildDomainTrashItemObject(Trashed $spiTrashItem)
329
    {
330
        return new TrashItem(
331
            array(
332
                'contentInfo' => $this->repository->getContentService()->loadContentInfo($spiTrashItem->contentId),
333
                'id' => $spiTrashItem->id,
334
                'priority' => $spiTrashItem->priority,
335
                'hidden' => $spiTrashItem->hidden,
336
                'invisible' => $spiTrashItem->invisible,
337
                'remoteId' => $spiTrashItem->remoteId,
338
                'parentLocationId' => $spiTrashItem->parentId,
339
                'pathString' => $spiTrashItem->pathString,
340
                'depth' => $spiTrashItem->depth,
341
                'sortField' => $spiTrashItem->sortField,
342
                'sortOrder' => $spiTrashItem->sortOrder,
343
            )
344
        );
345
    }
346
347
    /**
348
     * @param int $timestamp

eZ/Publish/Core/REST/Client/TrashService.php 1 location

@@ 239-256 (lines=18) @@
236
     *
237
     * @return \eZ\Publish\API\Repository\Values\Content\TrashItem
238
     */
239
    protected function buildTrashItem(Location $location)
240
    {
241
        return new TrashItem(
242
            array(
243
                'contentInfo' => $location->contentInfo,
244
                'id' => $location->id,
245
                'priority' => $location->priority,
246
                'hidden' => $location->hidden,
247
                'invisible' => $location->invisible,
248
                'remoteId' => $location->remoteId,
249
                'parentLocationId' => $location->parentLocationId,
250
                'pathString' => $location->pathString,
251
                'depth' => (int)$location->depth,
252
                'sortField' => $location->sortField,
253
                'sortOrder' => $location->sortOrder,
254
            )
255
        );
256
    }
257
}
258