Completed
Pull Request — master (#137)
by Kristof
04:51
created
src/Offer/ReadModel/JSONLD/OfferLDProjector.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace CultuurNet\UDB3\Offer\ReadModel\JSONLD;
4 4
 
5 5
 use Broadway\Domain\DomainMessage;
6
-use CultuurNet\UDB3\Calendar;
7 6
 use CultuurNet\UDB3\CulturefeedSlugger;
8 7
 use CultuurNet\UDB3\EntityServiceInterface;
9 8
 use CultuurNet\UDB3\Event\ReadModel\DocumentRepositoryInterface;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         $offerLd = $document->getBody();
177 177
 
178 178
         $labels = isset($offerLd->labels) ? $offerLd->labels : [];
179
-        $label = (string) $labelAdded->getLabel();
179
+        $label = (string)$labelAdded->getLabel();
180 180
 
181 181
         $labels[] = $label;
182 182
         $offerLd->labels = array_unique($labels);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         if (is_array($offerLd->labels)) {
197 197
             $offerLd->labels = array_filter(
198 198
                 $offerLd->labels,
199
-                function ($label) use ($deleteLabel) {
199
+                function($label) use ($deleteLabel) {
200 200
                     return !$deleteLabel->getLabel()->equals(
201 201
                         new Label($label)
202 202
                     );
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
             return;
288 288
         }
289 289
 
290
-        $imageId = (string) $imageRemoved->getImage()->getMediaObjectId();
290
+        $imageId = (string)$imageRemoved->getImage()->getMediaObjectId();
291 291
 
292 292
         /**
293 293
          * Matches any object that is not the removed image.
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
          * @return bool
299 299
          *  Returns true when the media object does not match the image to remove.
300 300
          */
301
-        $shouldNotBeRemoved = function ($mediaObject) use ($imageId) {
301
+        $shouldNotBeRemoved = function($mediaObject) use ($imageId) {
302 302
             $containsId = !!strpos($mediaObject->{'@id'}, $imageId);
303 303
             return !$containsId;
304 304
         };
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
         $document = $this->loadDocumentFromRepository($mainImageSelected);
337 337
         $offerLd = $document->getBody();
338 338
         $imageId = $mainImageSelected->getImage()->getMediaObjectId();
339
-        $mediaObjectMatcher = function ($matchingMediaObject, $currentMediaObject) use ($imageId) {
339
+        $mediaObjectMatcher = function($matchingMediaObject, $currentMediaObject) use ($imageId) {
340 340
             if (!$matchingMediaObject && $this->mediaObjectMatchesId($currentMediaObject, $imageId)) {
341 341
                 $matchingMediaObject = $currentMediaObject;
342 342
             }
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
      */
362 362
     protected function mediaObjectMatchesId($mediaObject, UUID $mediaObjectId)
363 363
     {
364
-        return strpos($mediaObject->{'@id'}, (string) $mediaObjectId) > 0;
364
+        return strpos($mediaObject->{'@id'}, (string)$mediaObjectId) > 0;
365 365
     }
366 366
 
367 367
     /**
Please login to merge, or discard this patch.
src/Search/ResultsGenerator.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace CultuurNet\UDB3\Search;
4 4
 
5
-use CultuurNet\UDB3\Offer\OfferIdentifierInterface;
6 5
 use Psr\Log\LoggerAwareInterface;
7 6
 use Psr\Log\LoggerAwareTrait;
8 7
 use Psr\Log\NullLogger;
Please login to merge, or discard this patch.
src/Offer/Commands/AddLabelToQueryJSONDeserializer.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Search/Cache/CacheHandlerInterface.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @file
4
- */
3
+     * @file
4
+     */
5 5
 
6 6
 namespace CultuurNet\UDB3\Variations;
7 7
 
Please login to merge, or discard this patch.
src/Event/Event.php 2 patches
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,6 +80,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Event/EventCommandHandler.php 1 patch
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.