@@ -25,7 +25,7 @@ |
||
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 |
@@ -26,9 +26,9 @@ discard block |
||
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 |
||
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'] |
@@ -55,10 +55,10 @@ |
||
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 |
@@ -26,7 +26,7 @@ |
||
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 | } |
@@ -103,12 +103,12 @@ |
||
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 | } |
@@ -30,11 +30,11 @@ |
||
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 | } |
@@ -29,7 +29,7 @@ |
||
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 | } |
@@ -69,7 +69,7 @@ |
||
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 |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $this->endDate = $endDate; |
83 | 83 | $this->openingHours = $openingHours; |
84 | 84 | |
85 | - usort($timestamps, function (Timestamp $timestamp, Timestamp $otherTimestamp) { |
|
85 | + usort($timestamps, function(Timestamp $timestamp, Timestamp $otherTimestamp) { |
|
86 | 86 | return $timestamp->getStartDate() <=> $otherTimestamp->getStartDate(); |
87 | 87 | }); |
88 | 88 | |
@@ -98,14 +98,14 @@ discard block |
||
98 | 98 | public function serialize(): array |
99 | 99 | { |
100 | 100 | $serializedTimestamps = array_map( |
101 | - function (Timestamp $timestamp) { |
|
101 | + function(Timestamp $timestamp) { |
|
102 | 102 | return $timestamp->serialize(); |
103 | 103 | }, |
104 | 104 | $this->timestamps |
105 | 105 | ); |
106 | 106 | |
107 | 107 | $serializedOpeningHours = array_map( |
108 | - function (OpeningHour $openingHour) { |
|
108 | + function(OpeningHour $openingHour) { |
|
109 | 109 | return $openingHour->serialize(); |
110 | 110 | }, |
111 | 111 | $this->openingHours |
@@ -142,13 +142,13 @@ discard block |
||
142 | 142 | !empty($data['startDate']) ? self::deserializeDateTime($data['startDate']) : null, |
143 | 143 | !empty($data['endDate']) ? self::deserializeDateTime($data['endDate']) : null, |
144 | 144 | !empty($data['timestamps']) ? array_map( |
145 | - function ($timestamp) { |
|
145 | + function($timestamp) { |
|
146 | 146 | return Timestamp::deserialize($timestamp); |
147 | 147 | }, |
148 | 148 | $data['timestamps'] |
149 | 149 | ) : $defaultTimeStamps, |
150 | 150 | !empty($data['openingHours']) ? array_map( |
151 | - function ($openingHour) { |
|
151 | + function($openingHour) { |
|
152 | 152 | return OpeningHour::deserialize($openingHour); |
153 | 153 | }, |
154 | 154 | $data['openingHours'] |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | |
313 | 313 | if ($calendar instanceof CalendarWithSubEvents) { |
314 | 314 | $timestamps = array_map( |
315 | - function (SubEvent $subEvent) { |
|
315 | + function(SubEvent $subEvent) { |
|
316 | 316 | return Timestamp::fromUdb3ModelSubEvent($subEvent); |
317 | 317 | }, |
318 | 318 | $calendar->getSubEvents()->toArray() |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | |
322 | 322 | if ($calendar instanceof CalendarWithOpeningHours) { |
323 | 323 | $openingHours = array_map( |
324 | - function (Udb3ModelOpeningHour $openingHour) { |
|
324 | + function(Udb3ModelOpeningHour $openingHour) { |
|
325 | 325 | return OpeningHour::fromUdb3ModelOpeningHour($openingHour); |
326 | 326 | }, |
327 | 327 | $calendar->getOpeningHours()->toArray() |