@@ -9,7 +9,6 @@ |
||
9 | 9 | use CultuurNet\UDB3\Variations\Model\Properties\Description; |
10 | 10 | use CultuurNet\UDB3\Variations\Model\Properties\Id; |
11 | 11 | use JsonSchema\Validator; |
12 | -use ValueObjects\String\String; |
|
13 | 12 | use stdClass; |
14 | 13 | |
15 | 14 | class EditDescriptionJSONDeserializer extends JSONDeserializer |
@@ -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 |
@@ -80,6 +80,7 @@ discard block |
||
80 | 80 | * @param Location $location |
81 | 81 | * @param CalendarInterface $calendar |
82 | 82 | * @param Theme/null $theme |
83 | + * @param string $eventId |
|
83 | 84 | * |
84 | 85 | * @return Event |
85 | 86 | */ |
@@ -368,9 +369,6 @@ discard block |
||
368 | 369 | /** |
369 | 370 | * Updated the contact info. |
370 | 371 | * |
371 | - * @param array $phones |
|
372 | - * @param array $emails |
|
373 | - * @param array $urls |
|
374 | 372 | */ |
375 | 373 | public function updateContactPoint(ContactPoint $contactPoint) |
376 | 374 | { |
@@ -2,7 +2,6 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace CultuurNet\UDB3\Event; |
4 | 4 | |
5 | -use Broadway\EventSourcing\EventSourcedAggregateRoot; |
|
6 | 5 | use CultuurNet\UDB3\BookingInfo; |
7 | 6 | use CultuurNet\UDB3\CalendarInterface; |
8 | 7 | use CultuurNet\UDB3\Cdb\EventItemFactory; |
@@ -44,7 +43,6 @@ discard block |
||
44 | 43 | use CultuurNet\UDB3\Offer\Commands\Image\AbstractUpdateImage; |
45 | 44 | use CultuurNet\UDB3\Offer\Offer; |
46 | 45 | use CultuurNet\UDB3\Media\Image; |
47 | -use CultuurNet\UDB3\Offer\Events\Image\AbstractMainImageSelected; |
|
48 | 46 | use CultuurNet\UDB3\Title; |
49 | 47 | use CultuurNet\UDB3\Translation; |
50 | 48 | use ValueObjects\Identity\UUID; |
@@ -4,7 +4,6 @@ discard block |
||
4 | 4 | namespace CultuurNet\UDB3\Event; |
5 | 5 | |
6 | 6 | use Broadway\Repository\RepositoryInterface; |
7 | -use CultuurNet\UDB3\CommandHandling\Udb3CommandHandler; |
|
8 | 7 | use CultuurNet\UDB3\Event\Commands\AddImage; |
9 | 8 | use CultuurNet\UDB3\Event\Commands\AddLabel; |
10 | 9 | use CultuurNet\UDB3\Event\Commands\DeleteEvent; |
@@ -12,8 +11,6 @@ discard block |
||
12 | 11 | use CultuurNet\UDB3\Event\Commands\RemoveImage; |
13 | 12 | use CultuurNet\UDB3\Event\Commands\DeleteOrganizer; |
14 | 13 | use CultuurNet\UDB3\Event\Commands\DeleteTypicalAgeRange; |
15 | -use CultuurNet\UDB3\Event\Commands\LabelEvents; |
|
16 | -use CultuurNet\UDB3\Event\Commands\LabelQuery; |
|
17 | 14 | use CultuurNet\UDB3\Event\Commands\SelectMainImage; |
18 | 15 | use CultuurNet\UDB3\Event\Commands\TranslateDescription; |
19 | 16 | use CultuurNet\UDB3\Event\Commands\TranslateTitle; |
@@ -24,8 +21,6 @@ discard block |
||
24 | 21 | use CultuurNet\UDB3\Event\Commands\UpdateMajorInfo; |
25 | 22 | use CultuurNet\UDB3\Event\Commands\UpdateOrganizer; |
26 | 23 | use CultuurNet\UDB3\Event\Commands\UpdateTypicalAgeRange; |
27 | -use CultuurNet\UDB3\Event\Events\MainImageSelected; |
|
28 | -use CultuurNet\UDB3\Label as Label; |
|
29 | 24 | use CultuurNet\UDB3\Offer\OfferCommandHandler; |
30 | 25 | use CultuurNet\UDB3\Search\SearchServiceInterface; |
31 | 26 | use Psr\Log\LoggerAwareInterface; |
@@ -95,11 +95,11 @@ discard block |
||
95 | 95 | ); |
96 | 96 | |
97 | 97 | return [ |
98 | - 'type' => $this->getType(), |
|
99 | - 'startDate' => $this->startDate, |
|
100 | - 'endDate' => $this->endDate, |
|
101 | - 'timestamps' => $serializedTimestamps, |
|
102 | - 'openingHours' => $this->openingHours, |
|
98 | + 'type' => $this->getType(), |
|
99 | + 'startDate' => $this->startDate, |
|
100 | + 'endDate' => $this->endDate, |
|
101 | + 'timestamps' => $serializedTimestamps, |
|
102 | + 'openingHours' => $this->openingHours, |
|
103 | 103 | ]; |
104 | 104 | } |
105 | 105 | |
@@ -181,9 +181,9 @@ discard block |
||
181 | 181 | $jsonLd['subEvent'] = array(); |
182 | 182 | foreach ($timestamps as $timestamp) { |
183 | 183 | $jsonLd['subEvent'][] = array( |
184 | - '@type' => 'Event', |
|
185 | - 'startDate' => $timestamp->getStartDate(), |
|
186 | - 'endDate' => $timestamp->getEndDate(), |
|
184 | + '@type' => 'Event', |
|
185 | + 'startDate' => $timestamp->getStartDate(), |
|
186 | + 'endDate' => $timestamp->getEndDate(), |
|
187 | 187 | ); |
188 | 188 | } |
189 | 189 | } |
@@ -86,7 +86,7 @@ |
||
86 | 86 | public function serialize() |
87 | 87 | { |
88 | 88 | $serializedTimestamps = array_map( |
89 | - function (Timestamp $timestamp) { |
|
89 | + function(Timestamp $timestamp) { |
|
90 | 90 | return $timestamp->serialize(); |
91 | 91 | }, |
92 | 92 | $this->timestamps |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | /** |
26 | 26 | * @param $id |
27 | - * @return EventEvent |
|
27 | + * @return EventProjectedToJSONLD |
|
28 | 28 | */ |
29 | 29 | public function createEvent($id) |
30 | 30 | { |
@@ -70,7 +70,7 @@ |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
73 | - * @param mixed $json |
|
73 | + * @param stdClass $json |
|
74 | 74 | * |
75 | 75 | * @throws ValidationException |
76 | 76 | */ |
@@ -3,15 +3,12 @@ |
||
3 | 3 | namespace CultuurNet\UDB3\Variations\Command; |
4 | 4 | |
5 | 5 | use CultuurNet\Deserializer\JSONDeserializer; |
6 | -use CultuurNet\UDB3\Offer\IriOfferIdentifierFactory; |
|
7 | -use CultuurNet\UDB3\Offer\IriOfferIdentifierFactoryInterface; |
|
8 | 6 | use CultuurNet\UDB3\Variations\Model\Properties\Description; |
9 | 7 | use CultuurNet\UDB3\Variations\Model\Properties\OwnerId; |
10 | 8 | use CultuurNet\UDB3\Variations\Model\Properties\Purpose; |
11 | 9 | use CultuurNet\UDB3\Variations\Model\Properties\Url; |
12 | 10 | use CultuurNet\UDB3\Variations\Model\Properties\UrlValidator; |
13 | 11 | use JsonSchema\Validator; |
14 | -use ValueObjects\String\String; |
|
15 | 12 | use stdClass; |
16 | 13 | |
17 | 14 | class CreateOfferVariationJSONDeserializer extends JSONDeserializer |
@@ -96,7 +96,7 @@ |
||
96 | 96 | private function getErrorMessages($validationErrors) |
97 | 97 | { |
98 | 98 | $errorMessages = array_map( |
99 | - function ($error) { |
|
99 | + function($error) { |
|
100 | 100 | return $error['message']; |
101 | 101 | }, |
102 | 102 | $validationErrors |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | public function editDescription(Id $id, Description $description) |
70 | 70 | { |
71 | 71 | /** @var EventVariation $variation */ |
72 | - $variation = $this->eventVariationRepository->load((string) $id); |
|
72 | + $variation = $this->eventVariationRepository->load((string)$id); |
|
73 | 73 | |
74 | 74 | $variation->editDescription($description); |
75 | 75 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | public function deleteEventVariation(Id $id) |
83 | 83 | { |
84 | 84 | /** @var EventVariation $variation */ |
85 | - $variation = $this->eventVariationRepository->load((string) $id); |
|
85 | + $variation = $this->eventVariationRepository->load((string)$id); |
|
86 | 86 | |
87 | 87 | $variation->markDeleted(); |
88 | 88 |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | private function guardNotDeleted() |
123 | 123 | { |
124 | 124 | if ($this->isDeleted()) { |
125 | - throw new AggregateDeletedException((string) $this->id); |
|
125 | + throw new AggregateDeletedException((string)$this->id); |
|
126 | 126 | } |
127 | 127 | } |
128 | 128 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | */ |
149 | 149 | public function getAggregateRootId() |
150 | 150 | { |
151 | - return (string) $this->id; |
|
151 | + return (string)$this->id; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | /** |