| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php namespace Pz\Doctrine\Rest\QueryParser; |
||
| 35 | 8 | public function applyFilter(Criteria $criteria, $filter) |
|
| 36 | { |
||
| 37 | 8 | if (is_string($filter) && is_string($this->property)) { |
|
| 38 | 2 | $criteria->andWhere( |
|
| 39 | 2 | $criteria->expr()->contains($this->property, $filter) |
|
| 40 | ); |
||
| 41 | } |
||
| 42 | |||
| 43 | 8 | return $criteria; |
|
| 44 | } |
||
| 46 |