| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | 1 | protected function removeOlderThan(EntityManager $entityManager, $objectName, $field, \DateTime $olderThan) |
|
| 18 | { |
||
| 19 | 1 | $qb = $entityManager->createQueryBuilder()->delete($objectName, 'j'); |
|
| 20 | $qb = $qb |
||
| 21 | 1 | ->where('j.'.$field.' < :'.$field) |
|
| 22 | 1 | ->setParameter(':'.$field, $olderThan); |
|
| 23 | |||
| 24 | 1 | $query = $qb->getQuery(); |
|
| 25 | |||
| 26 | 1 | return $query->execute(); |
|
| 27 | } |
||
| 28 | } |
||
| 29 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.