ContainsDecimal   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

2 Methods

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