| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3.1406 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | 2 | protected function removeOlderThan($objectName, $field, \DateTime $olderThan) |
|
| 20 | { |
||
| 21 | /** @var DocumentManager $objectManager */ |
||
| 22 | 2 | $objectManager = $this->getObjectManager(); |
|
| 23 | 2 | $qb = $objectManager->createQueryBuilder($objectName); |
|
| 24 | $qb |
||
| 25 | 2 | ->remove() |
|
| 26 | 2 | ->field($field)->lt($olderThan); |
|
| 27 | |||
| 28 | 2 | $query = $qb->getQuery(); |
|
| 29 | 2 | $result = $query->execute(); |
|
| 30 | 2 | if ($result instanceof DeleteResult) { |
|
| 31 | 2 | return $result->getDeletedCount(); |
|
| 32 | } elseif (isset($result['n'])) { |
||
| 33 | return $result['n']; |
||
| 34 | } |
||
| 35 | |||
| 36 | return 0; |
||
| 37 | } |
||
| 68 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths