@@ -40,7 +40,7 @@ |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
43 | - * @return ing |
|
43 | + * @return integer |
|
44 | 44 | */ |
45 | 45 | function getIndexToDelete() |
46 | 46 | { |
@@ -799,6 +799,9 @@ |
||
799 | 799 | return $document; |
800 | 800 | } |
801 | 801 | |
802 | + /** |
|
803 | + * @param string $eventId |
|
804 | + */ |
|
802 | 805 | private function generateSameAs($eventId, $name) |
803 | 806 | { |
804 | 807 | $eventSlug = $this->slugger->slug($name); |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @file |
|
4 | - */ |
|
3 | + * @file |
|
4 | + */ |
|
5 | 5 | |
6 | 6 | namespace CultuurNet\UDB3\Event; |
7 | 7 | |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | ); |
352 | 352 | $jsonLD->name['nl'] = $eventCreated->getTitle(); |
353 | 353 | $jsonLD->location = array( |
354 | - '@type' => 'Place', |
|
354 | + '@type' => 'Place', |
|
355 | 355 | ) + (array)$this->placeJSONLD($eventCreated->getLocation()->getCdbid()); |
356 | 356 | |
357 | 357 | $calendarJsonLD = $eventCreated->getCalendar()->toJsonLd(); |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | |
410 | 410 | $jsonLD->name->nl = $majorInfoUpdated->getTitle(); |
411 | 411 | $jsonLD->location = array( |
412 | - '@type' => 'Place', |
|
412 | + '@type' => 'Place', |
|
413 | 413 | ) + (array)$this->placeJSONLD($majorInfoUpdated->getLocation()->getCdbid()); |
414 | 414 | |
415 | 415 | $calendarJsonLD = $majorInfoUpdated->getCalendar()->toJsonLd(); |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | $eventLd = $document->getBody(); |
650 | 650 | |
651 | 651 | $eventLd->organizer = array( |
652 | - '@type' => 'Organizer', |
|
652 | + '@type' => 'Organizer', |
|
653 | 653 | ) + (array)$this->organizerJSONLD($organizerUpdated->getOrganizerId()); |
654 | 654 | |
655 | 655 | $this->repository->save($document->withBody($eventLd)); |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | ) + (array)$this->placeJSONLD($eventCreated->getLocation()->getCdbid()); |
356 | 356 | |
357 | 357 | $calendarJsonLD = $eventCreated->getCalendar()->toJsonLd(); |
358 | - $jsonLD = (object) array_merge((array) $jsonLD, $calendarJsonLD); |
|
358 | + $jsonLD = (object)array_merge((array)$jsonLD, $calendarJsonLD); |
|
359 | 359 | |
360 | 360 | // Same as. |
361 | 361 | $jsonLD->sameAs = $this->generateSameAs( |
@@ -413,11 +413,11 @@ discard block |
||
413 | 413 | ) + (array)$this->placeJSONLD($majorInfoUpdated->getLocation()->getCdbid()); |
414 | 414 | |
415 | 415 | $calendarJsonLD = $majorInfoUpdated->getCalendar()->toJsonLd(); |
416 | - $jsonLD = (object) array_merge((array) $jsonLD, $calendarJsonLD); |
|
416 | + $jsonLD = (object)array_merge((array)$jsonLD, $calendarJsonLD); |
|
417 | 417 | |
418 | 418 | // Remove old theme and event type. |
419 | - $jsonLD->terms = array_filter($jsonLD->terms, function ($term) { |
|
420 | - return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN; |
|
419 | + $jsonLD->terms = array_filter($jsonLD->terms, function($term) { |
|
420 | + return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN; |
|
421 | 421 | }); |
422 | 422 | |
423 | 423 | $eventType = $majorInfoUpdated->getEventType(); |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | $eventLd = $document->getBody(); |
478 | 478 | |
479 | 479 | $labels = isset($eventLd->labels) ? $eventLd->labels : []; |
480 | - $label = (string) $eventWasLabelled->getLabel(); |
|
480 | + $label = (string)$eventWasLabelled->getLabel(); |
|
481 | 481 | |
482 | 482 | $labels[] = $label; |
483 | 483 | $eventLd->labels = array_unique($labels); |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | if (is_array($eventLd->labels)) { |
495 | 495 | $eventLd->labels = array_filter( |
496 | 496 | $eventLd->labels, |
497 | - function ($label) use ($unlabelled) { |
|
497 | + function($label) use ($unlabelled) { |
|
498 | 498 | return !$unlabelled->getLabel()->equals( |
499 | 499 | new Label($label) |
500 | 500 | ); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | /** |
20 | 20 | * @param string $id |
21 | - * @param Object $bookingInfo |
|
21 | + * @param \CultuurNet\UDB3\BookingInfo $bookingInfo |
|
22 | 22 | */ |
23 | 23 | public function __construct($id, $bookingInfo) |
24 | 24 | { |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
30 | - * @return mixed The object instance |
|
30 | + * @return BookingInfoUpdated The object instance |
|
31 | 31 | */ |
32 | 32 | public static function deserialize(array $data) |
33 | 33 | { |
@@ -42,7 +42,7 @@ |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
45 | - * @return mixed The object instance |
|
45 | + * @return EventCreatedFromCdbXml The object instance |
|
46 | 46 | */ |
47 | 47 | public static function deserialize(array $data) |
48 | 48 | { |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by PhpStorm. |
|
4 | - * User: nicolas |
|
5 | - * Date: 07/10/15 |
|
6 | - * Time: 11:25 |
|
7 | - */ |
|
3 | + * Created by PhpStorm. |
|
4 | + * User: nicolas |
|
5 | + * Date: 07/10/15 |
|
6 | + * Time: 11:25 |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace CultuurNet\UDB3\Event\Events; |
10 | 10 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
45 | - * @return mixed The object instance |
|
45 | + * @return EventUpdatedFromCdbXml The object instance |
|
46 | 46 | */ |
47 | 47 | public static function deserialize(array $data) |
48 | 48 | { |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by PhpStorm. |
|
4 | - * User: nicolas |
|
5 | - * Date: 21/10/15 |
|
6 | - * Time: 15:15 |
|
7 | - */ |
|
3 | + * Created by PhpStorm. |
|
4 | + * User: nicolas |
|
5 | + * Date: 21/10/15 |
|
6 | + * Time: 15:15 |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace CultuurNet\UDB3\Event\Events; |
10 | 10 |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
128 | - * @param $dateString |
|
128 | + * @param string $dateString |
|
129 | 129 | * @return \DateTime |
130 | 130 | */ |
131 | 131 | private function dateFromUdb2DateString($dateString) |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | |
352 | 352 | /** |
353 | 353 | * @param string $eventId |
354 | - * @param Log[]|Log $logs |
|
354 | + * @param Log $logs |
|
355 | 355 | */ |
356 | 356 | protected function writeHistory($eventId, $logs) |
357 | 357 | { |
@@ -215,7 +215,7 @@ |
||
215 | 215 | $labels = $labelsMerged->getLabels()->toStrings(); |
216 | 216 | // Quote labels. |
217 | 217 | $quotedLabels = array_map( |
218 | - function ($label) { |
|
218 | + function($label) { |
|
219 | 219 | return "'{$label}'"; |
220 | 220 | }, |
221 | 221 | $labels |
@@ -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 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | /** |
16 | 16 | * Gets the JSON-LD structure of an Organizer. |
17 | 17 | * |
18 | - * @param string $organizerId |
|
18 | + * @param string $oganizerId |
|
19 | 19 | * Id of the Organizer. |
20 | 20 | * |
21 | 21 | * @return \stdClass |
@@ -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 |
@@ -11,7 +11,6 @@ |
||
11 | 11 | use CultuurNet\UDB3\Event\ReadModel\Permission\PermissionQueryInterface; |
12 | 12 | use Doctrine\DBAL\Connection; |
13 | 13 | use Doctrine\DBAL\Exception\UniqueConstraintViolationException; |
14 | -use Doctrine\DBAL\Schema\Schema; |
|
15 | 14 | use CultuurNet\UDB3\Event\ReadModel\Permission\PermissionRepositoryInterface; |
16 | 15 | use ValueObjects\String\String; |
17 | 16 |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by PhpStorm. |
|
4 | - * User: jonas |
|
5 | - * Date: 27.10.15 |
|
6 | - * Time: 14:04 |
|
7 | - */ |
|
3 | + * Created by PhpStorm. |
|
4 | + * User: jonas |
|
5 | + * Date: 27.10.15 |
|
6 | + * Time: 14:04 |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace CultuurNet\UDB3\Event\ReadModel\Permission\Doctrine; |
10 | 10 |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
72 | - * @return null|\string[] |
|
72 | + * @return string[] |
|
73 | 73 | */ |
74 | 74 | public function getSelection() |
75 | 75 | { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
80 | - * @return null|\string[] |
|
80 | + * @return string[] |
|
81 | 81 | */ |
82 | 82 | public function getInclude() |
83 | 83 | { |
@@ -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 |