| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 49 | public function handleQuery(Query $query, callable $next, callable $first) |
||
| 50 | { |
||
| 51 | if (!$query instanceof GeocodeQuery) { |
||
| 52 | return $next($query); |
||
| 53 | } |
||
| 54 | |||
| 55 | $text = str_replace($this->needle, $this->replacement, $query->getText(), $count); |
||
| 56 | if ($count > 0) { |
||
| 57 | $query = $query->withText($text); |
||
| 58 | } |
||
| 59 | |||
| 60 | return $next($query); |
||
| 61 | } |
||
| 62 | } |
||
| 63 |