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

ScaledFloatType::getFriendlyId()   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;
6
7
use AmaTeam\ElasticSearch\Mapping\Type\Infrastructure\AbstractNumericType;
8
use AmaTeam\ElasticSearch\Mapping\Type\Parameter\ScalingFactorParameter;
9
10
class ScaledFloatType extends AbstractNumericType
11
{
12
    const ID = 'scaled_float';
13
    const FRIENDLY_ID = 'scaledFloat';
14
15
    public function getId(): string
16
    {
17
        return self::ID;
18
    }
19
20
    public function getFriendlyId(): string
21
    {
22
        return self::FRIENDLY_ID;
23
    }
24
25
    /**
26
     * @inheritDoc
27
     */
28
    public function getParameters(): array
29
    {
30
        return array_merge(
31
            parent::getParameters(),
32
            [ScalingFactorParameter::getInstance()]
33
        );
34
    }
35
}
36