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

IndexOptionsParameter::getAllowedValues()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
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