Completed
Pull Request — master (#255)
by Kristof
03:34
created
src/Media/Commands/UploadImage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
      */
118 118
     public function getItemId()
119 119
     {
120
-        return (string) $this->getFileId();
120
+        return (string)$this->getFileId();
121 121
     }
122 122
 
123 123
     /**
Please login to merge, or discard this patch.
src/Role/Commands/AbstractCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     public function getItemId()
37 37
     {
38
-        return (string) $this->getUuid();
38
+        return (string)$this->getUuid();
39 39
     }
40 40
 
41 41
     /**
Please login to merge, or discard this patch.
src/Event/EventThemeResolver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
 
591 591
         $this->themes = array_reduce(
592 592
             $themePerType,
593
-            function ($themes, array $type) {
593
+            function($themes, array $type) {
594 594
                 if (array_key_exists('themes', $type)) {
595 595
                     foreach ($type['themes'] as $themeData) {
596 596
                         $themes[$themeData['id']] = new Theme($themeData['id'], $themeData['label']);
@@ -608,9 +608,9 @@  discard block
 block discarded – undo
608 608
      */
609 609
     public function byId(StringLiteral $themeId)
610 610
     {
611
-        if (!array_key_exists((string) $themeId, $this->themes)) {
612
-            throw new \Exception("Unknown event theme id: " . $themeId);
611
+        if (!array_key_exists((string)$themeId, $this->themes)) {
612
+            throw new \Exception("Unknown event theme id: ".$themeId);
613 613
         }
614
-        return $this->themes[(string) $themeId];
614
+        return $this->themes[(string)$themeId];
615 615
     }
616 616
 }
Please login to merge, or discard this patch.
src/Event/EventTypeResolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@
 block discarded – undo
43 43
      */
44 44
     public function byId(StringLiteral $typeId)
45 45
     {
46
-        if (!array_key_exists((string) $typeId, $this->types)) {
47
-            throw new \Exception("Unknown event type id: " . $typeId);
46
+        if (!array_key_exists((string)$typeId, $this->types)) {
47
+            throw new \Exception("Unknown event type id: ".$typeId);
48 48
         }
49
-        return $this->types[(string) $typeId];
49
+        return $this->types[(string)$typeId];
50 50
     }
51 51
 }
Please login to merge, or discard this patch.
src/Place/PlaceTypeResolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@
 block discarded – undo
41 41
      */
42 42
     public function byId(StringLiteral $typeId)
43 43
     {
44
-        if (!array_key_exists((string) $typeId, $this->types)) {
45
-            throw new \Exception("Unknown place type id: " . $typeId);
44
+        if (!array_key_exists((string)$typeId, $this->types)) {
45
+            throw new \Exception("Unknown place type id: ".$typeId);
46 46
         }
47
-        return $this->types[(string) $typeId];
47
+        return $this->types[(string)$typeId];
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
src/Place/PlaceThemeResolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@
 block discarded – undo
23 23
      */
24 24
     public function byId(StringLiteral $themeId)
25 25
     {
26
-        if (!array_key_exists((string) $themeId, $this->themes)) {
27
-            throw new \Exception("Unknown place theme id: " . $themeId);
26
+        if (!array_key_exists((string)$themeId, $this->themes)) {
27
+            throw new \Exception("Unknown place theme id: ".$themeId);
28 28
         }
29
-        return $this->themes[(string) $themeId];
29
+        return $this->themes[(string)$themeId];
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
src/Event/ReadModel/JSONLD/EventLDProjector.php 3 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
 
541 541
     /**
542 542
      * @param EventDeleted $eventDeleted
543
-     * @return null
543
+     * @return JsonDocument
544 544
      */
545 545
     protected function applyEventDeleted(EventDeleted $eventDeleted)
546 546
     {
@@ -651,6 +651,9 @@  discard block
 block discarded – undo
651 651
         }
652 652
     }
653 653
 
654
+    /**
655
+     * @param string $eventId
656
+     */
654 657
     private function generateSameAs($eventId, $name)
655 658
     {
656 659
         $eventSlug = $this->slugger->slug($name);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -522,8 +522,8 @@  discard block
 block discarded – undo
522 522
         $eventJsonLD->{'@id'} = $this->iriGenerator->iri($eventCopied->getItemId());
523 523
 
524 524
         // Set the new calendar.
525
-        $eventJsonLD = (object) array_merge(
526
-            (array) $eventJsonLD,
525
+        $eventJsonLD = (object)array_merge(
526
+            (array)$eventJsonLD,
527 527
             $eventCopied->getCalendar()->toJsonLd()
528 528
         );
529 529
 
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 
537 537
         // Set available to and from.
538 538
         $availableTo = AvailableTo::createFromCalendar($eventCopied->getCalendar());
539
-        $eventJsonLD->availableTo = (string) $availableTo;
539
+        $eventJsonLD->availableTo = (string)$availableTo;
540 540
         unset($eventJsonLD->availableFrom);
541 541
 
542 542
         $newDocument = new JsonDocument($eventCopied->getItemId());
@@ -581,8 +581,8 @@  discard block
 block discarded – undo
581 581
         $jsonLD->availableTo = (string)$availableTo;
582 582
 
583 583
         // Remove old theme and event type.
584
-        $jsonLD->terms = array_filter($jsonLD->terms, function ($term) {
585
-            return $term->domain !== EventType::DOMAIN &&  $term->domain !== Theme::DOMAIN;
584
+        $jsonLD->terms = array_filter($jsonLD->terms, function($term) {
585
+            return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN;
586 586
         });
587 587
         $jsonLD->terms = array_values($jsonLD->terms);
588 588
 
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
 
611 611
         $jsonLD->location = [
612 612
             '@type' => 'Place',
613
-         ] + (array) $this->placeJSONLD($locationUpdated->getLocationId()->toNative());
613
+         ] + (array)$this->placeJSONLD($locationUpdated->getLocationId()->toNative());
614 614
 
615 615
         return $document->withBody($jsonLD);
616 616
     }
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
 
626 626
         $eventLd = $document->getBody();
627 627
 
628
-        $eventLd->location->geo = (object) [
628
+        $eventLd->location->geo = (object)[
629 629
             'latitude' => $geoCoordinatesUpdated->getCoordinates()->getLatitude()->toDouble(),
630 630
             'longitude' => $geoCoordinatesUpdated->getCoordinates()->getLongitude()->toDouble(),
631 631
         ];
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
     {
680 680
         $eventSlug = $this->slugger->slug($name);
681 681
         return array(
682
-            'http://www.uitinvlaanderen.be/agenda/e/' . $eventSlug . '/' . $eventId,
682
+            'http://www.uitinvlaanderen.be/agenda/e/'.$eventSlug.'/'.$eventId,
683 683
         );
684 684
     }
685 685
 
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
         $jsonLD->name->{$this->getMainLanguage($jsonLD)->getCode()} = $majorInfoUpdated->getTitle();
541 541
 
542 542
         $jsonLD->location = array(
543
-          '@type' => 'Place',
543
+            '@type' => 'Place',
544 544
         ) + (array)$this->placeJSONLD($majorInfoUpdated->getLocation()->getCdbid());
545 545
 
546 546
         $availableTo = AvailableTo::createFromCalendar($majorInfoUpdated->getCalendar());
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
 
577 577
         $jsonLD->location = [
578 578
             '@type' => 'Place',
579
-         ] + (array) $this->placeJSONLD($locationUpdated->getLocationId()->toNative());
579
+            ] + (array) $this->placeJSONLD($locationUpdated->getLocationId()->toNative());
580 580
 
581 581
         return $document->withBody($jsonLD);
582 582
     }
Please login to merge, or discard this patch.
src/Place/ReadModel/JSONLD/PlaceLDProjector.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -241,7 +241,7 @@
 block discarded – undo
241 241
 
242 242
     /**
243 243
      * @param PlaceDeleted $placeDeleted
244
-     * @return null
244
+     * @return JsonDocument
245 245
      */
246 246
     protected function applyPlaceDeleted(PlaceDeleted $placeDeleted)
247 247
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         );
205 205
 
206 206
         $calendarJsonLD = $placeCreated->getCalendar()->toJsonLd();
207
-        $jsonLD = (object) array_merge((array) $jsonLD, $calendarJsonLD);
207
+        $jsonLD = (object)array_merge((array)$jsonLD, $calendarJsonLD);
208 208
 
209 209
         $availableTo = AvailableTo::createFromCalendar($placeCreated->getCalendar());
210 210
         $jsonLD->availableTo = (string)$availableTo;
@@ -279,8 +279,8 @@  discard block
 block discarded – undo
279 279
         $jsonLD->availableTo = (string)$availableTo;
280 280
 
281 281
         // Remove old theme and event type.
282
-        $jsonLD->terms = array_filter($jsonLD->terms, function ($term) {
283
-            return $term->domain !== EventType::DOMAIN &&  $term->domain !== Theme::DOMAIN;
282
+        $jsonLD->terms = array_filter($jsonLD->terms, function($term) {
283
+            return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN;
284 284
         });
285 285
 
286 286
         $eventType = $majorInfoUpdated->getEventType();
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
             // @replay_i18n
347 347
             // @see https://jira.uitdatabank.be/browse/III-2201
348 348
             $mainLanguageCode = $this->getMainLanguage($jsonLd)->getCode();
349
-            $jsonLd->address = (object) [
349
+            $jsonLd->address = (object)[
350 350
                 $mainLanguageCode => $jsonLd->address,
351 351
             ];
352 352
         }
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 
365 365
         $placeLd = $document->getBody();
366 366
 
367
-        $placeLd->geo = (object) [
367
+        $placeLd->geo = (object)[
368 368
             'latitude' => $geoCoordinatesUpdated->getCoordinates()->getLatitude()->toDouble(),
369 369
             'longitude' => $geoCoordinatesUpdated->getCoordinates()->getLongitude()->toDouble(),
370 370
         ];
Please login to merge, or discard this patch.
src/Event/EventEditingServiceInterface.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -24,6 +24,7 @@  discard block
 block discarded – undo
24 24
      * @param string $id
25 25
      * @param Language $language
26 26
      * @param StringLiteral $title
27
+     * @return string
27 28
      */
28 29
     public function updateTitle($id, Language $language, StringLiteral $title);
29 30
 
@@ -33,6 +34,7 @@  discard block
 block discarded – undo
33 34
      * @param string $id
34 35
      * @param Language $language
35 36
      * @param Description $description
37
+     * @return string
36 38
      */
37 39
     public function updateDescription($id, Language $language, Description $description);
38 40
 
@@ -41,6 +43,7 @@  discard block
 block discarded – undo
41 43
      *
42 44
      * @param string $id
43 45
      * @param AgeRange $ageRange
46
+     * @return string
44 47
      */
45 48
     public function updateTypicalAgeRange($id, AgeRange $ageRange);
46 49
 
@@ -48,6 +51,7 @@  discard block
 block discarded – undo
48 51
      * Delete the typical age range of a place.
49 52
      *
50 53
      * @param string $id
54
+     * @return string
51 55
      */
52 56
     public function deleteTypicalAgeRange($id);
53 57
 
@@ -56,6 +60,7 @@  discard block
 block discarded – undo
56 60
      *
57 61
      * @param string $id
58 62
      * @param string $organizerId
63
+     * @return string
59 64
      */
60 65
     public function updateOrganizer($id, $organizerId);
61 66
 
@@ -64,6 +69,7 @@  discard block
 block discarded – undo
64 69
      *
65 70
      * @param string $id
66 71
      * @param string $organizerId
72
+     * @return string
67 73
      */
68 74
     public function deleteOrganizer($id, $organizerId);
69 75
 
@@ -72,6 +78,7 @@  discard block
 block discarded – undo
72 78
      *
73 79
      * @param string $id
74 80
      * @param ContactPoint $contactPoint
81
+     * @return string
75 82
      */
76 83
     public function updateContactPoint($id, ContactPoint $contactPoint);
77 84
 
@@ -80,6 +87,7 @@  discard block
 block discarded – undo
80 87
      *
81 88
      * @param string $id
82 89
      * @param UUID $imageId
90
+     * @return string
83 91
      */
84 92
     public function addImage($id, UUID $imageId);
85 93
 
@@ -106,6 +114,7 @@  discard block
 block discarded – undo
106 114
      *
107 115
      * @param string $id
108 116
      * @param Image $image
117
+     * @return string
109 118
      */
110 119
     public function removeImage($id, Image $image);
111 120
 
Please login to merge, or discard this patch.