| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | 6 | public function removeForRedirect(Redirect $redirect) |
|
| 49 | { |
||
| 50 | 6 | $notFounds = $this->om->getRepository($this->class)->findBy(['path' => $redirect->getSource()]); |
|
| 51 | |||
| 52 | 6 | foreach ($notFounds as $notFound) { |
|
| 53 | 2 | $this->om->remove($notFound); |
|
| 54 | } |
||
| 55 | |||
| 56 | 6 | $this->om->flush(); |
|
| 57 | 6 | } |
|
| 58 | } |
||
| 59 |