AmountRange   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getTargets() 0 4 1
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