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

LabelEventIsOfPlaceType::isSatisfiedBy()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 2
eloc 2
nc 2
nop 1
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