Passed
Pull Request — master (#69)
by Manuele
03:19
created

FacetsConfig   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 17 1
1
<?php
2
declare(strict_types=1);
3
4
namespace BitBag\SyliusElasticsearchPlugin\Model;
5
6
class FacetsConfig
7
{
8
    public static function get(): array
9
    {
10
        return [
11
            'price' => [
12
                'type' => 'histogram',
13
                'label' => 'Price',
14
                'options' => [
15
                    'field' => 'price_web_us',
16
                    'interval' => 10000*100,
17
                    'min_doc_count' => 1
18
                ]
19
            ],
20
            'taxon' => [
21
                'type' => 'terms',
22
                'label' => 'Taxon',
23
                'options' => [
24
                    'field' => 'product_taxons.keyword'
25
                ]
26
            ]
27
        ];
28
    }
29
}
30