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

TwoPerformanceEventsPerDay   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1
wmc 2
lcom 0
cbo 1

2 Methods

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