Completed
Pull Request — master (#264)
by Kristof
04:49
created
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 2 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   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
             if (preg_match('/^apply(.+)$/', $method, $matches)) {
127 127
                 $event = $matches[1];
128
-                $classNameMethod = 'get' . $event . 'ClassName';
128
+                $classNameMethod = 'get'.$event.'ClassName';
129 129
 
130 130
                 if (method_exists($this, $classNameMethod)) {
131 131
                     $eventFullClassName = call_user_func(array($this, $classNameMethod));
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
         $labelsProperty = $labelAdded->getLabel()->isVisible() ? 'labels' : 'hiddenLabels';
266 266
 
267 267
         $labels = isset($offerLd->{$labelsProperty}) ? $offerLd->{$labelsProperty} : [];
268
-        $label = (string) $labelAdded->getLabel();
268
+        $label = (string)$labelAdded->getLabel();
269 269
 
270 270
         $labels[] = $label;
271 271
         $offerLd->{$labelsProperty} = array_unique($labels);
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
             if (isset($offerLd->{$labelsProperty}) && is_array($offerLd->{$labelsProperty})) {
291 291
                 $offerLd->{$labelsProperty} = array_filter(
292 292
                     $offerLd->{$labelsProperty},
293
-                    function ($label) use ($labelRemoved) {
293
+                    function($label) use ($labelRemoved) {
294 294
                         return !$labelRemoved->getLabel()->equals(
295 295
                             new Label($label)
296 296
                         );
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
             return;
388 388
         }
389 389
 
390
-        $imageId = (string) $imageRemoved->getImage()->getMediaObjectId();
390
+        $imageId = (string)$imageRemoved->getImage()->getMediaObjectId();
391 391
 
392 392
         /**
393 393
          * Matches any object that is not the removed image.
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
          * @return bool
399 399
          *  Returns true when the media object does not match the image to remove.
400 400
          */
401
-        $shouldNotBeRemoved = function ($mediaObject) use ($imageId) {
401
+        $shouldNotBeRemoved = function($mediaObject) use ($imageId) {
402 402
             $containsId = !!strpos($mediaObject->{'@id'}, $imageId);
403 403
             return !$containsId;
404 404
         };
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
         $document = $this->loadDocumentFromRepository($mainImageSelected);
437 437
         $offerLd = $document->getBody();
438 438
         $imageId = $mainImageSelected->getImage()->getMediaObjectId();
439
-        $mediaObjectMatcher = function ($matchingMediaObject, $currentMediaObject) use ($imageId) {
439
+        $mediaObjectMatcher = function($matchingMediaObject, $currentMediaObject) use ($imageId) {
440 440
             if (!$matchingMediaObject && $this->mediaObjectMatchesId($currentMediaObject, $imageId)) {
441 441
                 $matchingMediaObject = $currentMediaObject;
442 442
             }
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
      */
462 462
     protected function mediaObjectMatchesId($mediaObject, UUID $mediaObjectId)
463 463
     {
464
-        return strpos($mediaObject->{'@id'}, (string) $mediaObjectId) > 0;
464
+        return strpos($mediaObject->{'@id'}, (string)$mediaObjectId) > 0;
465 465
     }
466 466
 
467 467
     /**
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
      */
643 643
     protected function applyPublished(AbstractPublished $published)
644 644
     {
645
-        $this->applyEventTransformation($published, function ($offerLd) use ($published) {
645
+        $this->applyEventTransformation($published, function($offerLd) use ($published) {
646 646
             $offerLd->workflowStatus = WorkflowStatus::READY_FOR_VALIDATION()->getName();
647 647
 
648 648
             $publicationDate = $published->getPublicationDate();
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
      */
656 656
     protected function applyApproved(AbstractApproved $approved)
657 657
     {
658
-        $this->applyEventTransformation($approved, function ($offerLd) {
658
+        $this->applyEventTransformation($approved, function($offerLd) {
659 659
             $offerLd->workflowStatus = WorkflowStatus::APPROVED()->getName();
660 660
         });
661 661
     }
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
      */
692 692
     private function reject()
693 693
     {
694
-        return function ($offerLd) {
694
+        return function($offerLd) {
695 695
             $offerLd->workflowStatus = WorkflowStatus::REJECTED()->getName();
696 696
         };
697 697
     }
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
     {
729 729
         $images = $imagesEvent->getImages();
730 730
         $jsonMediaObjects = array_map(
731
-            function (Image $image) {
731
+            function(Image $image) {
732 732
                 return $this->mediaObjectSerializer->serialize($image, 'json-ld');
733 733
             },
734 734
             $images->toArray()
@@ -742,7 +742,7 @@  discard block
 block discarded – undo
742 742
         }
743 743
 
744 744
         if (isset($mainImage)) {
745
-            $offerLd->image = (string) $mainImage->getSourceLocation();
745
+            $offerLd->image = (string)$mainImage->getSourceLocation();
746 746
         }
747 747
     }
748 748
 
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.
src/Calendar.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         );
85 85
 
86 86
         $calendar = [
87
-          'type' => $this->type,
87
+            'type' => $this->type,
88 88
         ];
89 89
 
90 90
         empty($this->startDate) ?: $calendar['startDate'] = $this->startDate->format(DateTime::ATOM);
@@ -167,9 +167,9 @@  discard block
 block discarded – undo
167 167
             $jsonLd['subEvent'] = array();
168 168
             foreach ($timestamps as $timestamp) {
169 169
                 $jsonLd['subEvent'][] = array(
170
-                  '@type' => 'Event',
171
-                  'startDate' => $timestamp->getStartDate()->format(DateTime::ATOM),
172
-                  'endDate' => $timestamp->getEndDate()->format(DateTime::ATOM),
170
+                    '@type' => 'Event',
171
+                    'startDate' => $timestamp->getStartDate()->format(DateTime::ATOM),
172
+                    'endDate' => $timestamp->getEndDate()->format(DateTime::ATOM),
173 173
                 );
174 174
             }
175 175
         }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         array $openingHours = array()
55 55
     ) {
56 56
         if (($type->is(CalendarType::MULTIPLE()) || $type->is(CalendarType::SINGLE())) && empty($startDate)) {
57
-            throw new \UnexpectedValueException('Start date can not be empty for calendar type: ' . $type . '.');
57
+            throw new \UnexpectedValueException('Start date can not be empty for calendar type: '.$type.'.');
58 58
         }
59 59
 
60 60
         if ($type->is(CalendarType::PERIODIC()) && (empty($startDate) || empty($endDate))) {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     public function serialize()
83 83
     {
84 84
         $serializedTimestamps = array_map(
85
-            function (Timestamp $timestamp) {
85
+            function(Timestamp $timestamp) {
86 86
                 return $timestamp->serialize();
87 87
             },
88 88
             $this->timestamps
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             !empty($data['startDate']) ? self::deserializeDateTime($data['startDate']) : null,
111 111
             !empty($data['endDate']) ? self::deserializeDateTime($data['endDate']) : null,
112 112
             !empty($data['timestamps']) ? array_map(
113
-                function ($timestamp) {
113
+                function($timestamp) {
114 114
                     return Timestamp::deserialize($timestamp);
115 115
                 },
116 116
                 $data['timestamps']
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         // Permanent - with openingtimes
211 211
         $openingHours = $this->getOpeningHours();
212 212
         if (!empty($openingHours)) {
213
-            $jsonLd['openingHours'] = (array) $openingHours;
213
+            $jsonLd['openingHours'] = (array)$openingHours;
214 214
         }
215 215
 
216 216
         return $jsonLd;
Please login to merge, or discard this patch.
src/EventExport/Format/TabularData/OOXML/OOXMLFileFormat.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
     /**
25 25
      * @param EventInfoServiceInterface|null $uitpas
26
-     * @param string[]|null $include
26
+     * @param string[] $include
27 27
      */
28 28
     public function __construct($include = null, EventInfoServiceInterface $uitpas = null)
29 29
     {
Please login to merge, or discard this patch.