Completed
Pull Request — master (#358)
by
unknown
09:25
created
src/Offer/OfferFacilityResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@
 block discarded – undo
25 25
      */
26 26
     public function byId(StringLiteral $facilityId)
27 27
     {
28
-        if (!array_key_exists((string) $facilityId, $this->facilities)) {
28
+        if (!array_key_exists((string)$facilityId, $this->facilities)) {
29 29
             throw new \Exception("Unknown facility id '{$facilityId}'");
30 30
         }
31 31
 
32
-        return $this->facilities[(string) $facilityId];
32
+        return $this->facilities[(string)$facilityId];
33 33
     }
34 34
 
35 35
     /**
Please login to merge, or discard this patch.
src/Organizer/Commands/AbstractLabelCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     public function getNames()
50 50
     {
51 51
         return [
52
-            new StringLiteral((string) $this->label),
52
+            new StringLiteral((string)$this->label),
53 53
         ];
54 54
     }
55 55
 
Please login to merge, or discard this patch.
src/Offer/Commands/AbstractImportLabels.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     public function getNames()
39 39
     {
40 40
         return array_map(
41
-            function (Label $label) {
41
+            function(Label $label) {
42 42
                 return new StringLiteral($label->getName()->toString());
43 43
             },
44 44
             $this->getLabels()->toArray()
Please login to merge, or discard this patch.
src/Organizer/Commands/ImportLabels.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     public function getNames()
39 39
     {
40 40
         return array_map(
41
-            function (Label $label) {
41
+            function(Label $label) {
42 42
                 return new StringLiteral($label->getName()->toString());
43 43
             },
44 44
             $this->getLabels()->toArray()
Please login to merge, or discard this patch.
src/Organizer/Organizer.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 use CultuurNet\UDB3\Language;
14 14
 use CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\LabelName;
15 15
 use CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Labels;
16
-use CultuurNet\UDB3\Organizer\Commands\ImportLabels;
17 16
 use CultuurNet\UDB3\Organizer\Events\AddressUpdated;
18 17
 use CultuurNet\UDB3\Organizer\Events\ContactPointUpdated;
19 18
 use CultuurNet\UDB3\Organizer\Events\LabelAdded;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         // Convert the imported labels to label collection.
249 249
         $importLabelsCollection = new LabelCollection(
250 250
             array_map(
251
-                function (\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
251
+                function(\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
252 252
                     return new Label(
253 253
                         $label->getName()->toString(),
254 254
                         $label->isVisible()
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         foreach ($addedLabels->asArray() as $addedLabel) {
273 273
             $importLabels = $importLabels->with(
274 274
                 new \CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label(
275
-                    new LabelName((string) $addedLabel),
275
+                    new LabelName((string)$addedLabel),
276 276
                     $addedLabel->isVisible()
277 277
                 )
278 278
             );
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
     protected function applyOrganizerImportedFromUDB2(
339 339
         OrganizerImportedFromUDB2 $organizerImported
340 340
     ) {
341
-        $this->actorId = (string) $organizerImported->getActorId();
341
+        $this->actorId = (string)$organizerImported->getActorId();
342 342
 
343 343
         // On import from UDB2 the default main language is 'nl'.
344 344
         $this->mainLanguage = new Language('nl');
Please login to merge, or discard this patch.
src/Offer/Offer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         $sameFacilities = array_uintersect(
217 217
             $facilities1,
218 218
             $facilities2,
219
-            function (Facility $facility1, Facility $facility2) {
219
+            function(Facility $facility1, Facility $facility2) {
220 220
                 return strcmp($facility1->getId(), $facility2->getId());
221 221
             }
222 222
         );
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         // Convert the imported labels to label collection.
268 268
         $importLabelsCollection = new LabelCollection(
269 269
             array_map(
270
-                function (\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
270
+                function(\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
271 271
                     return new Label(
272 272
                         $label->getName()->toString(),
273 273
                         $label->isVisible()
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
         foreach ($addedLabels->asArray() as $addedLabel) {
292 292
             $importLabels = $importLabels->with(
293 293
                 new \CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label(
294
-                    new LabelName((string) $addedLabel),
294
+                    new LabelName((string)$addedLabel),
295 295
                     $addedLabel->isVisible()
296 296
                 )
297 297
             );
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
             if ($language->getCode() !== $this->mainLanguage->getCode()) {
343 343
                 $event = $this->createDescriptionTranslatedEvent($language, $description);
344 344
             } else {
345
-                $event = $this->createDescriptionUpdatedEvent((string) $description);
345
+                $event = $this->createDescriptionUpdatedEvent((string)$description);
346 346
             }
347 347
 
348 348
             $this->apply($event);
@@ -658,7 +658,7 @@  discard block
 block discarded – undo
658 658
         $importImages = $imageCollection->toArray();
659 659
         $currentImages = $currentImageCollection->toArray();
660 660
 
661
-        $compareImages = function (Image $a, Image $b) {
661
+        $compareImages = function(Image $a, Image $b) {
662 662
             $idA = $a->getMediaObjectId()->toNative();
663 663
             $idB = $b->getMediaObjectId()->toNative();
664 664
             return strcmp($idA, $idB);
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
             if ($this->rejectedReason && $reason->sameValueAs($this->rejectedReason)) {
806 806
                 return true; // nothing left to do if the offer has already been rejected for the same reason
807 807
             } else {
808
-                throw new Exception('The offer has already been rejected for another reason: ' . $this->rejectedReason);
808
+                throw new Exception('The offer has already been rejected for another reason: '.$this->rejectedReason);
809 809
             }
810 810
         }
811 811
 
@@ -980,7 +980,7 @@  discard block
 block discarded – undo
980 980
         $dutchImagesList = $imagesEvent->getImages()->toArray();
981 981
         $translatedImagesList = array_filter(
982 982
             $this->images->toArray(),
983
-            function (Image $image) {
983
+            function(Image $image) {
984 984
                 return $image->getLanguage()->getCode() !== 'nl';
985 985
             }
986 986
         );
Please login to merge, or discard this patch.
src/BookingInfo.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,10 +116,10 @@
 block discarded – undo
116 116
     {
117 117
         $serialized = array_filter(
118 118
             [
119
-              'phone' => $this->phone,
120
-              'email' => $this->email,
121
-              'url' => $this->url,
122
-              'urlLabel' => $this->urlLabel,
119
+                'phone' => $this->phone,
120
+                'email' => $this->email,
121
+                'url' => $this->url,
122
+                'urlLabel' => $this->urlLabel,
123 123
             ]
124 124
         );
125 125
 
Please login to merge, or discard this patch.