@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | private function dateFromUdb2UnixTime($unixTime) |
| 160 | 160 | { |
| 161 | 161 | $dateTime = new \DateTime( |
| 162 | - '@' . $unixTime, |
|
| 162 | + '@'.$unixTime, |
|
| 163 | 163 | new \DateTimeZone('Europe/Brussels') |
| 164 | 164 | ); |
| 165 | 165 | |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | 'addressLocality' => $address->getCity(), |
| 259 | 259 | 'postalCode' => $address->getZip(), |
| 260 | 260 | 'streetAddress' => |
| 261 | - $address->getStreet() . ' ' . $address->getHouseNumber( |
|
| 261 | + $address->getStreet().' '.$address->getHouseNumber( |
|
| 262 | 262 | ), |
| 263 | 263 | ); |
| 264 | 264 | } |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | ) { |
| 439 | 439 | $contactInfo = $event->getContactInfo(); |
| 440 | 440 | |
| 441 | - $notForReservations = function ($item) { |
|
| 441 | + $notForReservations = function($item) { |
|
| 442 | 442 | /** @var \CultureFeed_Cdb_Data_Url|\CultureFeed_Cdb_Data_Phone|\CultureFeed_Cdb_Data_Mail $item */ |
| 443 | 443 | return !$item->isForReservations(); |
| 444 | 444 | }; |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | |
| 451 | 451 | if (!empty($emails)) { |
| 452 | 452 | $contactPoint['email'] = array_map( |
| 453 | - function (\CultureFeed_Cdb_Data_Mail $email) { |
|
| 453 | + function(\CultureFeed_Cdb_Data_Mail $email) { |
|
| 454 | 454 | return $email->getMailAddress(); |
| 455 | 455 | }, |
| 456 | 456 | $emails |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | |
| 463 | 463 | if (!empty($phones)) { |
| 464 | 464 | $contactPoint['phone'] = array_map( |
| 465 | - function (\CultureFeed_Cdb_Data_phone $phone) { |
|
| 465 | + function(\CultureFeed_Cdb_Data_phone $phone) { |
|
| 466 | 466 | return $phone->getNumber(); |
| 467 | 467 | }, |
| 468 | 468 | $phones |
@@ -474,7 +474,7 @@ discard block |
||
| 474 | 474 | |
| 475 | 475 | if (!empty($urls)) { |
| 476 | 476 | $contactPoint['url'] = array_map( |
| 477 | - function (\CultureFeed_Cdb_Data_Url $url) { |
|
| 477 | + function(\CultureFeed_Cdb_Data_Url $url) { |
|
| 478 | 478 | return $url->getUrl(); |
| 479 | 479 | }, |
| 480 | 480 | $urls |
@@ -609,7 +609,7 @@ discard block |
||
| 609 | 609 | $slug = ''; |
| 610 | 610 | } |
| 611 | 611 | |
| 612 | - $reference = 'http://www.uitinvlaanderen.be/agenda/e/' . $slug . '/' . $event->getCdbId(); |
|
| 612 | + $reference = 'http://www.uitinvlaanderen.be/agenda/e/'.$slug.'/'.$event->getCdbId(); |
|
| 613 | 613 | |
| 614 | 614 | |
| 615 | 615 | if (!property_exists($jsonLD, 'sameAs')) { |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | public function filter($string) |
| 12 | 12 | { |
| 13 | 13 | if (!is_string($string)) { |
| 14 | - throw new \InvalidArgumentException('Argument should be string, got ' . gettype($string) . ' instead.'); |
|
| 14 | + throw new \InvalidArgumentException('Argument should be string, got '.gettype($string).' instead.'); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | return preg_replace("/(\\n)+/", " ", $string); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | public function filter($string) |
| 12 | 12 | { |
| 13 | 13 | if (!is_string($string)) { |
| 14 | - throw new \InvalidArgumentException('Argument should be string, got ' . gettype($string) . ' instead.'); |
|
| 14 | + throw new \InvalidArgumentException('Argument should be string, got '.gettype($string).' instead.'); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | return preg_replace("/(\\n)+/", " ", $string); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | public function filter($string) |
| 12 | 12 | { |
| 13 | 13 | if (!is_string($string)) { |
| 14 | - throw new \InvalidArgumentException('Argument should be string, got ' . gettype($string) . ' instead.'); |
|
| 14 | + throw new \InvalidArgumentException('Argument should be string, got '.gettype($string).' instead.'); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | return preg_replace("/(\\n)+/", " ", $string); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * OpeningHours constructor. |
| 16 | - * @param OpeningHour[]|null $openingHours |
|
| 16 | + * @param OpeningHour[] $openingHours |
|
| 17 | 17 | */ |
| 18 | 18 | public function __construct(array $openingHours = null) |
| 19 | 19 | { |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace CultuurNet\UDB3; |
| 4 | 4 | |
| 5 | -use ValueObjects\DateTime\WeekDay; |
|
| 6 | - |
|
| 7 | 5 | class OpeningHours |
| 8 | 6 | { |
| 9 | 7 | /** |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | public function filter($string) |
| 12 | 12 | { |
| 13 | 13 | if (!is_string($string)) { |
| 14 | - throw new \InvalidArgumentException('Argument should be string, got ' . gettype($string) . ' instead.'); |
|
| 14 | + throw new \InvalidArgumentException('Argument should be string, got '.gettype($string).' instead.'); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | return preg_replace("/(\\n)+/", " ", $string); |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | |
| 186 | 186 | foreach ($labelCollection->asArray() as $label) { |
| 187 | 187 | $this->writeRepository->save( |
| 188 | - new LabelName((string) $label), |
|
| 188 | + new LabelName((string)$label), |
|
| 189 | 189 | $relationType, |
| 190 | 190 | $relationId |
| 191 | 191 | ); |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | { |
| 201 | 201 | $labelRelation = null; |
| 202 | 202 | |
| 203 | - $labelName = new LabelName((string) $labelEvent->getLabel()); |
|
| 203 | + $labelName = new LabelName((string)$labelEvent->getLabel()); |
|
| 204 | 204 | $relationType = $this->offerTypeResolver->getRelationType($labelEvent); |
| 205 | 205 | $relationId = new StringLiteral($labelEvent->getItemId()); |
| 206 | 206 | |
@@ -15,13 +15,13 @@ |
||
| 15 | 15 | ); |
| 16 | 16 | |
| 17 | 17 | $visibleLabels = $labelCollection->filter( |
| 18 | - function (Label $label) { |
|
| 18 | + function(Label $label) { |
|
| 19 | 19 | return $label->isVisible(); |
| 20 | 20 | } |
| 21 | 21 | )->toStrings(); |
| 22 | 22 | |
| 23 | 23 | $hiddenLabels = $labelCollection->filter( |
| 24 | - function (Label $label) { |
|
| 24 | + function(Label $label) { |
|
| 25 | 25 | return !$label->isVisible(); |
| 26 | 26 | } |
| 27 | 27 | )->toStrings(); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 67 | 67 | 'CultuurNet\UDB3\UsedKeywordsMemory\Created', |
| 68 | - function (array $serializedObject) { |
|
| 68 | + function(array $serializedObject) { |
|
| 69 | 69 | $serializedObject['class'] = UsedLabelsMemoryCreated::class; |
| 70 | 70 | |
| 71 | 71 | return $serializedObject; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 76 | 76 | 'CultuurNet\UDB3\UsedKeywordsMemory\KeywordUsed', |
| 77 | - function (array $serializedObject) { |
|
| 77 | + function(array $serializedObject) { |
|
| 78 | 78 | $serializedObject['class'] = LabelUsed::class; |
| 79 | 79 | |
| 80 | 80 | $serializedObject = self::replaceKeywordWithLabel($serializedObject); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 91 | 91 | 'CultuurNet\UDB3\Event\TitleTranslated', |
| 92 | - function (array $serializedObject) { |
|
| 92 | + function(array $serializedObject) { |
|
| 93 | 93 | $serializedObject['class'] = TitleTranslated::class; |
| 94 | 94 | |
| 95 | 95 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 102 | 102 | 'CultuurNet\UDB3\Event\DescriptionTranslated', |
| 103 | - function (array $serializedObject) { |
|
| 103 | + function(array $serializedObject) { |
|
| 104 | 104 | $serializedObject['class'] = DescriptionTranslated::class; |
| 105 | 105 | |
| 106 | 106 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -115,49 +115,49 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 117 | 117 | 'CultuurNet\UDB3\Label\Events\MadeInvisible', |
| 118 | - function (array $serializedObject) use ($labelRepository) { |
|
| 118 | + function(array $serializedObject) use ($labelRepository) { |
|
| 119 | 119 | return self::addLabelName($serializedObject, $labelRepository); |
| 120 | 120 | } |
| 121 | 121 | ); |
| 122 | 122 | |
| 123 | 123 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 124 | 124 | 'CultuurNet\UDB3\Label\Events\MadeVisible', |
| 125 | - function (array $serializedObject) use ($labelRepository) { |
|
| 125 | + function(array $serializedObject) use ($labelRepository) { |
|
| 126 | 126 | return self::addLabelName($serializedObject, $labelRepository); |
| 127 | 127 | } |
| 128 | 128 | ); |
| 129 | 129 | |
| 130 | 130 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 131 | 131 | 'CultuurNet\UDB3\Label\Events\MadePrivate', |
| 132 | - function (array $serializedObject) use ($labelRepository) { |
|
| 132 | + function(array $serializedObject) use ($labelRepository) { |
|
| 133 | 133 | return self::addLabelName($serializedObject, $labelRepository); |
| 134 | 134 | } |
| 135 | 135 | ); |
| 136 | 136 | |
| 137 | 137 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 138 | 138 | 'CultuurNet\UDB3\Label\Events\MadePublic', |
| 139 | - function (array $serializedObject) use ($labelRepository) { |
|
| 139 | + function(array $serializedObject) use ($labelRepository) { |
|
| 140 | 140 | return self::addLabelName($serializedObject, $labelRepository); |
| 141 | 141 | } |
| 142 | 142 | ); |
| 143 | 143 | |
| 144 | 144 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 145 | 145 | 'CultuurNet\UDB3\Organizer\Events\LabelAdded', |
| 146 | - function (array $serializedObject) use ($labelRepository) { |
|
| 146 | + function(array $serializedObject) use ($labelRepository) { |
|
| 147 | 147 | return self::fixOrganizerLabelEvent($serializedObject, $labelRepository); |
| 148 | 148 | } |
| 149 | 149 | ); |
| 150 | 150 | |
| 151 | 151 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 152 | 152 | 'CultuurNet\UDB3\Organizer\Events\LabelRemoved', |
| 153 | - function (array $serializedObject) use ($labelRepository) { |
|
| 153 | + function(array $serializedObject) use ($labelRepository) { |
|
| 154 | 154 | return self::fixOrganizerLabelEvent($serializedObject, $labelRepository); |
| 155 | 155 | } |
| 156 | 156 | ); |
| 157 | 157 | |
| 158 | 158 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 159 | 159 | 'CultuurNet\UDB3\Event\Events\EventWasLabelled', |
| 160 | - function (array $serializedObject) { |
|
| 160 | + function(array $serializedObject) { |
|
| 161 | 161 | $serializedObject['class'] = LabelAdded::class; |
| 162 | 162 | |
| 163 | 163 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 170 | 170 | 'CultuurNet\UDB3\Event\EventWasTagged', |
| 171 | - function (array $serializedObject) { |
|
| 171 | + function(array $serializedObject) { |
|
| 172 | 172 | $serializedObject['class'] = LabelAdded::class; |
| 173 | 173 | |
| 174 | 174 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | |
| 182 | 182 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 183 | 183 | 'CultuurNet\UDB3\Event\TagErased', |
| 184 | - function (array $serializedObject) { |
|
| 184 | + function(array $serializedObject) { |
|
| 185 | 185 | $serializedObject['class'] = LabelRemoved::class; |
| 186 | 186 | |
| 187 | 187 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | |
| 195 | 195 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 196 | 196 | 'CultuurNet\UDB3\Event\Events\Unlabelled', |
| 197 | - function (array $serializedObject) { |
|
| 197 | + function(array $serializedObject) { |
|
| 198 | 198 | $serializedObject['class'] = LabelRemoved::class; |
| 199 | 199 | |
| 200 | 200 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | |
| 210 | 210 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 211 | 211 | 'CultuurNet\UDB3\Event\EventImportedFromUDB2', |
| 212 | - function (array $serializedObject) { |
|
| 212 | + function(array $serializedObject) { |
|
| 213 | 213 | $serializedObject['class'] = EventImportedFromUDB2::class; |
| 214 | 214 | |
| 215 | 215 | return $serializedObject; |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | foreach ($refactoredEventEvents as $refactoredEventEvent) { |
| 235 | 235 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 236 | 236 | $refactoredEventEvent, |
| 237 | - function (array $serializedObject) { |
|
| 237 | + function(array $serializedObject) { |
|
| 238 | 238 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
| 239 | 239 | return $serializedObject; |
| 240 | 240 | } |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | foreach ($refactoredPlaceEvents as $refactoredPlaceEvent) { |
| 259 | 259 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 260 | 260 | $refactoredPlaceEvent, |
| 261 | - function (array $serializedObject) { |
|
| 261 | + function(array $serializedObject) { |
|
| 262 | 262 | $serializedObject = self::replacePlaceIdWithItemId($serializedObject); |
| 263 | 263 | return $serializedObject; |
| 264 | 264 | } |