TwoPerformanceEventsPerDay   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 50%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A validatedBy() 0 4 1
A getTargets() 0 4 1
1
<?php
2
3
namespace App\Validator;
4
5
use Symfony\Component\Validator\Constraint;
6
7
/** @Annotation */
8
class TwoPerformanceEventsPerDay extends Constraint
9
{
10
    /**
11
     * @var string
12
     */
13
    public $max_performances_per_day = 'you_cant_set_more_events_per_day';
14
15
    /**
16
     * @var string
17
     */
18
    public $performance_must_have_a_date = 'performance_must_have_a_date';
19
20
    public function validatedBy()
21
    {
22
        return 'two_performance_events_per_day';
23
    }
24
25 2
    public function getTargets()
26
    {
27 2
        return self::CLASS_CONSTRAINT;
28
    }
29
}
30