ContainsDecimal::validatedBy()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
/**
4
 * @author Rafał Muszyński <[email protected]>
5
 * @copyright 2013 Sourcefabric o.p.s.
6
 * @license http://www.gnu.org/licenses/gpl-3.0.txt
7
 */
8
9
namespace Newscoop\PaywallBundle\Validator\Constraints;
10
11
use Symfony\Component\Validator\Constraint;
12
13
/**
14
 * @Annotation
15
 */
16
class ContainsDecimal extends Constraint
17
{
18
    public $message = 'paywall.step1.form.error.price.custom';
19
    public $entity;
20
    public $property;
21
22
    /**
23
     * Use ContainsDecimalValidator class when actually performing the validation.
24
     *
25
     * @return Newscoop\PaywallBundle\Validator\Constraints\ContainsDecimalValidator
26
     */
27
    public function validatedBy()
28
    {
29
        return 'decimal_validator';
30
    }
31
32
    public function getTargets()
33
    {
34
        return self::PROPERTY_CONSTRAINT;
35
    }
36
}
37