Completed
Pull Request — master (#142)
by Kristof
04:52
created
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.
src/Calendar.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Event/ReadModel/JSONLD/EventFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
     /**
26 26
      * @param $id
27
-     * @return EventEvent
27
+     * @return EventProjectedToJSONLD
28 28
      */
29 29
     public function createEvent($id)
30 30
     {
Please login to merge, or discard this patch.
src/Variations/Command/CreateOfferVariationJSONDeserializer.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
     }
71 71
 
72 72
     /**
73
-     * @param mixed $json
73
+     * @param stdClass $json
74 74
      *
75 75
      * @throws ValidationException
76 76
      */
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -3,15 +3,12 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Variations/DefaultOfferVariationService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Variations/Model/OfferVariation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.