@@ -8,7 +8,7 @@ |
||
| 8 | 8 | { |
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | - * @param $eventLd |
|
| 11 | + * @param \stdClass $eventLd |
|
| 12 | 12 | * @return bool |
| 13 | 13 | */ |
| 14 | 14 | public function hasLabel($eventLd, String $label) |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace CultuurNet\UDB3\Event\ReadModel\JSONLD\Specifications; |
| 4 | 4 | |
| 5 | -use ValueObjects\String\String; |
|
| 6 | - |
|
| 7 | 5 | trait Labelable |
| 8 | 6 | { |
| 9 | 7 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | - * @return String|null |
|
| 60 | + * @return String |
|
| 61 | 61 | */ |
| 62 | 62 | public function getSubBrand() |
| 63 | 63 | { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | - * @return String|null |
|
| 79 | + * @return String |
|
| 80 | 80 | */ |
| 81 | 81 | public function getTitle() |
| 82 | 82 | { |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
| 98 | - * @return String|null |
|
| 98 | + * @return String |
|
| 99 | 99 | */ |
| 100 | 100 | public function getText() |
| 101 | 101 | { |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
| 117 | - * @return String|null |
|
| 117 | + * @return String |
|
| 118 | 118 | */ |
| 119 | 119 | public function getCopyright() |
| 120 | 120 | { |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | /** |
| 136 | - * @return String|null |
|
| 136 | + * @return String |
|
| 137 | 137 | */ |
| 138 | 138 | public function getKeyword() |
| 139 | 139 | { |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | /** |
| 155 | - * @return String|null |
|
| 155 | + * @return String |
|
| 156 | 156 | */ |
| 157 | 157 | public function getArticle() |
| 158 | 158 | { |
@@ -268,15 +268,15 @@ |
||
| 268 | 268 | public function serialize() |
| 269 | 269 | { |
| 270 | 270 | $data = [ |
| 271 | - 'subBrand' => (string) $this->subBrand, |
|
| 272 | - 'plainText' => (string) $this->plainText, |
|
| 273 | - 'title' => (string) $this->title, |
|
| 274 | - 'text' => (string) $this->text, |
|
| 275 | - 'copyright' => (string) $this->copyright, |
|
| 276 | - 'keyword' => (string) $this->keyword, |
|
| 277 | - 'image' => (string) $this->image, |
|
| 278 | - 'article' => (string) $this->article, |
|
| 279 | - 'link' => (string) $this->link, |
|
| 271 | + 'subBrand' => (string)$this->subBrand, |
|
| 272 | + 'plainText' => (string)$this->plainText, |
|
| 273 | + 'title' => (string)$this->title, |
|
| 274 | + 'text' => (string)$this->text, |
|
| 275 | + 'copyright' => (string)$this->copyright, |
|
| 276 | + 'keyword' => (string)$this->keyword, |
|
| 277 | + 'image' => (string)$this->image, |
|
| 278 | + 'article' => (string)$this->article, |
|
| 279 | + 'link' => (string)$this->link, |
|
| 280 | 280 | ]; |
| 281 | 281 | |
| 282 | 282 | return array_filter($data, 'strlen'); |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | public function serialize() |
| 87 | 87 | { |
| 88 | 88 | $serialized = array( |
| 89 | - 'eventId' => (string) $this->eventId, |
|
| 89 | + 'eventId' => (string)$this->eventId, |
|
| 90 | 90 | 'language' => $this->language->getCode(), |
| 91 | 91 | 'collaborationData' => $this->collaborationData->serialize(), |
| 92 | 92 | ); |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - */ |
|
| 3 | + * @file |
|
| 4 | + */ |
|
| 5 | 5 | |
| 6 | 6 | namespace CultuurNet\UDB3\Variations; |
| 7 | 7 | |
@@ -295,7 +295,7 @@ |
||
| 295 | 295 | $placeLd = $document->getBody(); |
| 296 | 296 | |
| 297 | 297 | $placeLd->organizer = array( |
| 298 | - '@type' => 'Organizer', |
|
| 298 | + '@type' => 'Organizer', |
|
| 299 | 299 | ) + (array)$this->organizerJSONLD($organizerUpdated->getOrganizerId()); |
| 300 | 300 | |
| 301 | 301 | $this->repository->save($document->withBody($placeLd)); |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $jsonLD->address = $placeCreated->getAddress()->toJsonLd(); |
| 151 | 151 | |
| 152 | 152 | $calendarJsonLD = $placeCreated->getCalendar()->toJsonLd(); |
| 153 | - $jsonLD = (object) array_merge((array) $jsonLD, $calendarJsonLD); |
|
| 153 | + $jsonLD = (object)array_merge((array)$jsonLD, $calendarJsonLD); |
|
| 154 | 154 | |
| 155 | 155 | $eventType = $placeCreated->getEventType(); |
| 156 | 156 | $jsonLD->terms = [ |
@@ -197,11 +197,11 @@ discard block |
||
| 197 | 197 | $jsonLD->address = $majorInfoUpdated->getAddress()->toJsonLd(); |
| 198 | 198 | |
| 199 | 199 | $calendarJsonLD = $majorInfoUpdated->getCalendar()->toJsonLd(); |
| 200 | - $jsonLD = (object) array_merge((array) $jsonLD, $calendarJsonLD); |
|
| 200 | + $jsonLD = (object)array_merge((array)$jsonLD, $calendarJsonLD); |
|
| 201 | 201 | |
| 202 | 202 | // Remove old theme and event type. |
| 203 | - $jsonLD->terms = array_filter($jsonLD->terms, function ($term) { |
|
| 204 | - return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN; |
|
| 203 | + $jsonLD->terms = array_filter($jsonLD->terms, function($term) { |
|
| 204 | + return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN; |
|
| 205 | 205 | }); |
| 206 | 206 | |
| 207 | 207 | $eventType = $majorInfoUpdated->getEventType(); |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | // Remove all old facilities + get numeric keys. |
| 348 | 348 | $terms = array_values(array_filter( |
| 349 | 349 | $terms, |
| 350 | - function ($term) { |
|
| 350 | + function($term) { |
|
| 351 | 351 | return $term->domain !== Facility::DOMAIN; |
| 352 | 352 | } |
| 353 | 353 | )); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | |
| 14 | 14 | public function __construct($keyword) |
| 15 | 15 | { |
| 16 | - $keyword = (string) $keyword; |
|
| 16 | + $keyword = (string)$keyword; |
|
| 17 | 17 | |
| 18 | 18 | $this->filterQuery = new FilterQuery( |
| 19 | 19 | sprintf( |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * @param CalendarInterface $calendar |
| 69 | 69 | * @param Theme/null $theme |
| 70 | 70 | * |
| 71 | - * @return Event |
|
| 71 | + * @return Place |
|
| 72 | 72 | */ |
| 73 | 73 | public static function createPlace($id, Title $title, EventType $eventType, Address $address, CalendarInterface $calendar, Theme $theme = null) |
| 74 | 74 | { |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | /** |
| 82 | 82 | * Apply the place created event. |
| 83 | - * @param PlaceCreate $placeCreated |
|
| 83 | + * @param PlaceCreated $placeCreated |
|
| 84 | 84 | */ |
| 85 | 85 | protected function applyPlaceCreated(PlaceCreated $placeCreated) |
| 86 | 86 | { |
@@ -110,6 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | /** |
| 112 | 112 | * Handle an update command to update organizer. |
| 113 | + * @param string $organizerId |
|
| 113 | 114 | */ |
| 114 | 115 | public function updateOrganizer($organizerId) |
| 115 | 116 | { |
@@ -220,7 +221,7 @@ discard block |
||
| 220 | 221 | * @param string $cdbXmlNamespaceUri |
| 221 | 222 | * The cdb xml namespace uri. |
| 222 | 223 | * |
| 223 | - * @return Actor |
|
| 224 | + * @return Place |
|
| 224 | 225 | * The actor. |
| 225 | 226 | */ |
| 226 | 227 | public static function importFromUDB2Actor( |
@@ -250,7 +251,7 @@ discard block |
||
| 250 | 251 | * @param string $cdbXmlNamespaceUri |
| 251 | 252 | * The cdb xml namespace uri. |
| 252 | 253 | * |
| 253 | - * @return Actor |
|
| 254 | + * @return Place |
|
| 254 | 255 | * The actor. |
| 255 | 256 | */ |
| 256 | 257 | public static function importFromUDB2Event( |