Code Duplication    Length = 10-10 lines in 2 locations

Repositories/Cache/CacheWidgetDecorator.php 2 locations

@@ 20-29 (lines=10) @@
17
     * @param int $userId
18
     * @return string
19
     */
20
    public function findForUser($userId)
21
    {
22
        return $this->cache
23
            ->tags($this->entityName, 'global')
24
            ->remember("{$this->locale}.{$this->entityName}.findForUser.{$userId}", $this->cacheTime,
25
                function () use ($userId) {
26
                    return $this->repository->findForUser($userId);
27
                }
28
            );
29
    }
30
31
    /**
32
     * Update or create the given widgets for given user
@@ 36-45 (lines=10) @@
33
     * @param array $widgets
34
     * @return void
35
     */
36
    public function updateOrCreateForUser($widgets, $userId)
37
    {
38
        return $this->cache
39
            ->tags($this->entityName, 'global')
40
            ->remember("{$this->locale}.{$this->entityName}.updateOrCreateForUser.{$userId}", $this->cacheTime,
41
                function () use ($widgets, $userId) {
42
                    return $this->repository->updateOrCreateForUser($widgets, $userId);
43
                }
44
            );
45
    }
46
}
47