Passed
Push — feature/initial-implementation ( 69714c...aa3ce7 )
by Fike
02:16
created

PointsOnlyParameter   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 18
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getFriendlyId() 0 3 1
A getId() 0 3 1
A getConstraints() 0 3 1
1
<?php
2
3
namespace AmaTeam\ElasticSearch\Mapping\Type\Parameter;
4
5
use AmaTeam\ElasticSearch\Mapping\Type\Parameter\Infrastructure\AbstractParameter;
6
use Symfony\Component\Validator\Constraints\Type;
7
8
class PointsOnlyParameter extends AbstractParameter
9
{
10
    const ID = 'points_only';
11
    const FRIENDLY_ID = 'pointsOnly';
12
13
    public function getId(): string
14
    {
15
        return self::ID;
16
    }
17
18
    public function getFriendlyId(): string
19
    {
20
        return self::FRIENDLY_ID;
21
    }
22
23
    public function getConstraints(): array
24
    {
25
        return [new Type('bool')];
26
    }
27
}
28