| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 18 | public function updateSearchResultsResponse(&$request, &$response, $results, $data) |
||
| 19 | { |
||
| 20 | if ($request->isAjax() && $this->owner->hasExtension('AjaxControllerExtension')) { |
||
| 21 | if (!$response) { |
||
| 22 | $response = $this->owner->getAjaxResponse(); |
||
| 23 | } |
||
| 24 | $response->addRenderContext('RESULTS', $results); |
||
| 25 | $response->pushRegion('SearchResults', $results); |
||
| 26 | $response->pushRegion('SearchHeader', $results); |
||
| 27 | $response->triggerEvent('searchresults'); |
||
| 28 | } |
||
| 29 | } |
||
| 30 | } |
||
| 31 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.