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

FacetsConfig::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 13
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 17
rs 9.8333
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