IsTrue   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 17
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
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