Completed
Push — master ( 5af20f...a965fa )
by Jonas
17s queued 10s
created

IncompatibleAudienceType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 7
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A forEvent() 0 4 1
1
<?php
2
3
namespace CultuurNet\UDB3\Event;
4
5
use CultuurNet\UDB3\Event\ValueObjects\AudienceType;
6
use Exception;
7
8
final class IncompatibleAudienceType extends Exception
9
{
10
    public static function forEvent(string $eventId, AudienceType $audienceType)
11
    {
12
        return new self('Audience type ' . $audienceType->toNative() . ' is incompatible with event ' . $eventId);
13
    }
14
}
15