Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
37 | public function deleteCaches(array $paths, array $filters): void |
||
38 | { |
||
39 | foreach ($paths as $path) { |
||
40 | foreach ($filters as $filter) { |
||
41 | $metadata = $this->repository->findOneBy([ |
||
42 | 'path' => $path, |
||
43 | 'filter' => $filter, |
||
44 | ]); |
||
45 | if ($metadata) { |
||
46 | $this->entityManager->remove($metadata); |
||
47 | } |
||
48 | } |
||
49 | } |
||
50 | $this->entityManager->flush(); |
||
51 | } |
||
64 |