Completed
Pull Request — master (#442)
by
unknown
03:25
created
src/Event/EventTypeResolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@
 block discarded – undo
42 42
 
43 43
     public function byId(StringLiteral $typeId): EventType
44 44
     {
45
-        if (!array_key_exists((string) $typeId, $this->types)) {
46
-            throw new Exception("Unknown event type id: " . $typeId);
45
+        if (!array_key_exists((string)$typeId, $this->types)) {
46
+            throw new Exception("Unknown event type id: ".$typeId);
47 47
         }
48
-        return $this->types[(string) $typeId];
48
+        return $this->types[(string)$typeId];
49 49
     }
50 50
 }
Please login to merge, or discard this patch.
src/Place/CannotMarkPlaceAsDuplicate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
8 8
 {
9 9
     public static function becauseItIsDeleted(string $placeId): self
10 10
     {
11
-        return new static('Cannot mark place ' . $placeId . ' as duplicate because it is deleted');
11
+        return new static('Cannot mark place '.$placeId.' as duplicate because it is deleted');
12 12
     }
13 13
 
14 14
     public static function becauseItIsAlreadyADuplicate(string $placeId): self
15 15
     {
16
-        return new static('Cannot mark place ' . $placeId . ' as duplicate because it is already a duplicate');
16
+        return new static('Cannot mark place '.$placeId.' as duplicate because it is already a duplicate');
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Place/CannotMarkPlaceAsCanonical.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
8 8
 {
9 9
     public static function becauseItIsDeleted(string $placeId): self
10 10
     {
11
-        return new static('Cannot mark place ' . $placeId . ' as canonical because it is deleted');
11
+        return new static('Cannot mark place '.$placeId.' as canonical because it is deleted');
12 12
     }
13 13
 
14 14
     public static function becauseItIsAlreadyADuplicate(string $placeId): self
15 15
     {
16
-        return new static('Cannot mark place ' . $placeId . ' as canonical because it is a duplicate');
16
+        return new static('Cannot mark place '.$placeId.' as canonical because it is a duplicate');
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Offer/Offer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         $sameFacilities = array_uintersect(
222 222
             $facilities1,
223 223
             $facilities2,
224
-            function (Facility $facility1, Facility $facility2) {
224
+            function(Facility $facility1, Facility $facility2) {
225 225
                 return strcmp($facility1->getId(), $facility2->getId());
226 226
             }
227 227
         );
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
      */
271 271
     public function importLabels(Labels $labels, Labels $labelsToKeepIfAlreadyOnOffer, Labels $labelsToRemoveWhenOnOffer)
272 272
     {
273
-        $convertLabelClass = function (\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
273
+        $convertLabelClass = function(\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
274 274
             return new Label(
275 275
                 $label->getName()->toString(),
276 276
                 $label->isVisible()
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
         foreach ($addedLabels->asArray() as $addedLabel) {
307 307
             $importLabels = $importLabels->with(
308 308
                 new \CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label(
309
-                    new LabelName((string) $addedLabel),
309
+                    new LabelName((string)$addedLabel),
310 310
                     $addedLabel->isVisible()
311 311
                 )
312 312
             );
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
         $importImages = $imageCollection->toArray();
708 708
         $currentImages = $currentImageCollection->toArray();
709 709
 
710
-        $compareImages = function (Image $a, Image $b) {
710
+        $compareImages = function(Image $a, Image $b) {
711 711
             $idA = $a->getMediaObjectId()->toNative();
712 712
             $idB = $b->getMediaObjectId()->toNative();
713 713
             return strcmp($idA, $idB);
@@ -854,7 +854,7 @@  discard block
 block discarded – undo
854 854
             if ($this->rejectedReason && $reason->sameValueAs($this->rejectedReason)) {
855 855
                 return true; // nothing left to do if the offer has already been rejected for the same reason
856 856
             } else {
857
-                throw new Exception('The offer has already been rejected for another reason: ' . $this->rejectedReason);
857
+                throw new Exception('The offer has already been rejected for another reason: '.$this->rejectedReason);
858 858
             }
859 859
         }
860 860
 
@@ -1032,7 +1032,7 @@  discard block
 block discarded – undo
1032 1032
         $dutchImagesList = $imagesEvent->getImages()->toArray();
1033 1033
         $translatedImagesList = array_filter(
1034 1034
             $this->images->toArray(),
1035
-            function (Image $image) {
1035
+            function(Image $image) {
1036 1036
                 return $image->getLanguage()->getCode() !== 'nl';
1037 1037
             }
1038 1038
         );
Please login to merge, or discard this patch.
src/Search/ResultsGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
             $total = $results->getTotalItems()->toNative();
110 110
 
111
-            $this->logger->info('Search API reported ' . $total . ' results');
111
+            $this->logger->info('Search API reported '.$total.' results');
112 112
 
113 113
             foreach ($results->getItems() as $item) {
114 114
                 $id = $item->getId();
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                         'query_duplicate_event',
124 124
                         array(
125 125
                             'query' => $query,
126
-                            'error' => "Found duplicate offer {$id} on page {$currentPage}, " .
126
+                            'error' => "Found duplicate offer {$id} on page {$currentPage}, ".
127 127
                                 "occurred first time on page {$ids[$id]}.",
128 128
                         )
129 129
                     );
Please login to merge, or discard this patch.
src/Event/LocationMarkedAsDuplicateProcessManager.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             if (!$result->getType()->sameValueAs(OfferType::EVENT())) {
76 76
                 $skipped[] = $result->getId();
77 77
                 $this->logger->warning(
78
-                    'Skipped result with id ' . $result->getId() . ' because it\'s not an event according to the @id parser.'
78
+                    'Skipped result with id '.$result->getId().' because it\'s not an event according to the @id parser.'
79 79
                 );
80 80
                 continue;
81 81
             }
@@ -89,17 +89,17 @@  discard block
 block discarded – undo
89 89
             $this->commandBus->dispatch($command);
90 90
 
91 91
             $this->logger->info(
92
-                'Dispatched UpdateLocation for result with id ' . $command->getItemId()
92
+                'Dispatched UpdateLocation for result with id '.$command->getItemId()
93 93
             );
94 94
         }
95 95
 
96 96
         $updated = count($commands);
97 97
         $total = $updated + count($skipped);
98 98
 
99
-        $this->logger->info('Received ' . $total . ' results from the search api.');
100
-        $this->logger->info('Updated ' . $updated . ' events to the canonical location.');
99
+        $this->logger->info('Received '.$total.' results from the search api.');
100
+        $this->logger->info('Updated '.$updated.' events to the canonical location.');
101 101
         $this->logger->info(
102
-            'Skipped ' . count($skipped) . ' events:' . PHP_EOL . implode(PHP_EOL, $skipped)
102
+            'Skipped '.count($skipped).' events:'.PHP_EOL.implode(PHP_EOL, $skipped)
103 103
         );
104 104
     }
105 105
 }
Please login to merge, or discard this patch.
src/Organizer/OrganizerLDProjector.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 
233 233
         $this->setMainLanguage($jsonLD, $organizerCreated->getMainLanguage());
234 234
 
235
-        $jsonLD->url = (string) $organizerCreated->getWebsite();
235
+        $jsonLD->url = (string)$organizerCreated->getWebsite();
236 236
 
237 237
         $jsonLD->name = [
238 238
             $this->getMainLanguage($jsonLD)->getCode() => $organizerCreated->getTitle(),
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         $document = $this->repository->get($organizerId);
263 263
 
264 264
         $jsonLD = $document->getBody();
265
-        $jsonLD->url = (string) $websiteUpdated->getWebsite();
265
+        $jsonLD->url = (string)$websiteUpdated->getWebsite();
266 266
 
267 267
         return $document->withBody($jsonLD);
268 268
     }
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
         $labelsProperty = $labelAdded->getLabel()->isVisible() ? 'labels' : 'hiddenLabels';
372 372
 
373 373
         $labels = isset($jsonLD->{$labelsProperty}) ? $jsonLD->{$labelsProperty} : [];
374
-        $label = (string) $labelAdded->getLabel();
374
+        $label = (string)$labelAdded->getLabel();
375 375
 
376 376
         $labels[] = $label;
377 377
         $jsonLD->{$labelsProperty} = array_unique($labels);
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
             if (isset($jsonLD->{$labelsProperty}) && is_array($jsonLD->{$labelsProperty})) {
397 397
                 $jsonLD->{$labelsProperty} = array_filter(
398 398
                     $jsonLD->{$labelsProperty},
399
-                    function ($label) use ($labelRemoved) {
399
+                    function($label) use ($labelRemoved) {
400 400
                         return !$labelRemoved->getLabel()->equals(
401 401
                             new Label($label)
402 402
                         );
Please login to merge, or discard this patch.