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

LabelEventIsOfOrganizerType::isSatisfiedBy()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 2
eloc 2
nc 2
nop 1
1
<?php
2
3
namespace CultuurNet\UDB3\Label\Specifications;
4
5
use CultuurNet\UDB3\Organizer\Events\AbstractLabelEvent;
6
use CultuurNet\UDB3\Organizer\Events\LabelAdded;
7
use CultuurNet\UDB3\Organizer\Events\LabelRemoved;
8
9
class LabelEventIsOfOrganizerType 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 LabelRemoved);
18
    }
19
}
20