IsTrue::getTargets()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace CoinhiveBundle\Validator;
3
4
use Symfony\Component\Validator\Constraint;
5
6
/**
7
 * @Annotation
8
 * @Target("PROPERTY")
9
 */
10
class IsTrue extends Constraint
11
{
12
    public $message = 'This value is not a valid captcha.';
13
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function getTargets()
18
    {
19
        return Constraint::PROPERTY_CONSTRAINT;
20
    }
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function validatedBy()
25
    {
26
        return 'coinhive_captcha_validator';
27
    }
28
}
29