Completed
Pull Request — master (#245)
by Luc
05:10
created
src/Role/ReadModel/Constraints/Doctrine/UserConstraintsReadRepository.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -63,34 +63,34 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Offer/Commands/AbstractTranslateTitle.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     }
25 25
 
26 26
     /**
27
-     * @return StringLiteral
27
+     * @return string
28 28
      */
29 29
     public function getTitle()
30 30
     {
Please login to merge, or discard this patch.
src/Offer/Commands/AbstractTranslateDescription.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     }
25 25
 
26 26
     /**
27
-     * @return StringLiteral
27
+     * @return string
28 28
      */
29 29
     public function getTitle()
30 30
     {
Please login to merge, or discard this patch.
src/EventExport/Notification/DefaultHTMLBodyFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/EventExport/Notification/DefaultPlainTextBodyFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Offer/ReadModel/JSONLD/OfferLDProjector.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -624,7 +624,7 @@
 block discarded – undo
624 624
     }
625 625
 
626 626
     /**
627
-     * @return callable
627
+     * @return \Closure
628 628
      */
629 629
     private function reject()
630 630
     {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
         if (isset($offerLd->{$labelsProperty}) && is_array($offerLd->{$labelsProperty})) {
296 296
             $offerLd->{$labelsProperty} = array_filter(
297 297
                 $offerLd->{$labelsProperty},
298
-                function ($label) use ($labelRemoved) {
298
+                function($label) use ($labelRemoved) {
299 299
                     return !$labelRemoved->getLabel()->equals(
300 300
                         new Label($label)
301 301
                     );
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
             return;
392 392
         }
393 393
 
394
-        $imageId = (string) $imageRemoved->getImage()->getMediaObjectId();
394
+        $imageId = (string)$imageRemoved->getImage()->getMediaObjectId();
395 395
 
396 396
         /**
397 397
          * Matches any object that is not the removed image.
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
          * @return bool
403 403
          *  Returns true when the media object does not match the image to remove.
404 404
          */
405
-        $shouldNotBeRemoved = function ($mediaObject) use ($imageId) {
405
+        $shouldNotBeRemoved = function($mediaObject) use ($imageId) {
406 406
             $containsId = !!strpos($mediaObject->{'@id'}, $imageId);
407 407
             return !$containsId;
408 408
         };
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
         $document = $this->loadDocumentFromRepository($mainImageSelected);
441 441
         $offerLd = $document->getBody();
442 442
         $imageId = $mainImageSelected->getImage()->getMediaObjectId();
443
-        $mediaObjectMatcher = function ($matchingMediaObject, $currentMediaObject) use ($imageId) {
443
+        $mediaObjectMatcher = function($matchingMediaObject, $currentMediaObject) use ($imageId) {
444 444
             if (!$matchingMediaObject && $this->mediaObjectMatchesId($currentMediaObject, $imageId)) {
445 445
                 $matchingMediaObject = $currentMediaObject;
446 446
             }
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
      */
466 466
     protected function mediaObjectMatchesId($mediaObject, UUID $mediaObjectId)
467 467
     {
468
-        return strpos($mediaObject->{'@id'}, (string) $mediaObjectId) > 0;
468
+        return strpos($mediaObject->{'@id'}, (string)$mediaObjectId) > 0;
469 469
     }
470 470
 
471 471
     /**
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
      */
647 647
     protected function applyPublished(AbstractPublished $published)
648 648
     {
649
-        $this->applyEventTransformation($published, function ($offerLd) use ($published) {
649
+        $this->applyEventTransformation($published, function($offerLd) use ($published) {
650 650
             $offerLd->workflowStatus = WorkflowStatus::READY_FOR_VALIDATION()->getName();
651 651
 
652 652
             $publicationDate = $published->getPublicationDate();
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
      */
660 660
     protected function applyApproved(AbstractApproved $approved)
661 661
     {
662
-        $this->applyEventTransformation($approved, function ($offerLd) {
662
+        $this->applyEventTransformation($approved, function($offerLd) {
663 663
             $offerLd->workflowStatus = WorkflowStatus::APPROVED()->getName();
664 664
         });
665 665
     }
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
      */
696 696
     private function reject()
697 697
     {
698
-        return function ($offerLd) {
698
+        return function($offerLd) {
699 699
             $offerLd->workflowStatus = WorkflowStatus::REJECTED()->getName();
700 700
         };
701 701
     }
Please login to merge, or discard this patch.
src/Offer/Offer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Security/CommandAuthorizationException.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Location/Location.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,9 +66,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.