Code Duplication    Length = 13-13 lines in 2 locations

src/RepositoryCache.php 2 locations

@@ 157-169 (lines=13) @@
154
    /**
155
     * {@inheritdoc}
156
     */
157
    public function findAll(Pageable $pageable = null)
158
    {
159
        $cachedItem = $this->cache->getItem($this->cacheNamespacePage.md5(serialize($pageable)));
160
161
        if (!$cachedItem->isMiss() && null !== ($result = $cachedItem->get())) {
162
            return $result;
163
        }
164
165
        $result = $this->repository->findAll($pageable);
166
        $cachedItem->set($result, $this->cacheTime);
167
168
        return $result;
169
    }
170
171
    /**
172
     * {@inheritdoc}
@@ 174-186 (lines=13) @@
171
    /**
172
     * {@inheritdoc}
173
     */
174
    public function count(Filter $filter = null)
175
    {
176
        $cachedItem = $this->cache->getItem($this->cacheNamespaceCount.md5(serialize($filter)));
177
178
        if (!$cachedItem->isMiss() && null !== ($result = $cachedItem->get())) {
179
            return $result;
180
        }
181
182
        $result = $this->repository->count($filter);
183
        $cachedItem->set($result, $this->cacheTime);
184
185
        return $result;
186
    }
187
188
    /**
189
     * {@inheritdoc}