Completed
Pull Request — master (#393)
by Luc
15:35 queued 14s
created
src/Address/LocalityAddressFormatter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
      */
10 10
     public function format(Address $address)
11 11
     {
12
-        return $address->getPostalCode() . ' ' .
13
-            $address->getLocality() . ', ' .
12
+        return $address->getPostalCode().' '.
13
+            $address->getLocality().', '.
14 14
             $address->getCountry()->getCode();
15 15
     }
16 16
 }
Please login to merge, or discard this patch.
src/Event/ReadModel/JSONLD/EventLDProjector.php 1 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.
src/Place/Events/PlaceCreated.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@
 block discarded – undo
154 154
         }
155 155
         return parent::serialize() + array(
156 156
             'main_language' => $this->mainLanguage->getCode(),
157
-            'title' => (string) $this->getTitle(),
157
+            'title' => (string)$this->getTitle(),
158 158
             'event_type' => $this->getEventType()->serialize(),
159 159
             'theme' => $theme,
160 160
             'address' => $this->getAddress()->serialize(),
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
@@ -73,8 +73,8 @@
 block discarded – undo
73 73
     {
74 74
         return parent::serialize() + array(
75 75
             'main_language' => $this->getMainLanguage()->getCode(),
76
-            'website' => (string) $this->getWebsite(),
77
-            'title' => (string) $this->getTitle(),
76
+            'website' => (string)$this->getWebsite(),
77
+            'title' => (string)$this->getTitle(),
78 78
         );
79 79
     }
80 80
 
Please login to merge, or discard this patch.
src/Organizer/OrganizerLDProjector.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 
218 218
         $this->setMainLanguage($jsonLD, $organizerCreated->getMainLanguage());
219 219
 
220
-        $jsonLD->url = (string) $organizerCreated->getWebsite();
220
+        $jsonLD->url = (string)$organizerCreated->getWebsite();
221 221
 
222 222
         $jsonLD->name = [
223 223
             $this->getMainLanguage($jsonLD)->getCode() => $organizerCreated->getTitle(),
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         $document = $this->repository->get($organizerId);
249 249
 
250 250
         $jsonLD = $document->getBody();
251
-        $jsonLD->url = (string) $websiteUpdated->getWebsite();
251
+        $jsonLD->url = (string)$websiteUpdated->getWebsite();
252 252
 
253 253
         return $document->withBody($jsonLD);
254 254
     }
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
         $labelsProperty = $labelAdded->getLabel()->isVisible() ? 'labels' : 'hiddenLabels';
357 357
 
358 358
         $labels = isset($jsonLD->{$labelsProperty}) ? $jsonLD->{$labelsProperty} : [];
359
-        $label = (string) $labelAdded->getLabel();
359
+        $label = (string)$labelAdded->getLabel();
360 360
 
361 361
         $labels[] = $label;
362 362
         $jsonLD->{$labelsProperty} = array_unique($labels);
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
             if (isset($jsonLD->{$labelsProperty}) && is_array($jsonLD->{$labelsProperty})) {
381 381
                 $jsonLD->{$labelsProperty} = array_filter(
382 382
                     $jsonLD->{$labelsProperty},
383
-                    function ($label) use ($labelRemoved) {
383
+                    function($label) use ($labelRemoved) {
384 384
                         return !$labelRemoved->getLabel()->equals(
385 385
                             new Label($label)
386 386
                         );
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
     private function applyOrganizerDeleted(
408 408
         OrganizerDeleted $organizerDeleted
409 409
     ) {
410
-        $document =  $this->repository->get($organizerDeleted->getOrganizerId());
410
+        $document = $this->repository->get($organizerDeleted->getOrganizerId());
411 411
 
412 412
         $jsonLD = $document->getBody();
413 413
 
Please login to merge, or discard this patch.
src/Offer/Commands/AbstractCreateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     {
20 20
         if (!is_string($itemId)) {
21 21
             throw new \InvalidArgumentException(
22
-                'Expected itemId to be a string, received ' . gettype($itemId)
22
+                'Expected itemId to be a string, received '.gettype($itemId)
23 23
             );
24 24
         }
25 25
 
Please login to merge, or discard this patch.
src/Calendar.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         array $openingHours = array()
63 63
     ) {
64 64
         if (($type->is(CalendarType::MULTIPLE()) || $type->is(CalendarType::SINGLE())) && empty($startDate)) {
65
-            throw new \UnexpectedValueException('Start date can not be empty for calendar type: ' . $type . '.');
65
+            throw new \UnexpectedValueException('Start date can not be empty for calendar type: '.$type.'.');
66 66
         }
67 67
 
68 68
         if ($type->is(CalendarType::PERIODIC()) && (empty($startDate) || empty($endDate))) {
@@ -102,14 +102,14 @@  discard block
 block discarded – undo
102 102
     public function serialize()
103 103
     {
104 104
         $serializedTimestamps = array_map(
105
-            function (Timestamp $timestamp) {
105
+            function(Timestamp $timestamp) {
106 106
                 return $timestamp->serialize();
107 107
             },
108 108
             $this->timestamps
109 109
         );
110 110
 
111 111
         $serializedOpeningHours = array_map(
112
-            function (OpeningHour $openingHour) {
112
+            function(OpeningHour $openingHour) {
113 113
                 return $openingHour->serialize();
114 114
             },
115 115
             $this->openingHours
@@ -137,13 +137,13 @@  discard block
 block discarded – undo
137 137
             !empty($data['startDate']) ? self::deserializeDateTime($data['startDate']) : null,
138 138
             !empty($data['endDate']) ? self::deserializeDateTime($data['endDate']) : null,
139 139
             !empty($data['timestamps']) ? array_map(
140
-                function ($timestamp) {
140
+                function($timestamp) {
141 141
                     return Timestamp::deserialize($timestamp);
142 142
                 },
143 143
                 $data['timestamps']
144 144
             ) : [],
145 145
             !empty($data['openingHours']) ? array_map(
146
-                function ($openingHour) {
146
+                function($openingHour) {
147 147
                     return OpeningHour::deserialize($openingHour);
148 148
                 },
149 149
                 $data['openingHours']
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 
272 272
         if ($calendar instanceof CalendarWithSubEvents) {
273 273
             $timestamps = array_map(
274
-                function (DateRange $dateRange) {
274
+                function(DateRange $dateRange) {
275 275
                     return Timestamp::fromUdb3ModelDateRange($dateRange);
276 276
                 },
277 277
                 $calendar->getSubEvents()->toArray()
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 
281 281
         if ($calendar instanceof CalendarWithOpeningHours) {
282 282
             $openingHours = array_map(
283
-                function (Udb3ModelOpeningHour $openingHour) {
283
+                function(Udb3ModelOpeningHour $openingHour) {
284 284
                     return OpeningHour::fromUdb3ModelOpeningHour($openingHour);
285 285
                 },
286 286
                 $calendar->getOpeningHours()->toArray()
Please login to merge, or discard this patch.
src/Calendar/DayOfWeekCollection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     public function getDaysOfWeek()
53 53
     {
54 54
         return array_map(
55
-            function ($dayOfWeek) {
55
+            function($dayOfWeek) {
56 56
                 return DayOfWeek::fromNative($dayOfWeek);
57 57
             },
58 58
             $this->daysOfWeek
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
         return array_reduce(
68 68
             $data,
69
-            function (DayOfWeekCollection $collection, $dayOfWeek) {
69
+            function(DayOfWeekCollection $collection, $dayOfWeek) {
70 70
                  return $collection->addDayOfWeek(DayOfWeek::fromNative($dayOfWeek));
71 71
             },
72 72
             new DayOfWeekCollection()
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     public static function fromUdb3ModelDays(Days $days)
89 89
     {
90 90
         $days = array_map(
91
-            function (Day $day) {
91
+            function(Day $day) {
92 92
                 return DayOfWeek::fromUdb3ModelDay($day);
93 93
             },
94 94
             $days->toArray()
Please login to merge, or discard this patch.
src/Organizer/DBALWebsiteLookupService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         $tableName
28 28
     ) {
29 29
         $this->connection = $connection;
30
-        $this->tableName = (string) $tableName;
30
+        $this->tableName = (string)$tableName;
31 31
     }
32 32
 
33 33
     /**
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             ->select(UniqueDBALEventStoreDecorator::UUID_COLUMN)
42 42
             ->from($this->tableName)
43 43
             ->where($expr->eq(UniqueDBALEventStoreDecorator::UNIQUE_COLUMN, ':url'))
44
-            ->setParameter(':url', (string) $url)
44
+            ->setParameter(':url', (string)$url)
45 45
             ->execute();
46 46
 
47 47
         $uuid = $results->fetchColumn();
Please login to merge, or discard this patch.