Completed
Pull Request — master (#480)
by Luc
01:59
created
src/Offer/Events/AbstractTypicalAgeRangeUpdated.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     public function serialize(): array
26 26
     {
27 27
         return parent::serialize() + array(
28
-            'typicalAgeRange' => (string) $this->typicalAgeRange,
28
+            'typicalAgeRange' => (string)$this->typicalAgeRange,
29 29
         );
30 30
     }
31 31
 
Please login to merge, or discard this patch.
src/Offer/Events/Image/AbstractImagesEvent.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function serialize(): array
28 28
     {
29
-        $serializedData =  parent::serialize() + array(
29
+        $serializedData = parent::serialize() + array(
30 30
             'images' => array_map(
31
-                function (Image $image) {
31
+                function(Image $image) {
32 32
                     return $image->serialize();
33 33
                 },
34 34
                 $this->images->toArray()
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $images = ImageCollection::fromArray(
49 49
             array_map(
50
-                function ($imageData) {
50
+                function($imageData) {
51 51
                     return Image::deserialize($imageData);
52 52
                 },
53 53
                 $data['images']
Please login to merge, or discard this patch.
src/Offer/Events/Image/AbstractImageUpdated.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,10 +55,10 @@
 block discarded – undo
55 55
 
56 56
     public function serialize(): array
57 57
     {
58
-        return parent::serialize() +  array(
59
-            'media_object_id' => (string) $this->mediaObjectId,
60
-            'description' => (string) $this->description,
61
-            'copyright_holder' => (string) $this->copyrightHolder,
58
+        return parent::serialize() + array(
59
+            'media_object_id' => (string)$this->mediaObjectId,
60
+            'description' => (string)$this->description,
61
+            'copyright_holder' => (string)$this->copyrightHolder,
62 62
         );
63 63
     }
64 64
 
Please login to merge, or discard this patch.
src/Offer/Events/AbstractLabelEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public function serialize(): array
27 27
     {
28 28
         return parent::serialize() + array(
29
-            'label' => (string) $this->label,
29
+            'label' => (string)$this->label,
30 30
             'visibility' => $this->label->isVisible(),
31 31
         );
32 32
     }
Please login to merge, or discard this patch.
src/Media/Image.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -103,12 +103,12 @@
 block discarded – undo
103 103
     public function serialize(): array
104 104
     {
105 105
         return [
106
-            'media_object_id' => (string) $this->getMediaObjectId(),
107
-            'mime_type' => (string) $this->getMimeType(),
108
-            'description' => (string) $this->getDescription(),
109
-            'copyright_holder' => (string) $this->getCopyrightHolder(),
110
-            'source_location' => (string) $this->getSourceLocation(),
111
-            'language' => (string) $this->getLanguage(),
106
+            'media_object_id' => (string)$this->getMediaObjectId(),
107
+            'mime_type' => (string)$this->getMimeType(),
108
+            'description' => (string)$this->getDescription(),
109
+            'copyright_holder' => (string)$this->getCopyrightHolder(),
110
+            'source_location' => (string)$this->getSourceLocation(),
111
+            'language' => (string)$this->getLanguage(),
112 112
         ];
113 113
     }
114 114
 }
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
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $this->endDate = $endDate;
82 82
         $this->openingHours = $openingHours;
83 83
 
84
-        usort($timestamps, function (Timestamp $timestamp, Timestamp $otherTimestamp) {
84
+        usort($timestamps, function(Timestamp $timestamp, Timestamp $otherTimestamp) {
85 85
             return $timestamp->getStartDate() <=> $otherTimestamp->getStartDate();
86 86
         });
87 87
 
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
     public function serialize(): array
98 98
     {
99 99
         $serializedTimestamps = array_map(
100
-            function (Timestamp $timestamp) {
100
+            function(Timestamp $timestamp) {
101 101
                 return $timestamp->serialize();
102 102
             },
103 103
             $this->timestamps
104 104
         );
105 105
 
106 106
         $serializedOpeningHours = array_map(
107
-            function (OpeningHour $openingHour) {
107
+            function(OpeningHour $openingHour) {
108 108
                 return $openingHour->serialize();
109 109
             },
110 110
             $this->openingHours
@@ -141,13 +141,13 @@  discard block
 block discarded – undo
141 141
             !empty($data['startDate']) ? self::deserializeDateTime($data['startDate']) : null,
142 142
             !empty($data['endDate']) ? self::deserializeDateTime($data['endDate']) : null,
143 143
             !empty($data['timestamps']) ? array_map(
144
-                function ($timestamp) {
144
+                function($timestamp) {
145 145
                     return Timestamp::deserialize($timestamp);
146 146
                 },
147 147
                 $data['timestamps']
148 148
             ) : $defaultTimeStamps,
149 149
             !empty($data['openingHours']) ? array_map(
150
-                function ($openingHour) {
150
+                function($openingHour) {
151 151
                     return OpeningHour::deserialize($openingHour);
152 152
                 },
153 153
                 $data['openingHours']
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 
287 287
         if ($calendar instanceof CalendarWithSubEvents) {
288 288
             $timestamps = array_map(
289
-                function (DateRange $dateRange) {
289
+                function(DateRange $dateRange) {
290 290
                     return Timestamp::fromUdb3ModelDateRange($dateRange);
291 291
                 },
292 292
                 $calendar->getSubEvents()->toArray()
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 
296 296
         if ($calendar instanceof CalendarWithOpeningHours) {
297 297
             $openingHours = array_map(
298
-                function (Udb3ModelOpeningHour $openingHour) {
298
+                function(Udb3ModelOpeningHour $openingHour) {
299 299
                     return OpeningHour::fromUdb3ModelOpeningHour($openingHour);
300 300
                 },
301 301
                 $calendar->getOpeningHours()->toArray()
Please login to merge, or discard this patch.
src/Media/Properties/MIMEType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@
 block discarded – undo
30 30
         $typeSupported = array_key_exists($subtypeString, self::$supportedSubtypes);
31 31
 
32 32
         if (!$typeSupported) {
33
-            throw new UnsupportedMIMETypeException('MIME type "' . $subtypeString . '" is not supported!');
33
+            throw new UnsupportedMIMETypeException('MIME type "'.$subtypeString.'" is not supported!');
34 34
         }
35 35
 
36 36
         $type = self::$supportedSubtypes[$subtypeString];
37 37
 
38
-        return new self($type . '/' . $subtypeString);
38
+        return new self($type.'/'.$subtypeString);
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
src/Event/ValueObjects/EventStatusType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     private function __construct(string $value)
30 30
     {
31 31
         if (!\in_array($value, self::ALLOWED_VALUES, true)) {
32
-            throw new InvalidArgumentException('Status does not support the value "' . $value . '"');
32
+            throw new InvalidArgumentException('Status does not support the value "'.$value.'"');
33 33
         }
34 34
         $this->value = $value;
35 35
     }
Please login to merge, or discard this patch.
src/Event/ValueObjects/EventStatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      */
70 70
     private function ensureTranslationsAreUnique(array $eventStatusReasons): void
71 71
     {
72
-        $languageCodes = \array_map(static function (EventStatusReason $reason) {
72
+        $languageCodes = \array_map(static function(EventStatusReason $reason) {
73 73
             return $reason->getLanguage()->getCode();
74 74
         }, $eventStatusReasons);
75 75
 
Please login to merge, or discard this patch.