AmountRange::getTargets()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PH\Bundle\CoreBundle\Validator\Constraint;
6
7
use Symfony\Component\Validator\Constraint;
8
9
final class AmountRange extends Constraint
10
{
11
    const INVALID_CHARACTERS_ERROR = 'cd6f6f8e-be36-11e7-abc4-cec278b6b50a';
12
    const TOO_HIGH_ERROR = 'cd6f761e-be36-11e7-abc4-cec278b6b50a';
13
    const TOO_LOW_ERROR = 'cd6f7cc2-be36-11e7-abc4-cec278b6b50a';
14
15
    protected static $errorNames = [
16
        self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR',
17
        self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR',
18
        self::TOO_LOW_ERROR => 'TOO_LOW_ERROR',
19
    ];
20
21
    public $minMessage = 'This value should be {{ limit }} or more.';
22
    public $maxMessage = 'This value should be {{ limit }} or less.';
23
    public $invalidMessage = 'This value should be a valid number.';
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function getTargets()
29
    {
30
        return self::CLASS_CONSTRAINT;
31
    }
32
}
33