Code Duplication    Length = 8-10 lines in 3 locations

eZ/Publish/Core/Persistence/Cache/BookmarkHandler.php 1 location

@@ 54-61 (lines=8) @@
51
        return $this->getMultipleCacheItems(
52
            $locationIds,
53
            'ez-bookmark-' . $userId . '-',
54
            function (array $missingIds) use ($userId) {
55
                $this->logger->logCall(__CLASS__ . '::loadByUserIdAndLocationId', [
56
                    'userId' => $userId,
57
                    'locationIds' => $missingIds,
58
                ]);
59
60
                return $this->persistenceHandler->bookmarkHandler()->loadByUserIdAndLocationId($userId, $missingIds);
61
            },
62
            function (Bookmark $bookmark) {
63
                $tags = [
64
                    'bookmark-' . $bookmark->id,

eZ/Publish/Core/Persistence/Cache/NotificationHandler.php 1 location

@@ 154-163 (lines=10) @@
151
    /**
152
     * {@inheritdoc}
153
     */
154
    public function loadUserNotifications(int $userId, int $offset, int $limit): array
155
    {
156
        $this->logger->logCall(__METHOD__, [
157
            'ownerId' => $userId,
158
            'offset' => $offset,
159
            'limit' => $limit,
160
        ]);
161
162
        return $this->persistenceHandler->notificationHandler()->loadUserNotifications($userId, $offset, $limit);
163
    }
164
}
165

eZ/Publish/Core/Persistence/Cache/LocationHandler.php 1 location

@@ 50-57 (lines=8) @@
47
        return $this->getMultipleCacheItems(
48
            $locationIds,
49
            'ez-location-',
50
            function (array $cacheMissIds) use ($translations, $useAlwaysAvailable) {
51
                $this->logger->logCall(
52
                    __CLASS__ . '::loadList',
53
                    ['location' => $cacheMissIds, 'translations' => $translations, 'always-available' => $useAlwaysAvailable]
54
                );
55
56
                return $this->persistenceHandler->locationHandler()->loadList($cacheMissIds, $translations, $useAlwaysAvailable);
57
            },
58
            function (Location $location) {
59
                return $this->getCacheTags($location);
60
            },