| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | public function search($q) |
||
| 42 | { |
||
| 43 | /* @var \Doctrine\ODM\MongoDB\Query\Builder $qb */ |
||
| 44 | $qb = $this->repository->createQueryBuilder(); |
||
| 45 | $qb->field('title')->equals(new \MongoRegex('/' . addslashes($q) . '/i')); |
||
| 46 | $cursor = $qb->getQuery()->execute(); |
||
| 47 | |||
| 48 | $adapter = new DoctrineMongoCursor($cursor); |
||
| 49 | parent::__construct($adapter); |
||
|
|
|||
| 50 | |||
| 51 | return $this; |
||
| 52 | } |
||
| 53 | } |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()method in theSoncalls the wrong method in the parent class.