@@ -10,7 +10,6 @@ |
||
| 10 | 10 | use CultuurNet\UDB3\Calendar; |
| 11 | 11 | use CultuurNet\UDB3\CalendarInterface; |
| 12 | 12 | use CultuurNet\UDB3\Event\EventType; |
| 13 | -use CultuurNet\UDB3\Location; |
|
| 14 | 13 | use CultuurNet\UDB3\Place\PlaceEvent; |
| 15 | 14 | use CultuurNet\UDB3\Theme; |
| 16 | 15 | use CultuurNet\UDB3\Title; |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | |
| 8 | 8 | namespace CultuurNet\UDB3; |
| 9 | 9 | |
| 10 | -use Assert\Assertion; |
|
| 11 | 10 | use Broadway\Domain\AggregateRoot; |
| 12 | 11 | use Broadway\Domain\DomainEventStream; |
| 13 | 12 | |
@@ -70,10 +70,10 @@ |
||
| 70 | 70 | public function serialize() |
| 71 | 71 | { |
| 72 | 72 | return [ |
| 73 | - 'streetAddress' => $this->streetAddress, |
|
| 74 | - 'postalCode' => $this->postalCode, |
|
| 75 | - 'locality' => $this->locality, |
|
| 76 | - 'country' => $this->country, |
|
| 73 | + 'streetAddress' => $this->streetAddress, |
|
| 74 | + 'postalCode' => $this->postalCode, |
|
| 75 | + 'locality' => $this->locality, |
|
| 76 | + 'country' => $this->country, |
|
| 77 | 77 | ]; |
| 78 | 78 | } |
| 79 | 79 | |
@@ -132,14 +132,14 @@ |
||
| 132 | 132 | public function serialize() |
| 133 | 133 | { |
| 134 | 134 | return [ |
| 135 | - 'phone' => $this->phone, |
|
| 136 | - 'email' => $this->email, |
|
| 137 | - 'url' => $this->url, |
|
| 138 | - 'urlLabel' => $this->urlLabel, |
|
| 139 | - 'name' => $this->name, |
|
| 140 | - 'description' => $this->description, |
|
| 141 | - 'availabilityStarts' => $this->availabilityStarts, |
|
| 142 | - 'availabilityEnds' => $this->availabilityEnds |
|
| 135 | + 'phone' => $this->phone, |
|
| 136 | + 'email' => $this->email, |
|
| 137 | + 'url' => $this->url, |
|
| 138 | + 'urlLabel' => $this->urlLabel, |
|
| 139 | + 'name' => $this->name, |
|
| 140 | + 'description' => $this->description, |
|
| 141 | + 'availabilityStarts' => $this->availabilityStarts, |
|
| 142 | + 'availabilityEnds' => $this->availabilityEnds |
|
| 143 | 143 | ]; |
| 144 | 144 | } |
| 145 | 145 | |
@@ -70,9 +70,9 @@ |
||
| 70 | 70 | public function serialize() |
| 71 | 71 | { |
| 72 | 72 | return [ |
| 73 | - 'id' => $this->id, |
|
| 74 | - 'label' => $this->label, |
|
| 75 | - 'domain' => $this->domain, |
|
| 73 | + 'id' => $this->id, |
|
| 74 | + 'label' => $this->label, |
|
| 75 | + 'domain' => $this->domain, |
|
| 76 | 76 | ]; |
| 77 | 77 | } |
| 78 | 78 | |
@@ -72,10 +72,10 @@ |
||
| 72 | 72 | public function serialize() |
| 73 | 73 | { |
| 74 | 74 | return [ |
| 75 | - 'phone' => $this->phones, |
|
| 76 | - 'email' => $this->emails, |
|
| 77 | - 'url' => $this->urls, |
|
| 78 | - 'type' => $this->type, |
|
| 75 | + 'phone' => $this->phones, |
|
| 76 | + 'email' => $this->emails, |
|
| 77 | + 'url' => $this->urls, |
|
| 78 | + 'type' => $this->type, |
|
| 79 | 79 | ]; |
| 80 | 80 | } |
| 81 | 81 | |
@@ -78,16 +78,16 @@ |
||
| 78 | 78 | $firstTimestamp = reset($uitpasCalendar->timestamps); |
| 79 | 79 | $firstTimestampDate = new \DateTime(); |
| 80 | 80 | $firstTimestampDate |
| 81 | - ->setTimestamp($firstTimestamp->date) |
|
| 82 | - ->setTime(0, 0, 0); |
|
| 81 | + ->setTimestamp($firstTimestamp->date) |
|
| 82 | + ->setTime(0, 0, 0); |
|
| 83 | 83 | $dateRange->datefrom = $firstTimestampDate->getTimestamp(); |
| 84 | 84 | |
| 85 | 85 | /** @var \CultureFeed_Uitpas_Calendar_Timestamp $lastTimestamp */ |
| 86 | 86 | $lastTimestamp = end($uitpasCalendar->timestamps); |
| 87 | 87 | $lastTimestampDate = new \DateTime(); |
| 88 | 88 | $lastTimestampDate |
| 89 | - ->setTimestamp($lastTimestamp->date) |
|
| 90 | - ->setTime(24, 59, 59); |
|
| 89 | + ->setTimestamp($lastTimestamp->date) |
|
| 90 | + ->setTime(24, 59, 59); |
|
| 91 | 91 | $dateRange->dateto = $lastTimestampDate->getTimestamp(); |
| 92 | 92 | } else { |
| 93 | 93 | // If there is no useful calendar info, start from the time the |
@@ -92,14 +92,14 @@ |
||
| 92 | 92 | public function serialize() |
| 93 | 93 | { |
| 94 | 94 | return [ |
| 95 | - 'cdbid' => $this->cdbid, |
|
| 96 | - 'name' => $this->name, |
|
| 97 | - 'address' => [ |
|
| 95 | + 'cdbid' => $this->cdbid, |
|
| 96 | + 'name' => $this->name, |
|
| 97 | + 'address' => [ |
|
| 98 | 98 | 'addressCountry' => $this->country, |
| 99 | 99 | 'addressLocality' => $this->locality, |
| 100 | 100 | 'postalCode' => $this->postalcode, |
| 101 | 101 | 'streetAddress' => $this->street, |
| 102 | - ] |
|
| 102 | + ] |
|
| 103 | 103 | ]; |
| 104 | 104 | } |
| 105 | 105 | |
@@ -88,11 +88,11 @@ |
||
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | return parent::serialize() + array( |
| 91 | - 'title' => (string) $this->getTitle(), |
|
| 92 | - 'addresses' => $addresses, |
|
| 93 | - 'phones' => $this->getPhones(), |
|
| 94 | - 'emails' => $this->getEmails(), |
|
| 95 | - 'urls' => $this->getUrls(), |
|
| 91 | + 'title' => (string) $this->getTitle(), |
|
| 92 | + 'addresses' => $addresses, |
|
| 93 | + 'phones' => $this->getPhones(), |
|
| 94 | + 'emails' => $this->getEmails(), |
|
| 95 | + 'urls' => $this->getUrls(), |
|
| 96 | 96 | ); |
| 97 | 97 | } |
| 98 | 98 | |