Code Duplication    Length = 19-23 lines in 3 locations

src/Mapping/Type/NestedType.php 1 location

@@ 12-33 (lines=22) @@
9
use AmaTeam\ElasticSearch\Mapping\Type\Parameter\EnabledParameter;
10
use AmaTeam\ElasticSearch\Mapping\Type\Parameter\PropertiesParameter;
11
12
class NestedType extends AbstractType
13
{
14
    const ID = 'nested';
15
    const FRIENDLY_ID = self::ID;
16
17
    public function getId(): string
18
    {
19
        return self::ID;
20
    }
21
22
    /**
23
     * @inheritDoc
24
     */
25
    public function getParameters(): array
26
    {
27
        return [
28
            EnabledParameter::getInstance(),
29
            DynamicParameter::getInstance(),
30
            PropertiesParameter::getInstance(),
31
        ];
32
    }
33
}
34

src/Mapping/Type/ObjectType.php 1 location

@@ 12-30 (lines=19) @@
9
use AmaTeam\ElasticSearch\Mapping\Type\Parameter\EnabledParameter;
10
use AmaTeam\ElasticSearch\Mapping\Type\Parameter\PropertiesParameter;
11
12
class ObjectType extends AbstractType
13
{
14
    const ID = 'object';
15
    const FRIENDLY_ID = self::ID;
16
17
    public function getId(): string
18
    {
19
        return self::ID;
20
    }
21
22
    public function getParameters(): array
23
    {
24
        return [
25
            DynamicParameter::getInstance(),
26
            EnabledParameter::getInstance(),
27
            PropertiesParameter::getInstance()
28
        ];
29
    }
30
}
31

src/Mapping/Type/RootType.php 1 location

@@ 13-35 (lines=23) @@
10
use AmaTeam\ElasticSearch\Mapping\Type\Parameter\PropertiesParameter;
11
use AmaTeam\ElasticSearch\Mapping\Type\Parameter\SourceParameter;
12
13
class RootType extends AbstractType
14
{
15
    const ID = 'root';
16
    const FRIENDLY_ID = self::ID;
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
            SourceParameter::getInstance(),
30
            DynamicParameter::getInstance(),
31
            EnabledParameter::getInstance(),
32
            PropertiesParameter::getInstance()
33
        ];
34
    }
35
}
36