@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | $offerRequest = new Request( |
| 74 | 74 | 'GET', |
| 75 | - (string) $offerQuery, |
|
| 75 | + (string)$offerQuery, |
|
| 76 | 76 | $headers |
| 77 | 77 | ); |
| 78 | 78 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | $offerIds = array_reduce( |
| 85 | 85 | $searchResponseData->{'member'}, |
| 86 | - function (OfferIdentifierCollection $offerIds, $item) { |
|
| 86 | + function(OfferIdentifierCollection $offerIds, $item) { |
|
| 87 | 87 | return $offerIds->with( |
| 88 | 88 | $this->offerIdentifier->fromIri(Url::fromNative($item->{'@id'})) |
| 89 | 89 | ); |
@@ -19,9 +19,9 @@ |
||
| 19 | 19 | StringLiteral $constraint, |
| 20 | 20 | StringLiteral $offerId |
| 21 | 21 | ) { |
| 22 | - $constraintStr = '(' . $constraint->toNative() . ')'; |
|
| 22 | + $constraintStr = '('.$constraint->toNative().')'; |
|
| 23 | 23 | $offerIdStr = $offerId->toNative(); |
| 24 | 24 | |
| 25 | - return '(' . $constraintStr . ' AND id:' . $offerIdStr . ')'; |
|
| 25 | + return '('.$constraintStr.' AND id:'.$offerIdStr.')'; |
|
| 26 | 26 | } |
| 27 | 27 | } |
@@ -15,9 +15,9 @@ |
||
| 15 | 15 | |
| 16 | 16 | $query = implode(' OR ', $queryParts); |
| 17 | 17 | if (count($queryParts) > 1) { |
| 18 | - $query = '(' . $query . ')'; |
|
| 18 | + $query = '('.$query.')'; |
|
| 19 | 19 | } |
| 20 | - $query = 'creator:' . $query; |
|
| 20 | + $query = 'creator:'.$query; |
|
| 21 | 21 | |
| 22 | 22 | parent::__construct($query); |
| 23 | 23 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $request = new Request( |
| 80 | 80 | 'GET', |
| 81 | - (string) $url, |
|
| 81 | + (string)$url, |
|
| 82 | 82 | $headers |
| 83 | 83 | ); |
| 84 | 84 | |
@@ -88,6 +88,6 @@ discard block |
||
| 88 | 88 | $response->getBody()->getContents() |
| 89 | 89 | ); |
| 90 | 90 | |
| 91 | - return (int) $decodedResponse->{'totalItems'}; |
|
| 91 | + return (int)$decodedResponse->{'totalItems'}; |
|
| 92 | 92 | } |
| 93 | 93 | } |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $sameFacilities = array_uintersect( |
| 217 | 217 | $facilities1, |
| 218 | 218 | $facilities2, |
| 219 | - function (Facility $facility1, Facility $facility2) { |
|
| 219 | + function(Facility $facility1, Facility $facility2) { |
|
| 220 | 220 | return strcmp($facility1->getId(), $facility2->getId()); |
| 221 | 221 | } |
| 222 | 222 | ); |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | */ |
| 266 | 266 | public function importLabels(Labels $labels, Labels $labelsToKeepIfAlreadyOnOffer) |
| 267 | 267 | { |
| 268 | - $convertLabelClass = function (\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) { |
|
| 268 | + $convertLabelClass = function(\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) { |
|
| 269 | 269 | return new Label( |
| 270 | 270 | $label->getName()->toString(), |
| 271 | 271 | $label->isVisible() |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | foreach ($addedLabels->asArray() as $addedLabel) { |
| 297 | 297 | $importLabels = $importLabels->with( |
| 298 | 298 | new \CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label( |
| 299 | - new LabelName((string) $addedLabel), |
|
| 299 | + new LabelName((string)$addedLabel), |
|
| 300 | 300 | $addedLabel->isVisible() |
| 301 | 301 | ) |
| 302 | 302 | ); |
@@ -697,7 +697,7 @@ discard block |
||
| 697 | 697 | $importImages = $imageCollection->toArray(); |
| 698 | 698 | $currentImages = $currentImageCollection->toArray(); |
| 699 | 699 | |
| 700 | - $compareImages = function (Image $a, Image $b) { |
|
| 700 | + $compareImages = function(Image $a, Image $b) { |
|
| 701 | 701 | $idA = $a->getMediaObjectId()->toNative(); |
| 702 | 702 | $idB = $b->getMediaObjectId()->toNative(); |
| 703 | 703 | return strcmp($idA, $idB); |
@@ -844,7 +844,7 @@ discard block |
||
| 844 | 844 | if ($this->rejectedReason && $reason->sameValueAs($this->rejectedReason)) { |
| 845 | 845 | return true; // nothing left to do if the offer has already been rejected for the same reason |
| 846 | 846 | } else { |
| 847 | - throw new Exception('The offer has already been rejected for another reason: ' . $this->rejectedReason); |
|
| 847 | + throw new Exception('The offer has already been rejected for another reason: '.$this->rejectedReason); |
|
| 848 | 848 | } |
| 849 | 849 | } |
| 850 | 850 | |
@@ -1022,7 +1022,7 @@ discard block |
||
| 1022 | 1022 | $dutchImagesList = $imagesEvent->getImages()->toArray(); |
| 1023 | 1023 | $translatedImagesList = array_filter( |
| 1024 | 1024 | $this->images->toArray(), |
| 1025 | - function (Image $image) { |
|
| 1025 | + function(Image $image) { |
|
| 1026 | 1026 | return $image->getLanguage()->getCode() !== 'nl'; |
| 1027 | 1027 | } |
| 1028 | 1028 | ); |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | */ |
| 260 | 260 | public function importLabels(Labels $labels, Labels $labelsToKeepIfAlreadyOnOrganizer) |
| 261 | 261 | { |
| 262 | - $convertLabelClass = function (\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) { |
|
| 262 | + $convertLabelClass = function(\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) { |
|
| 263 | 263 | return new Label( |
| 264 | 264 | $label->getName()->toString(), |
| 265 | 265 | $label->isVisible() |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | foreach ($addedLabels->asArray() as $addedLabel) { |
| 291 | 291 | $importLabels = $importLabels->with( |
| 292 | 292 | new \CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label( |
| 293 | - new LabelName((string) $addedLabel), |
|
| 293 | + new LabelName((string)$addedLabel), |
|
| 294 | 294 | $addedLabel->isVisible() |
| 295 | 295 | ) |
| 296 | 296 | ); |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | protected function applyOrganizerImportedFromUDB2( |
| 360 | 360 | OrganizerImportedFromUDB2 $organizerImported |
| 361 | 361 | ) { |
| 362 | - $this->actorId = (string) $organizerImported->getActorId(); |
|
| 362 | + $this->actorId = (string)$organizerImported->getActorId(); |
|
| 363 | 363 | |
| 364 | 364 | // On import from UDB2 the default main language is 'nl'. |
| 365 | 365 | $this->mainLanguage = new Language('nl'); |
@@ -48,14 +48,14 @@ discard block |
||
| 48 | 48 | public function getLabelsToImport() |
| 49 | 49 | { |
| 50 | 50 | $labelNamesToKeep = array_map( |
| 51 | - function (Label $label) { |
|
| 51 | + function(Label $label) { |
|
| 52 | 52 | return $label->getName(); |
| 53 | 53 | }, |
| 54 | 54 | $this->labelsToKeepIfAlreadyOnOffer->toArray() |
| 55 | 55 | ); |
| 56 | 56 | |
| 57 | 57 | return $this->labels->filter( |
| 58 | - function (Label $label) use ($labelNamesToKeep) { |
|
| 58 | + function(Label $label) use ($labelNamesToKeep) { |
|
| 59 | 59 | return !in_array($label->getName(), $labelNamesToKeep); |
| 60 | 60 | } |
| 61 | 61 | ); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | public function getNames() |
| 68 | 68 | { |
| 69 | 69 | return array_map( |
| 70 | - function (Label $label) { |
|
| 70 | + function(Label $label) { |
|
| 71 | 71 | return new StringLiteral($label->getName()->toString()); |
| 72 | 72 | }, |
| 73 | 73 | $this->getLabelsToImport()->toArray() |
@@ -52,14 +52,14 @@ discard block |
||
| 52 | 52 | public function getLabels() |
| 53 | 53 | { |
| 54 | 54 | $labelNamesToKeep = array_map( |
| 55 | - function (Label $label) { |
|
| 55 | + function(Label $label) { |
|
| 56 | 56 | return $label->getName(); |
| 57 | 57 | }, |
| 58 | 58 | $this->labelsToKeepIfAlreadyOnOrganizer->toArray() |
| 59 | 59 | ); |
| 60 | 60 | |
| 61 | 61 | return $this->labels->filter( |
| 62 | - function (Label $label) use ($labelNamesToKeep) { |
|
| 62 | + function(Label $label) use ($labelNamesToKeep) { |
|
| 63 | 63 | return !in_array($label->getName(), $labelNamesToKeep); |
| 64 | 64 | } |
| 65 | 65 | ); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | public function getNames() |
| 88 | 88 | { |
| 89 | 89 | return array_map( |
| 90 | - function (Label $label) { |
|
| 90 | + function(Label $label) { |
|
| 91 | 91 | return new StringLiteral($label->getName()->toString()); |
| 92 | 92 | }, |
| 93 | 93 | $this->getLabels()->toArray() |
@@ -128,7 +128,7 @@ |
||
| 128 | 128 | public function addLabel(string $organizerId, Label $label): void |
| 129 | 129 | { |
| 130 | 130 | $this->labelService->createLabelAggregateIfNew( |
| 131 | - new LabelName((string) $label), |
|
| 131 | + new LabelName((string)$label), |
|
| 132 | 132 | $label->isVisible() |
| 133 | 133 | ); |
| 134 | 134 | |