Completed
Pull Request — master (#239)
by Luc
04:59
created

LabelEventIsOfPlaceType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isSatisfiedBy() 0 4 2
1
<?php
2
3
namespace CultuurNet\UDB3\Label\Specifications;
4
5
use CultuurNet\UDB3\Offer\Events\AbstractLabelEvent;
6
use CultuurNet\UDB3\Place\Events\LabelAdded;
7
use CultuurNet\UDB3\Place\Events\LabelDeleted;
8
9
class LabelEventIsOfPlaceType implements LabelEventSpecificationInterface
10
{
11
    /**
12
     * @param AbstractLabelEvent $labelEvent
13
     * @return bool
14
     */
15
    public function isSatisfiedBy($labelEvent)
16
    {
17
        return ($labelEvent instanceof LabelAdded || $labelEvent instanceof LabelDeleted);
18
    }
19
}
20