Issues (3641)

Dependency/Client/CmsPageSearchToSearchBridge.php (1 issue)

1
<?php
2
3
/**
4
 * Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace Spryker\Client\CmsPageSearch\Dependency\Client;
9
10
use Spryker\Client\Search\Dependency\Plugin\QueryInterface;
11
12
class CmsPageSearchToSearchBridge implements CmsPageSearchToSearchBridgeInterface
13
{
14
    /**
15
     * @var \Spryker\Client\Search\SearchClientInterface
16
     */
17
    protected $searchClient;
18
19
    /**
20
     * @param \Spryker\Client\Search\SearchClientInterface $searchClient
21
     */
22
    public function __construct($searchClient)
23
    {
24
        $this->searchClient = $searchClient;
25
    }
26
27
    /**
28
     * @param \Spryker\Client\Search\Dependency\Plugin\QueryInterface $searchQuery
29
     * @param array<\Spryker\Client\Search\Dependency\Plugin\ResultFormatterPluginInterface> $resultFormatters
30
     * @param array<string, mixed> $requestParameters
31
     *
32
     * @return \Elastica\ResultSet|mixed|array
33
     */
34
    public function search(QueryInterface $searchQuery, array $resultFormatters = [], array $requestParameters = [])
35
    {
36
        return $this->searchClient->search($searchQuery, $resultFormatters, $requestParameters);
0 ignored issues
show
Deprecated Code introduced by
The function Spryker\Client\Search\Se...ientInterface::search() has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

36
        return /** @scrutinizer ignore-deprecated */ $this->searchClient->search($searchQuery, $resultFormatters, $requestParameters);
Loading history...
37
    }
38
39
    /**
40
     * @param \Spryker\Client\Search\Dependency\Plugin\QueryInterface $searchQuery
41
     * @param array<\Spryker\Client\Search\Dependency\Plugin\QueryExpanderPluginInterface> $searchQueryExpanders
42
     * @param array<string, mixed> $requestParameters
43
     *
44
     * @return \Spryker\Client\Search\Dependency\Plugin\QueryInterface
45
     */
46
    public function expandQuery(QueryInterface $searchQuery, array $searchQueryExpanders, array $requestParameters = []): QueryInterface
47
    {
48
        return $this->searchClient->expandQuery($searchQuery, $searchQueryExpanders, $requestParameters);
49
    }
50
}
51