Passed
Push — feature/initial-implementation ( e556a2...0c2c6c )
by Fike
01:52
created

TokenCountType::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 3
Ratio 100 %

Importance

Changes 0
Metric Value
dl 3
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;
6
7
use AmaTeam\ElasticSearch\Mapping\Parameter\AnalyzerParameter;
8
use AmaTeam\ElasticSearch\Mapping\Parameter\DocValuesParameter;
9
use AmaTeam\ElasticSearch\Mapping\Parameter\IndexParameter;
10
use AmaTeam\ElasticSearch\Mapping\Parameter\NullValueParameter;
11
use AmaTeam\ElasticSearch\Mapping\Parameter\StoreParameter;
12
13 View Code Duplication
class TokenCountType extends AbstractType
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
{
15
    const ID = 'token_count';
16
    const FRIENDLY_ID = 'tokenCount';
17
18
    public function getId(): string
19
    {
20
        return self::ID;
21
    }
22
23
    /**
24
     * @inheritDoc
25
     */
26
    public function getParameters(): array
27
    {
28
        return [
29
            AnalyzerParameter::getInstance(),
30
            // todo: enable_position_increments parameter
31
            DocValuesParameter::getInstance(),
32
            IndexParameter::getInstance(),
33
            NullValueParameter::getInstance(),
34
            StoreParameter::getInstance(),
35
        ];
36
    }
37
}
38