@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | { |
74 | 74 | $name = new StringLiteral($savedSearch->name); |
75 | 75 | $query = QueryString::fromURLQueryString($savedSearch->query); |
76 | - $id = new StringLiteral((string) $savedSearch->id); |
|
76 | + $id = new StringLiteral((string)$savedSearch->id); |
|
77 | 77 | |
78 | 78 | return new SavedSearch($name, $query, $id); |
79 | 79 | } |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function write(StringLiteral $userId, StringLiteral $name, QueryString $queryString): void |
85 | 85 | { |
86 | - $userId = (string) $userId; |
|
87 | - $name = (string) $name; |
|
86 | + $userId = (string)$userId; |
|
87 | + $name = (string)$name; |
|
88 | 88 | $query = $queryString->toURLQueryString(); |
89 | 89 | |
90 | 90 | $savedSearch = new \CultureFeed_SavedSearches_SavedSearch( |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | 'error' => $exception->getMessage(), |
105 | 105 | 'userId' => $userId, |
106 | 106 | 'name' => $name, |
107 | - 'query' => (string) $queryString, |
|
107 | + 'query' => (string)$queryString, |
|
108 | 108 | ] |
109 | 109 | ); |
110 | 110 | } |
@@ -116,8 +116,8 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function delete(StringLiteral $userId, StringLiteral $searchId): void |
118 | 118 | { |
119 | - $userId = (string) $userId; |
|
120 | - $searchId = (string) $searchId; |
|
119 | + $userId = (string)$userId; |
|
120 | + $searchId = (string)$searchId; |
|
121 | 121 | |
122 | 122 | try { |
123 | 123 | $this->savedSearches->unsubscribe($searchId, $userId); |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | ): void { |
91 | 91 | $queryBuilder = $this->connection->createQueryBuilder() |
92 | 92 | ->delete($this->tableName->toNative()) |
93 | - ->where(SchemaConfigurator::USER . ' = ?') |
|
94 | - ->andWhere(SchemaConfigurator::ID . ' = ?') |
|
93 | + ->where(SchemaConfigurator::USER.' = ?') |
|
94 | + ->andWhere(SchemaConfigurator::ID.' = ?') |
|
95 | 95 | ->setParameters( |
96 | 96 | [ |
97 | 97 | $userId->toNative(), |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $queryBuilder = $this->connection->createQueryBuilder() |
111 | 111 | ->select('*') |
112 | 112 | ->from($this->tableName->toNative()) |
113 | - ->where(SchemaConfigurator::USER . ' = ?') |
|
113 | + ->where(SchemaConfigurator::USER.' = ?') |
|
114 | 114 | ->setParameters( |
115 | 115 | [ |
116 | 116 | $this->userId->toNative(), |
@@ -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 = 'createdby:' . $query; |
|
20 | + $query = 'createdby:'.$query; |
|
21 | 21 | |
22 | 22 | parent::__construct($query); |
23 | 23 | } |
@@ -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'); |