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

PointsOnlyParameter::getConstraints()   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
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