@@ -63,34 +63,34 @@ |
||
63 | 63 | $userRolesSubQuery = $this->connection->createQueryBuilder() |
64 | 64 | ->select(PermissionsSchemaConfigurator::ROLE_ID_COLUMN) |
65 | 65 | ->from($this->userRolesTableName->toNative()) |
66 | - ->where(PermissionsSchemaConfigurator::USER_ID_COLUMN . ' = :userId'); |
|
66 | + ->where(PermissionsSchemaConfigurator::USER_ID_COLUMN.' = :userId'); |
|
67 | 67 | |
68 | 68 | $queryBuilder = $this->connection->createQueryBuilder(); |
69 | 69 | $userConstraintsQuery = $queryBuilder |
70 | - ->select('rs.' . SearchSchemaConfigurator::CONSTRAINT_COLUMN) |
|
70 | + ->select('rs.'.SearchSchemaConfigurator::CONSTRAINT_COLUMN) |
|
71 | 71 | ->from($this->rolesSearchTableName, 'rs') |
72 | 72 | ->innerJoin( |
73 | 73 | 'rs', |
74 | 74 | sprintf('(%s)', $userRolesSubQuery->getSQL()), |
75 | 75 | 'ur', |
76 | - 'rs.' . SearchSchemaConfigurator::UUID_COLUMN . ' = ur.' . PermissionsSchemaConfigurator::ROLE_ID_COLUMN |
|
76 | + 'rs.'.SearchSchemaConfigurator::UUID_COLUMN.' = ur.'.PermissionsSchemaConfigurator::ROLE_ID_COLUMN |
|
77 | 77 | ) |
78 | 78 | ->innerJoin( |
79 | 79 | 'rs', |
80 | 80 | $this->rolePermissionsTableName->toNative(), |
81 | 81 | 'rp', |
82 | - 'rs.' . SearchSchemaConfigurator::UUID_COLUMN . ' = rp.' . PermissionsSchemaConfigurator::ROLE_ID_COLUMN |
|
82 | + 'rs.'.SearchSchemaConfigurator::UUID_COLUMN.' = rp.'.PermissionsSchemaConfigurator::ROLE_ID_COLUMN |
|
83 | 83 | ) |
84 | - ->where(PermissionsSchemaConfigurator::PERMISSION_COLUMN . ' = :permission') |
|
84 | + ->where(PermissionsSchemaConfigurator::PERMISSION_COLUMN.' = :permission') |
|
85 | 85 | ->andWhere($queryBuilder->expr()->isNotNull( |
86 | - 'rs.' . SearchSchemaConfigurator::CONSTRAINT_COLUMN |
|
86 | + 'rs.'.SearchSchemaConfigurator::CONSTRAINT_COLUMN |
|
87 | 87 | )) |
88 | 88 | ->setParameter('userId', $userId->toNative()) |
89 | 89 | ->setParameter('permission', $permission->toNative()); |
90 | 90 | |
91 | 91 | $results = $userConstraintsQuery->execute()->fetchAll(\PDO::FETCH_COLUMN); |
92 | 92 | |
93 | - return array_map(function ($constraint) { |
|
93 | + return array_map(function($constraint) { |
|
94 | 94 | return new StringLiteral($constraint); |
95 | 95 | }, $results); |
96 | 96 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
27 | - * @return StringLiteral |
|
27 | + * @return string |
|
28 | 28 | */ |
29 | 29 | public function getTitle() |
30 | 30 | { |
@@ -24,7 +24,7 @@ |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
27 | - * @return StringLiteral |
|
27 | + * @return string |
|
28 | 28 | */ |
29 | 29 | public function getTitle() |
30 | 30 | { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | EventExportResult $eventExportResult |
14 | 14 | ) { |
15 | 15 | $url = $eventExportResult->getUrl(); |
16 | - return '<p>Beste, <br /><br />Hierbij vind je de link naar de door jou geëxporteerde documenten uit UiTdatabank: <a href="' . $url . '">' . $url . '</a><br /><br /> |
|
16 | + return '<p>Beste, <br /><br />Hierbij vind je de link naar de door jou geëxporteerde documenten uit UiTdatabank: <a href="'.$url.'">'.$url.'</a><br /><br /> |
|
17 | 17 | Mocht je vragen hebben, of meer informatie wensen over onze diensten, kan je terecht bij [email protected].<br /><br /> |
18 | 18 | Met vriendelijke groeten,<br />Het UiTdatabank team</p>'; |
19 | 19 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | return 'Beste, |
16 | 16 | |
17 | - Hierbij vind je de link naar de door jou geëxporteerde documenten uit UiTdatabank: ' . $eventExportResult->getUrl() . ' |
|
17 | + Hierbij vind je de link naar de door jou geëxporteerde documenten uit UiTdatabank: ' . $eventExportResult->getUrl().' |
|
18 | 18 | |
19 | 19 | Mocht je vragen hebben, of meer informatie wensen over onze diensten, kan je terecht bij [email protected]. |
20 | 20 |
@@ -624,7 +624,7 @@ |
||
624 | 624 | } |
625 | 625 | |
626 | 626 | /** |
627 | - * @return callable |
|
627 | + * @return \Closure |
|
628 | 628 | */ |
629 | 629 | private function reject() |
630 | 630 | { |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | if (preg_match('/^apply(.+)$/', $method, $matches)) { |
144 | 144 | $event = $matches[1]; |
145 | - $classNameMethod = 'get' . $event . 'ClassName'; |
|
145 | + $classNameMethod = 'get'.$event.'ClassName'; |
|
146 | 146 | |
147 | 147 | if (method_exists($this, $classNameMethod)) { |
148 | 148 | $eventFullClassName = call_user_func(array($this, $classNameMethod)); |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $labelsProperty = $labelAdded->getLabel()->isVisible() ? 'labels' : 'hiddenLabels'; |
273 | 273 | |
274 | 274 | $labels = isset($offerLd->{$labelsProperty}) ? $offerLd->{$labelsProperty} : []; |
275 | - $label = (string) $labelAdded->getLabel(); |
|
275 | + $label = (string)$labelAdded->getLabel(); |
|
276 | 276 | |
277 | 277 | $labels[] = $label; |
278 | 278 | $offerLd->{$labelsProperty} = array_unique($labels); |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | if (isset($offerLd->{$labelsProperty}) && is_array($offerLd->{$labelsProperty})) { |
298 | 298 | $offerLd->{$labelsProperty} = array_filter( |
299 | 299 | $offerLd->{$labelsProperty}, |
300 | - function ($label) use ($labelRemoved) { |
|
300 | + function($label) use ($labelRemoved) { |
|
301 | 301 | return !$labelRemoved->getLabel()->equals( |
302 | 302 | new Label($label) |
303 | 303 | ); |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | return; |
395 | 395 | } |
396 | 396 | |
397 | - $imageId = (string) $imageRemoved->getImage()->getMediaObjectId(); |
|
397 | + $imageId = (string)$imageRemoved->getImage()->getMediaObjectId(); |
|
398 | 398 | |
399 | 399 | /** |
400 | 400 | * Matches any object that is not the removed image. |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | * @return bool |
406 | 406 | * Returns true when the media object does not match the image to remove. |
407 | 407 | */ |
408 | - $shouldNotBeRemoved = function ($mediaObject) use ($imageId) { |
|
408 | + $shouldNotBeRemoved = function($mediaObject) use ($imageId) { |
|
409 | 409 | $containsId = !!strpos($mediaObject->{'@id'}, $imageId); |
410 | 410 | return !$containsId; |
411 | 411 | }; |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | $document = $this->loadDocumentFromRepository($mainImageSelected); |
444 | 444 | $offerLd = $document->getBody(); |
445 | 445 | $imageId = $mainImageSelected->getImage()->getMediaObjectId(); |
446 | - $mediaObjectMatcher = function ($matchingMediaObject, $currentMediaObject) use ($imageId) { |
|
446 | + $mediaObjectMatcher = function($matchingMediaObject, $currentMediaObject) use ($imageId) { |
|
447 | 447 | if (!$matchingMediaObject && $this->mediaObjectMatchesId($currentMediaObject, $imageId)) { |
448 | 448 | $matchingMediaObject = $currentMediaObject; |
449 | 449 | } |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | */ |
469 | 469 | protected function mediaObjectMatchesId($mediaObject, UUID $mediaObjectId) |
470 | 470 | { |
471 | - return strpos($mediaObject->{'@id'}, (string) $mediaObjectId) > 0; |
|
471 | + return strpos($mediaObject->{'@id'}, (string)$mediaObjectId) > 0; |
|
472 | 472 | } |
473 | 473 | |
474 | 474 | /** |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | */ |
650 | 650 | protected function applyPublished(AbstractPublished $published) |
651 | 651 | { |
652 | - $this->applyEventTransformation($published, function ($offerLd) use ($published) { |
|
652 | + $this->applyEventTransformation($published, function($offerLd) use ($published) { |
|
653 | 653 | $offerLd->workflowStatus = WorkflowStatus::READY_FOR_VALIDATION()->getName(); |
654 | 654 | |
655 | 655 | $publicationDate = $published->getPublicationDate(); |
@@ -662,7 +662,7 @@ discard block |
||
662 | 662 | */ |
663 | 663 | protected function applyApproved(AbstractApproved $approved) |
664 | 664 | { |
665 | - $this->applyEventTransformation($approved, function ($offerLd) { |
|
665 | + $this->applyEventTransformation($approved, function($offerLd) { |
|
666 | 666 | $offerLd->workflowStatus = WorkflowStatus::APPROVED()->getName(); |
667 | 667 | }); |
668 | 668 | } |
@@ -698,7 +698,7 @@ discard block |
||
698 | 698 | */ |
699 | 699 | private function reject() |
700 | 700 | { |
701 | - return function ($offerLd) { |
|
701 | + return function($offerLd) { |
|
702 | 702 | $offerLd->workflowStatus = WorkflowStatus::REJECTED()->getName(); |
703 | 703 | }; |
704 | 704 | } |
@@ -12,7 +12,6 @@ |
||
12 | 12 | use CultuurNet\UDB3\EntityServiceInterface; |
13 | 13 | use CultuurNet\UDB3\Event\ReadModel\DocumentRepositoryInterface; |
14 | 14 | use CultuurNet\UDB3\Event\ReadModel\JSONLD\CdbXMLImporter; |
15 | -use CultuurNet\UDB3\Event\ReadModel\JSONLD\CdbXMLLongDescriptionFilter; |
|
16 | 15 | use CultuurNet\UDB3\Event\ReadModel\JSONLD\OrganizerServiceInterface; |
17 | 16 | use CultuurNet\UDB3\EventHandling\DelegateEventHandlingToSpecificMethodTrait; |
18 | 17 | use CultuurNet\UDB3\Iri\IriGeneratorInterface; |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | { |
258 | 258 | $equalImages = array_filter( |
259 | 259 | $this->mediaObjects, |
260 | - function ($existingMediaObjectId) use ($image) { |
|
260 | + function($existingMediaObjectId) use ($image) { |
|
261 | 261 | return $image |
262 | 262 | ->getMediaObjectId() |
263 | 263 | ->sameValueAs($existingMediaObjectId); |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | if ($this->rejectedReason && $reason->sameValueAs($this->rejectedReason)) { |
382 | 382 | return true; // nothing left to do if the offer has already been rejected for the same reason |
383 | 383 | } else { |
384 | - throw new Exception('The offer has already been rejected for another reason: ' . $this->rejectedReason); |
|
384 | + throw new Exception('The offer has already been rejected for another reason: '.$this->rejectedReason); |
|
385 | 385 | } |
386 | 386 | } |
387 | 387 |
@@ -26,10 +26,10 @@ |
||
26 | 26 | StringLiteral $userId, |
27 | 27 | AuthorizableCommandInterface $command |
28 | 28 | ) { |
29 | - parent::__construct('User with id: ' . $userId->toNative() . |
|
30 | - ' has no permission: "' . $command->getPermission()->toNative() . |
|
31 | - '" on item: ' . $command->getItemId() . |
|
32 | - ' when executing command: ' . get_class($command)); |
|
29 | + parent::__construct('User with id: '.$userId->toNative(). |
|
30 | + ' has no permission: "'.$command->getPermission()->toNative(). |
|
31 | + '" on item: '.$command->getItemId(). |
|
32 | + ' when executing command: '.get_class($command)); |
|
33 | 33 | |
34 | 34 | $this->userId = $userId; |
35 | 35 | $this->command = $command; |
@@ -66,9 +66,9 @@ |
||
66 | 66 | public function serialize() |
67 | 67 | { |
68 | 68 | return [ |
69 | - 'cdbid' => $this->cdbid, |
|
70 | - 'name' => $this->name->toNative(), |
|
71 | - 'address' => $this->address->serialize() |
|
69 | + 'cdbid' => $this->cdbid, |
|
70 | + 'name' => $this->name->toNative(), |
|
71 | + 'address' => $this->address->serialize() |
|
72 | 72 | ]; |
73 | 73 | } |
74 | 74 |