| Total Complexity | 5 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class FactFinderNgSearchHandlerPlugin extends AbstractPlugin implements FactFinderHandlerPluginInterface |
||
| 17 | { |
||
| 18 | protected const PARAM_SUGGEST = 'suggest'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * {@inheritDoc} |
||
| 22 | * - The method uses search API request for handling search query. |
||
| 23 | * |
||
| 24 | * @api |
||
| 25 | * |
||
| 26 | * @param \Spryker\Client\Search\Dependency\Plugin\QueryInterface $searchQuery |
||
| 27 | * @param array $resultFormatters |
||
| 28 | * @param array $requestParameters |
||
| 29 | * |
||
| 30 | * @return array|\Elastica\ResultSet |
||
| 31 | */ |
||
| 32 | public function handle(QueryInterface $searchQuery, array $resultFormatters = [], array $requestParameters = []) |
||
| 33 | { |
||
| 34 | return $this->getClient()->search($searchQuery, $resultFormatters, $requestParameters); |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritDoc} |
||
| 39 | * |
||
| 40 | * @api |
||
| 41 | * |
||
| 42 | * @param array $requestParameters |
||
| 43 | * |
||
| 44 | * @return bool |
||
| 45 | */ |
||
| 46 | public function isApplicable(array $requestParameters): bool |
||
| 57 | } |
||
| 58 | } |
||
| 59 |