| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function delete(Entity $entity) { |
||
| 33 | if (!($entity instanceof Item)) { |
||
| 34 | throw new \InvalidArgumentException(); |
||
| 35 | } |
||
| 36 | |||
| 37 | $qb = $this->db->getQueryBuilder(); |
||
| 38 | |||
| 39 | $qb->delete('files_antivirus') |
||
| 40 | ->where( |
||
| 41 | $qb->expr()->eq('fileid', $qb->createNamedParameter($entity->getFileid())) |
||
| 42 | ); |
||
| 43 | $qb->execute(); |
||
| 44 | |||
| 45 | return $entity; |
||
| 46 | } |
||
| 47 | } |
||
| 48 |