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/UserPreferenceHandler.php 1 location

@@ 94-103 (lines=10) @@
91
    /**
92
     * {@inheritdoc}
93
     */
94
    public function loadUserPreferences(int $userId, int $offset, int $limit): array
95
    {
96
        $this->logger->logCall(__METHOD__, [
97
            'userId' => $userId,
98
            'offset' => $offset,
99
            'limit' => $limit,
100
        ]);
101
102
        return $this->persistenceHandler->userPreferenceHandler()->loadUserPreferences($userId, $offset, $limit);
103
    }
104
}
105

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

@@ 160-169 (lines=10) @@
157
    /**
158
     * {@inheritdoc}
159
     */
160
    public function loadUserNotifications(int $userId, int $offset, int $limit): array
161
    {
162
        $this->logger->logCall(__METHOD__, [
163
            'ownerId' => $userId,
164
            'offset' => $offset,
165
            'limit' => $limit,
166
        ]);
167
168
        return $this->persistenceHandler->notificationHandler()->loadUserNotifications($userId, $offset, $limit);
169
    }
170
}
171