Completed
Pull Request — master (#473)
by
unknown
02:11
created

PlaceEvent::deserialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * @file
4
 * Contains CultuurNet\UDB3\Place\PlaceEvent.
5
 */
6
7
namespace CultuurNet\UDB3\Place;
8
9
use Broadway\Serializer\SerializableInterface;
10
11
/**
12
 * Abstract class for events on places.
13
 */
14
abstract class PlaceEvent implements SerializableInterface
15
{
16
    protected $placeId;
17
18
    public function __construct($placeId)
19
    {
20
        $this->placeId = $placeId;
21
    }
22
23
    public function getPlaceId()
24
    {
25
        return $this->placeId;
26
    }
27
28
    /**
29
     * @return array
30
     */
31
    public function serialize()
32
    {
33
        return array(
34
            'place_id' => $this->placeId,
35
        );
36
    }
37
}
38