| Conditions | 4 |
| Paths | 5 |
| Total Lines | 20 |
| Code Lines | 12 |
| Lines | 20 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | View Code Duplication | public function matchItem(array $conditions) |
|
| 32 | { |
||
| 33 | $this->validateConditions($conditions); |
||
| 34 | |||
| 35 | foreach ($conditions as $key => $values) { |
||
| 36 | |||
| 37 | $query = new Query(); |
||
| 38 | $query->limit = self::INT_MAX_16BIT; |
||
| 39 | if (isset($query->performCount)) $query->performCount = false; |
||
| 40 | $query->filter = $this->getQueryCriterion($key, $values); |
||
| 41 | $results = $this->repository->getTrashService()->findTrashItems($query); |
||
| 42 | |||
| 43 | $items = []; |
||
| 44 | foreach ($results->searchHits as $result) { |
||
| 45 | $items[$result->valueObject->id] = $result->valueObject; |
||
| 46 | } |
||
| 47 | |||
| 48 | return new TrashedItemCollection($items); |
||
| 49 | } |
||
| 50 | } |
||
| 51 | } |
||
| 52 |