Passed
Branch master (a0cc06)
by Dāvis
17:06
created

IsTrue   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTargets() 0 3 1
A validatedBy() 0 3 1
1
<?php
2
3
namespace Sludio\HelperBundle\Captcha\Validator\Constraint;
4
5
use Symfony\Component\Validator\Constraint;
6
7
/**
8
 * @Annotation
9
 * @Target("PROPERTY")
10
 */
11
class IsTrue extends Constraint
12
{
13
    /**
14
     * The reCAPTCHA validation message
15
     */
16
    public $message = "sludio_helper.captcha.recaptcha.validator.message";
17
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function getTargets()
22
    {
23
        return Constraint::PROPERTY_CONSTRAINT;
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function validatedBy()
30
    {
31
        return get_class($this).'Validator';
32
    }
33
}