Passed
Push — dev ( 40f0b5...3a2e98 )
by Fike
02:50
created

IndexOptionsParameter   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 23
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A getFriendlyId() 0 3 1
A getAllowedValues() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AmaTeam\ElasticSearch\Mapping\Type\Parameter;
6
7
use AmaTeam\ElasticSearch\Mapping\Type\Parameter\Infrastructure\AbstractEnumParameter;
8
9
class IndexOptionsParameter extends AbstractEnumParameter
10
{
11
    const ID = 'index_options';
12
    const FRIENDLY_ID = 'indexOptions';
13
14
    const VALUE_DOCUMENTS = 'docs';
15
    const VALUE_FREQUENCIES = 'freqs';
16
    const VALUE_POSITIONS = 'positions';
17
    const VALUE_OFFSETS = 'offsets';
18
19
    public function getId(): string
20
    {
21
        return self::ID;
22
    }
23
24
    public function getFriendlyId(): string
25
    {
26
        return self::FRIENDLY_ID;
27
    }
28
29
    public function getAllowedValues()
30
    {
31
        return [self::VALUE_DOCUMENTS, self::VALUE_FREQUENCIES, self::VALUE_POSITIONS, self::VALUE_OFFSETS];
32
    }
33
}
34