| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function handle(CriteriaConverter $converter, Criterion $criterion) |
||
| 18 | { |
||
| 19 | $result = []; |
||
| 20 | |||
| 21 | $valueList = (array)$criterion->value; |
||
| 22 | |||
| 23 | foreach ($valueList as $value) { |
||
| 24 | // be tolerant to devs forgetting 1st and last slash |
||
| 25 | $value = '/' . trim($value, '/') . '/'; |
||
| 26 | $result[] = 'meta_path_string_ms:' . $this->escapeValue($value) . '*'; |
||
| 27 | } |
||
| 28 | |||
| 29 | return count($result) == 1 ? $result[0] : array_unshift($result, 'OR'); |
||
| 30 | } |
||
| 31 | } |
||
| 32 |