Completed
Pull Request — master (#252)
by Kristof
09:20 queued 04:17
created
src/EventExport/Notification/DefaultHTMLBodyFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
         EventExportResult $eventExportResult
14 14
     ) {
15 15
         $url = $eventExportResult->getUrl();
16
-        return '<p>Beste, <br /><br />Hierbij vind je de link naar de door jou geëxporteerde documenten uit UiTdatabank: <a href="' . $url . '">' . $url . '</a><br /><br />
16
+        return '<p>Beste, <br /><br />Hierbij vind je de link naar de door jou geëxporteerde documenten uit UiTdatabank: <a href="'.$url.'">'.$url.'</a><br /><br />
17 17
         Mocht je vragen hebben, of meer informatie wensen over onze diensten, kan je terecht bij [email protected].<br /><br />
18 18
         Met vriendelijke groeten,<br />Het UiTdatabank team</p>';
19 19
     }
Please login to merge, or discard this patch.
src/EventExport/Notification/DefaultPlainTextBodyFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
         return 'Beste,
16 16
 
17
-        Hierbij vind je de link naar de door jou geëxporteerde documenten uit UiTdatabank: ' . $eventExportResult->getUrl() . '
17
+        Hierbij vind je de link naar de door jou geëxporteerde documenten uit UiTdatabank: ' . $eventExportResult->getUrl().'
18 18
 
19 19
         Mocht je vragen hebben, of meer informatie wensen over onze diensten, kan je terecht bij [email protected].
20 20
 
Please login to merge, or discard this patch.
src/Offer/ReadModel/JSONLD/OfferLDProjector.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -624,7 +624,7 @@
 block discarded – undo
624 624
     }
625 625
 
626 626
     /**
627
-     * @return callable
627
+     * @return \Closure
628 628
      */
629 629
     private function reject()
630 630
     {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
             if (preg_match('/^apply(.+)$/', $method, $matches)) {
144 144
                 $event = $matches[1];
145
-                $classNameMethod = 'get' . $event . 'ClassName';
145
+                $classNameMethod = 'get'.$event.'ClassName';
146 146
 
147 147
                 if (method_exists($this, $classNameMethod)) {
148 148
                     $eventFullClassName = call_user_func(array($this, $classNameMethod));
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         $labelsProperty = $labelAdded->getLabel()->isVisible() ? 'labels' : 'hiddenLabels';
273 273
 
274 274
         $labels = isset($offerLd->{$labelsProperty}) ? $offerLd->{$labelsProperty} : [];
275
-        $label = (string) $labelAdded->getLabel();
275
+        $label = (string)$labelAdded->getLabel();
276 276
 
277 277
         $labels[] = $label;
278 278
         $offerLd->{$labelsProperty} = array_unique($labels);
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
             if (isset($offerLd->{$labelsProperty}) && is_array($offerLd->{$labelsProperty})) {
298 298
                 $offerLd->{$labelsProperty} = array_filter(
299 299
                     $offerLd->{$labelsProperty},
300
-                    function ($label) use ($labelRemoved) {
300
+                    function($label) use ($labelRemoved) {
301 301
                         return !$labelRemoved->getLabel()->equals(
302 302
                             new Label($label)
303 303
                         );
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
             return;
395 395
         }
396 396
 
397
-        $imageId = (string) $imageRemoved->getImage()->getMediaObjectId();
397
+        $imageId = (string)$imageRemoved->getImage()->getMediaObjectId();
398 398
 
399 399
         /**
400 400
          * Matches any object that is not the removed image.
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
          * @return bool
406 406
          *  Returns true when the media object does not match the image to remove.
407 407
          */
408
-        $shouldNotBeRemoved = function ($mediaObject) use ($imageId) {
408
+        $shouldNotBeRemoved = function($mediaObject) use ($imageId) {
409 409
             $containsId = !!strpos($mediaObject->{'@id'}, $imageId);
410 410
             return !$containsId;
411 411
         };
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
         $document = $this->loadDocumentFromRepository($mainImageSelected);
444 444
         $offerLd = $document->getBody();
445 445
         $imageId = $mainImageSelected->getImage()->getMediaObjectId();
446
-        $mediaObjectMatcher = function ($matchingMediaObject, $currentMediaObject) use ($imageId) {
446
+        $mediaObjectMatcher = function($matchingMediaObject, $currentMediaObject) use ($imageId) {
447 447
             if (!$matchingMediaObject && $this->mediaObjectMatchesId($currentMediaObject, $imageId)) {
448 448
                 $matchingMediaObject = $currentMediaObject;
449 449
             }
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
      */
469 469
     protected function mediaObjectMatchesId($mediaObject, UUID $mediaObjectId)
470 470
     {
471
-        return strpos($mediaObject->{'@id'}, (string) $mediaObjectId) > 0;
471
+        return strpos($mediaObject->{'@id'}, (string)$mediaObjectId) > 0;
472 472
     }
473 473
 
474 474
     /**
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
      */
650 650
     protected function applyPublished(AbstractPublished $published)
651 651
     {
652
-        $this->applyEventTransformation($published, function ($offerLd) use ($published) {
652
+        $this->applyEventTransformation($published, function($offerLd) use ($published) {
653 653
             $offerLd->workflowStatus = WorkflowStatus::READY_FOR_VALIDATION()->getName();
654 654
 
655 655
             $publicationDate = $published->getPublicationDate();
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
      */
663 663
     protected function applyApproved(AbstractApproved $approved)
664 664
     {
665
-        $this->applyEventTransformation($approved, function ($offerLd) {
665
+        $this->applyEventTransformation($approved, function($offerLd) {
666 666
             $offerLd->workflowStatus = WorkflowStatus::APPROVED()->getName();
667 667
         });
668 668
     }
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
      */
699 699
     private function reject()
700 700
     {
701
-        return function ($offerLd) {
701
+        return function($offerLd) {
702 702
             $offerLd->workflowStatus = WorkflowStatus::REJECTED()->getName();
703 703
         };
704 704
     }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use CultuurNet\UDB3\EntityServiceInterface;
13 13
 use CultuurNet\UDB3\Event\ReadModel\DocumentRepositoryInterface;
14 14
 use CultuurNet\UDB3\Event\ReadModel\JSONLD\CdbXMLImporter;
15
-use CultuurNet\UDB3\Event\ReadModel\JSONLD\CdbXMLLongDescriptionFilter;
16 15
 use CultuurNet\UDB3\Event\ReadModel\JSONLD\OrganizerServiceInterface;
17 16
 use CultuurNet\UDB3\EventHandling\DelegateEventHandlingToSpecificMethodTrait;
18 17
 use CultuurNet\UDB3\Iri\IriGeneratorInterface;
Please login to merge, or discard this patch.
src/Offer/Offer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
     {
258 258
         $equalImages = array_filter(
259 259
             $this->mediaObjects,
260
-            function ($existingMediaObjectId) use ($image) {
260
+            function($existingMediaObjectId) use ($image) {
261 261
                 return $image
262 262
                     ->getMediaObjectId()
263 263
                     ->sameValueAs($existingMediaObjectId);
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
             if ($this->rejectedReason && $reason->sameValueAs($this->rejectedReason)) {
382 382
                 return true; // nothing left to do if the offer has already been rejected for the same reason
383 383
             } else {
384
-                throw new Exception('The offer has already been rejected for another reason: ' . $this->rejectedReason);
384
+                throw new Exception('The offer has already been rejected for another reason: '.$this->rejectedReason);
385 385
             }
386 386
         }
387 387
 
Please login to merge, or discard this patch.
src/Security/CommandAuthorizationException.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@
 block discarded – undo
26 26
         StringLiteral $userId,
27 27
         AuthorizableCommandInterface $command
28 28
     ) {
29
-        parent::__construct('User with id: ' . $userId->toNative() .
30
-            ' has no permission: "' . $command->getPermission()->toNative() .
31
-            '" on item: ' . $command->getItemId() .
32
-            ' when executing command: ' . get_class($command));
29
+        parent::__construct('User with id: '.$userId->toNative().
30
+            ' has no permission: "'.$command->getPermission()->toNative().
31
+            '" on item: '.$command->getItemId().
32
+            ' when executing command: '.get_class($command));
33 33
 
34 34
         $this->userId = $userId;
35 35
         $this->command = $command;
Please login to merge, or discard this patch.
src/Location/Location.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,9 +66,9 @@
 block discarded – undo
66 66
     public function serialize()
67 67
     {
68 68
         return [
69
-          'cdbid' => $this->cdbid,
70
-          'name' => $this->name->toNative(),
71
-          'address' => $this->address->serialize()
69
+            'cdbid' => $this->cdbid,
70
+            'name' => $this->name->toNative(),
71
+            'address' => $this->address->serialize()
72 72
         ];
73 73
     }
74 74
 
Please login to merge, or discard this patch.
src/Event/EventEditingServiceInterface.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -20,6 +20,7 @@  discard block
 block discarded – undo
20 20
      *
21 21
      * @param string $id
22 22
      * @param string $description
23
+     * @return string
23 24
      */
24 25
     public function updateDescription($id, $description);
25 26
 
@@ -28,6 +29,7 @@  discard block
 block discarded – undo
28 29
      *
29 30
      * @param string $id
30 31
      * @param string $ageRange
32
+     * @return string
31 33
      */
32 34
     public function updateTypicalAgeRange($id, $ageRange);
33 35
 
@@ -35,6 +37,7 @@  discard block
 block discarded – undo
35 37
      * Delete the typical age range of a place.
36 38
      *
37 39
      * @param string $id
40
+     * @return string
38 41
      */
39 42
     public function deleteTypicalAgeRange($id);
40 43
 
@@ -43,6 +46,7 @@  discard block
 block discarded – undo
43 46
      *
44 47
      * @param string $id
45 48
      * @param string $organizerId
49
+     * @return string
46 50
      */
47 51
     public function updateOrganizer($id, $organizerId);
48 52
 
@@ -51,6 +55,7 @@  discard block
 block discarded – undo
51 55
      *
52 56
      * @param string $id
53 57
      * @param string $organizerId
58
+     * @return string
54 59
      */
55 60
     public function deleteOrganizer($id, $organizerId);
56 61
 
@@ -59,6 +64,7 @@  discard block
 block discarded – undo
59 64
      *
60 65
      * @param string $id
61 66
      * @param ContactPoint $contactPoint
67
+     * @return string
62 68
      */
63 69
     public function updateContactPoint($id, ContactPoint $contactPoint);
64 70
 
@@ -67,6 +73,7 @@  discard block
 block discarded – undo
67 73
      *
68 74
      * @param string $id
69 75
      * @param Image $image
76
+     * @return string
70 77
      */
71 78
     public function addImage($id, Image $image);
72 79
 
@@ -93,6 +100,7 @@  discard block
 block discarded – undo
93 100
      *
94 101
      * @param string $id
95 102
      * @param Image $image
103
+     * @return string
96 104
      */
97 105
     public function removeImage($id, Image $image);
98 106
 
Please login to merge, or discard this patch.
src/Organizer/Events/OrganizerCreatedWithUniqueWebsite.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,8 +148,8 @@
 block discarded – undo
148 148
         }
149 149
 
150 150
         return parent::serialize() + array(
151
-            'website' => (string) $this->getWebsite(),
152
-            'title' => (string) $this->getTitle(),
151
+            'website' => (string)$this->getWebsite(),
152
+            'title' => (string)$this->getTitle(),
153 153
             'addresses' => $addresses,
154 154
             'phones' => $this->getPhones(),
155 155
             'emails' => $this->getEmails(),
Please login to merge, or discard this patch.
src/Address/Address.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,10 +81,10 @@
 block discarded – undo
81 81
     public function serialize()
82 82
     {
83 83
         return [
84
-          'streetAddress' => $this->streetAddress->toNative(),
85
-          'postalCode' => $this->postalCode->toNative(),
86
-          'addressLocality' => $this->locality->toNative(),
87
-          'addressCountry' => $this->countryCode,
84
+            'streetAddress' => $this->streetAddress->toNative(),
85
+            'postalCode' => $this->postalCode->toNative(),
86
+            'addressLocality' => $this->locality->toNative(),
87
+            'addressCountry' => $this->countryCode,
88 88
         ];
89 89
     }
90 90
 
Please login to merge, or discard this patch.