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

DateType::getParameters()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 8

Duplication

Lines 10
Ratio 100 %

Importance

Changes 0
Metric Value
dl 10
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
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\DocValuesParameter;
8
use AmaTeam\ElasticSearch\Mapping\Parameter\FormatParameter;
9
use AmaTeam\ElasticSearch\Mapping\Parameter\IgnoreMalformedParameter;
10
use AmaTeam\ElasticSearch\Mapping\Parameter\IndexParameter;
11
use AmaTeam\ElasticSearch\Mapping\Parameter\LocaleParameter;
12
use AmaTeam\ElasticSearch\Mapping\Parameter\NullValueParameter;
13
use AmaTeam\ElasticSearch\Mapping\Parameter\StoreParameter;
14
15
class DateType extends AbstractType
16
{
17
    const ID = 'date';
18
    const FRIENDLY_ID = self::ID;
19
20
    public function getId(): string
21
    {
22
        return self::ID;
23
    }
24
25
    /**
26
     * @inheritDoc
27
     */
28 View Code Duplication
    public function getParameters(): array
0 ignored issues
show
Duplication introduced by
This method 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...
29
    {
30
        return [
31
            DocValuesParameter::getInstance(),
32
            FormatParameter::getInstance(),
33
            LocaleParameter::getInstance(),
34
            IgnoreMalformedParameter::getInstance(),
35
            IndexParameter::getInstance(),
36
            NullValueParameter::getInstance(),
37
            StoreParameter::getInstance(),
38
        ];
39
    }
40
}
41