Completed
Pull Request — master (#162)
by
unknown
03:18
created

TwoPerformanceEventsPerDay::validatedBy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
crap 1
1
<?php
2
3
namespace AppBundle\Validator;
4
5
use Symfony\Component\Validator\Constraint;
6
7
/** @Annotation */
8
class TwoPerformanceEventsPerDay extends Constraint
9
{
10
    /**
11
     * @var string
12
     */
13
    public $maxPerformancesPerDay = 'you_cant_set_more_events_per_day';
14
15
    /**
16
     * @var string
17
     */
18
    public $performanceMustHaveDate = 'performance_must_have_a_date';
19
20 1
    public function validatedBy()
21
    {
22 1
        return 'two_performance_events_per_day';
23
    }
24
25 1
    public function getTargets()
26
    {
27 1
        return self::CLASS_CONSTRAINT;
28
    }
29
}
30