Completed
Pull Request — master (#486)
by Jonas
01:58
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/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/StatusType.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/Status.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 $statusReason): void
71 71
     {
72
-        $languageCodes = \array_map(static function (StatusReason $reason) {
72
+        $languageCodes = \array_map(static function(StatusReason $reason) {
73 73
             return $reason->getLanguage()->getCode();
74 74
         }, $statusReason);
75 75
 
Please login to merge, or discard this patch.
src/Calendar.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $this->endDate = $endDate;
89 89
         $this->openingHours = $openingHours;
90 90
 
91
-        usort($timestamps, function (Timestamp $timestamp, Timestamp $otherTimestamp) {
91
+        usort($timestamps, function(Timestamp $timestamp, Timestamp $otherTimestamp) {
92 92
             return $timestamp->getStartDate() <=> $otherTimestamp->getStartDate();
93 93
         });
94 94
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
         $clone->status = $status;
105 105
         $clone->timestamps = \array_map(
106
-            function (Timestamp $timestamp) use ($status): Timestamp {
106
+            function(Timestamp $timestamp) use ($status): Timestamp {
107 107
                 return $timestamp->withStatus($status);
108 108
             },
109 109
             $clone->getTimestamps()
@@ -125,14 +125,14 @@  discard block
 block discarded – undo
125 125
     public function serialize(): array
126 126
     {
127 127
         $serializedTimestamps = array_map(
128
-            function (Timestamp $timestamp) {
128
+            function(Timestamp $timestamp) {
129 129
                 return $timestamp->serialize();
130 130
             },
131 131
             $this->timestamps
132 132
         );
133 133
 
134 134
         $serializedOpeningHours = array_map(
135
-            function (OpeningHour $openingHour) {
135
+            function(OpeningHour $openingHour) {
136 136
                 return $openingHour->serialize();
137 137
             },
138 138
             $this->openingHours
@@ -169,13 +169,13 @@  discard block
 block discarded – undo
169 169
             !empty($data['startDate']) ? self::deserializeDateTime($data['startDate']) : null,
170 170
             !empty($data['endDate']) ? self::deserializeDateTime($data['endDate']) : null,
171 171
             !empty($data['timestamps']) ? array_map(
172
-                function ($timestamp) {
172
+                function($timestamp) {
173 173
                     return Timestamp::deserialize($timestamp);
174 174
                 },
175 175
                 $data['timestamps']
176 176
             ) : $defaultTimeStamps,
177 177
             !empty($data['openingHours']) ? array_map(
178
-                function ($openingHour) {
178
+                function($openingHour) {
179 179
                     return OpeningHour::deserialize($openingHour);
180 180
                 },
181 181
                 $data['openingHours']
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 
340 340
         if ($calendar instanceof CalendarWithSubEvents) {
341 341
             $timestamps = array_map(
342
-                function (SubEvent $subEvent) {
342
+                function(SubEvent $subEvent) {
343 343
                     return Timestamp::fromUdb3ModelSubEvent($subEvent);
344 344
                 },
345 345
                 $calendar->getSubEvents()->toArray()
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 
349 349
         if ($calendar instanceof CalendarWithOpeningHours) {
350 350
             $openingHours = array_map(
351
-                function (Udb3ModelOpeningHour $openingHour) {
351
+                function(Udb3ModelOpeningHour $openingHour) {
352 352
                     return OpeningHour::fromUdb3ModelOpeningHour($openingHour);
353 353
                 },
354 354
                 $calendar->getOpeningHours()->toArray()
Please login to merge, or discard this patch.