Passed
Pull Request — master (#104)
by Anton
13:25
created

SearchHttpDependencyProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 3
eloc 10
dl 0
loc 32
c 3
b 0
f 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getSearchConfigExpanderPlugins() 0 4 1
A getSearchConfigBuilderPlugins() 0 4 1
A getFacetConfigTransferBuilders() 0 7 1
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace Pyz\Client\SearchHttp;
9
10
use Spryker\Client\Catalog\Plugin\ConfigTransferBuilder\CategoryFacetConfigTransferBuilderPlugin;
11
use Spryker\Client\Catalog\Plugin\SearchHttp\CatalogSearchHttpConfigBuilderPlugin;
12
use Spryker\Client\CatalogPriceProductConnector\Plugin\ConfigTransferBuilder\PriceFacetConfigTransferBuilderPlugin;
13
use Spryker\Client\ProductLabel\Plugin\ProductLabelFacetConfigTransferBuilderPlugin;
14
use Spryker\Client\ProductReview\Plugin\RatingFacetConfigTransferBuilderPlugin;
15
use Spryker\Client\ProductSearchConfigStorage\Plugin\Config\ProductSearchConfigExpanderPlugin;
16
use Spryker\Client\SearchHttp\SearchHttpDependencyProvider as SprykerSearchHttpDependencyProvider;
17
18
class SearchHttpDependencyProvider extends SprykerSearchHttpDependencyProvider
19
{
20
    /**
21
     * @return array<\Spryker\Client\SearchExtension\Dependency\Plugin\SearchConfigBuilderPluginInterface>
22
     */
23
    protected function getSearchConfigBuilderPlugins(): array
24
    {
25
        return [
26
            new CatalogSearchHttpConfigBuilderPlugin(),
27
        ];
28
    }
29
30
    /**
31
     * @return array<\Spryker\Client\SearchExtension\Dependency\Plugin\SearchConfigExpanderPluginInterface>
32
     */
33
    protected function getSearchConfigExpanderPlugins(): array
34
    {
35
        return [
36
            new ProductSearchConfigExpanderPlugin(),
37
        ];
38
    }
39
40
    /**
41
     * @return array<\Spryker\Client\Catalog\Dependency\Plugin\FacetConfigTransferBuilderPluginInterface>
42
     */
43
    protected function getFacetConfigTransferBuilders(): array
44
    {
45
        return [
46
            new CategoryFacetConfigTransferBuilderPlugin(),
47
            new PriceFacetConfigTransferBuilderPlugin(),
48
            new ProductLabelFacetConfigTransferBuilderPlugin(),
49
            new RatingFacetConfigTransferBuilderPlugin(),
50
        ];
51
    }
52
}
53