Completed
Pull Request — master (#137)
by Kristof
04:51
created
src/Media/Events/MediaObjectCreated.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
             'mime_type' => $this->getMimeType()->toNative(),
108 108
             'description' => $this->getDescription()->toNative(),
109 109
             'copyright_holder' => $this->getCopyrightHolder()->toNative(),
110
-            'source_location' => (string) $this->getSourceLocation()
110
+            'source_location' => (string)$this->getSourceLocation()
111 111
         );
112 112
     }
113 113
 
Please login to merge, or discard this patch.
src/LocalEntityService.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -78,6 +78,9 @@
 block discarded – undo
78 78
         return $document->getRawBody();
79 79
     }
80 80
 
81
+    /**
82
+     * @param string $id
83
+     */
81 84
     public function iri($id)
82 85
     {
83 86
         return $this->iriGenerator->iri($id);
Please login to merge, or discard this patch.
src/Offer/ReadModel/History/OfferHistoryProjector.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
src/Offer/Events/AbstractLabelEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public function serialize()
33 33
     {
34 34
         return parent::serialize() + array(
35
-            'label' => (string) $this->label,
35
+            'label' => (string)$this->label,
36 36
         );
37 37
     }
38 38
 
Please login to merge, or discard this patch.
src/Event/ReadModel/JSONLD/EventLDProjector.php 4 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
     /**
370 370
      * Return the media of an event if it already exists.
371 371
      *
372
-     * @param $eventId
372
+     * @param string $eventId
373 373
      *  The id of the event.
374 374
      *
375 375
      * @return array
@@ -867,6 +867,9 @@  discard block
 block discarded – undo
867 867
         return $document;
868 868
     }
869 869
 
870
+    /**
871
+     * @param string $eventId
872
+     */
870 873
     private function generateSameAs($eventId, $name)
871 874
     {
872 875
         $eventSlug = $this->slugger->slug($name);
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 
478 478
         $jsonLD->name->nl = $majorInfoUpdated->getTitle();
479 479
         $jsonLD->location = array(
480
-          '@type' => 'Place',
480
+            '@type' => 'Place',
481 481
         ) + (array)$this->placeJSONLD($majorInfoUpdated->getLocation()->getCdbid());
482 482
 
483 483
         $calendarJsonLD = $majorInfoUpdated->getCalendar()->toJsonLd();
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
         $eventLd = $document->getBody();
684 684
 
685 685
         $eventLd->organizer = array(
686
-          '@type' => 'Organizer',
686
+            '@type' => 'Organizer',
687 687
         ) + (array)$this->organizerJSONLD($organizerUpdated->getOrganizerId());
688 688
 
689 689
         $this->repository->save($document->withBody($eventLd));
Please login to merge, or discard this patch.
Unused Use Statements   -8 removed lines patch added patch discarded remove patch
@@ -6,13 +6,10 @@  discard block
 block discarded – undo
6 6
 use Broadway\Domain\DomainMessage;
7 7
 use Broadway\Domain\Metadata;
8 8
 use Broadway\EventHandling\EventListenerInterface;
9
-use CultuurNet\UDB3\Calendar;
10
-use CultuurNet\UDB3\CalendarInterface;
11 9
 use CultuurNet\UDB3\Cdb\EventItemFactory;
12 10
 use CultuurNet\UDB3\CulturefeedSlugger;
13 11
 use CultuurNet\UDB3\EntityNotFoundException;
14 12
 use CultuurNet\UDB3\Event\DescriptionTranslated;
15
-use CultuurNet\UDB3\Event\EventEvent;
16 13
 use CultuurNet\UDB3\Event\Events\BookingInfoUpdated;
17 14
 use CultuurNet\UDB3\Event\Events\ContactPointUpdated;
18 15
 use CultuurNet\UDB3\Event\Events\DescriptionUpdated;
@@ -41,21 +38,16 @@  discard block
 block discarded – undo
41 38
 use CultuurNet\UDB3\Event\ReadModel\JSONLD\OrganizerServiceInterface;
42 39
 use CultuurNet\UDB3\Event\ReadModel\JSONLD\PlaceServiceInterface;
43 40
 use CultuurNet\UDB3\Event\TitleTranslated;
44
-use CultuurNet\UDB3\EventHandling\DelegateEventHandlingToSpecificMethodTrait;
45 41
 use CultuurNet\UDB3\EventServiceInterface;
46 42
 use CultuurNet\UDB3\Iri\IriGeneratorInterface;
47
-use CultuurNet\UDB3\Label;
48 43
 use CultuurNet\UDB3\LabelCollection;
49 44
 use CultuurNet\UDB3\Offer\ReadModel\JSONLD\CdbXMLItemBaseImporter;
50 45
 use CultuurNet\UDB3\Offer\ReadModel\JSONLD\OfferLDProjector;
51
-use CultuurNet\UDB3\Media\Serialization\MediaObjectSerializer;
52 46
 use CultuurNet\UDB3\Offer\ReadModel\JSONLD\OfferUpdate;
53 47
 use CultuurNet\UDB3\Organizer\OrganizerProjectedToJSONLD;
54 48
 use CultuurNet\UDB3\OrganizerService;
55 49
 use CultuurNet\UDB3\Place\PlaceProjectedToJSONLD;
56 50
 use CultuurNet\UDB3\PlaceService;
57
-use CultuurNet\UDB3\ReadModel\JsonDocument;
58
-use CultuurNet\UDB3\SluggerInterface;
59 51
 use CultuurNet\UDB3\StringFilter\StringFilterInterface;
60 52
 use CultuurNet\UDB3\Theme;
61 53
 use Symfony\Component\Serializer\SerializerInterface;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
     ) {
269 269
         $this->saveNewDocument(
270 270
             $eventId,
271
-            function (\stdClass $eventLd) use ($eventId, $cdbXmlNamespaceUri, $cdbXml, $domainMessage) {
271
+            function(\stdClass $eventLd) use ($eventId, $cdbXmlNamespaceUri, $cdbXml, $domainMessage) {
272 272
                 $eventLd = $this->projectEventCdbXmlToObject(
273 273
                     $eventLd,
274 274
                     $eventId,
@@ -325,13 +325,13 @@  discard block
 block discarded – undo
325 325
     ) {
326 326
         $this->saveNewDocument(
327 327
             $eventId,
328
-            function (\stdClass $eventLd) use ($cdbXmlNamespaceUri, $eventId, $cdbXml) {
328
+            function(\stdClass $eventLd) use ($cdbXmlNamespaceUri, $eventId, $cdbXml) {
329 329
                 return $this->projectEventCdbXmlToObject(
330 330
                     $eventLd,
331 331
                     $eventId,
332 332
                     $cdbXmlNamespaceUri,
333 333
                     $cdbXml
334
-                ) ;
334
+                );
335 335
             }
336 336
         );
337 337
     }
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
     ) {
408 408
         $this->saveNewDocument(
409 409
             $eventCreated->getEventId(),
410
-            function (\stdClass $jsonLD) use ($eventCreated, $domainMessage) {
410
+            function(\stdClass $jsonLD) use ($eventCreated, $domainMessage) {
411 411
                 $jsonLD->{'@id'} = $this->iriGenerator->iri(
412 412
                     $eventCreated->getEventId()
413 413
                 );
@@ -481,8 +481,8 @@  discard block
 block discarded – undo
481 481
         ) + (array)$this->placeJSONLD($majorInfoUpdated->getLocation()->getCdbid());
482 482
 
483 483
         // Remove old theme and event type.
484
-        $jsonLD->terms = array_filter($jsonLD->terms, function ($term) {
485
-            return $term->domain !== EventType::DOMAIN &&  $term->domain !== Theme::DOMAIN;
484
+        $jsonLD->terms = array_filter($jsonLD->terms, function($term) {
485
+            return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN;
486 486
         });
487 487
 
488 488
         $eventType = $majorInfoUpdated->getEventType();
Please login to merge, or discard this patch.
src/Place/DefaultPlaceEditingService.php 1 patch
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -2,15 +2,11 @@
 block discarded – undo
2 2
 
3 3
 namespace CultuurNet\UDB3\Place;
4 4
 
5
-use Broadway\Repository\AggregateNotFoundException;
6 5
 use CultuurNet\UDB3\Address;
7 6
 use CultuurNet\UDB3\CalendarInterface;
8 7
 use CultuurNet\UDB3\Event\EventType;
9
-use CultuurNet\UDB3\Label;
10 8
 use CultuurNet\UDB3\Offer\DefaultOfferEditingService;
11 9
 use CultuurNet\UDB3\OfferEditingInterface;
12
-use CultuurNet\UDB3\Place\Commands\AddLabel;
13
-use CultuurNet\UDB3\Place\Commands\DeleteLabel;
14 10
 use CultuurNet\UDB3\Place\Commands\DeletePlace;
15 11
 use CultuurNet\UDB3\Place\Commands\UpdateFacilities;
16 12
 use CultuurNet\UDB3\Place\Commands\UpdateMajorInfo;
Please login to merge, or discard this patch.
src/Offer/SecurityInterface.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/Offer/ReadModel/Permission/Doctrine/DBALRepository.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Offer/ReadModel/Permission/Doctrine/SchemaConfigurator.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.