Completed
Pull Request — master (#452)
by
unknown
03:12
created
src/Place/CannotMarkPlaceAsCanonical.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
8 8
 {
9 9
     public static function becauseItIsDeleted(string $placeId): self
10 10
     {
11
-        return new static('Cannot mark place ' . $placeId . ' as canonical because it is deleted');
11
+        return new static('Cannot mark place '.$placeId.' as canonical because it is deleted');
12 12
     }
13 13
 
14 14
     public static function becauseItIsAlreadyADuplicate(string $placeId): self
15 15
     {
16
-        return new static('Cannot mark place ' . $placeId . ' as canonical because it is a duplicate');
16
+        return new static('Cannot mark place '.$placeId.' as canonical because it is a duplicate');
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Offer/Offer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         $sameFacilities = array_uintersect(
222 222
             $facilities1,
223 223
             $facilities2,
224
-            function (Facility $facility1, Facility $facility2) {
224
+            function(Facility $facility1, Facility $facility2) {
225 225
                 return strcmp($facility1->getId(), $facility2->getId());
226 226
             }
227 227
         );
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
      */
271 271
     public function importLabels(Labels $labels, Labels $labelsToKeepIfAlreadyOnOffer, Labels $labelsToRemoveWhenOnOffer)
272 272
     {
273
-        $convertLabelClass = function (\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
273
+        $convertLabelClass = function(\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
274 274
             return new Label(
275 275
                 $label->getName()->toString(),
276 276
                 $label->isVisible()
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
         foreach ($addedLabels->asArray() as $addedLabel) {
307 307
             $importLabels = $importLabels->with(
308 308
                 new \CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label(
309
-                    new LabelName((string) $addedLabel),
309
+                    new LabelName((string)$addedLabel),
310 310
                     $addedLabel->isVisible()
311 311
                 )
312 312
             );
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
         $importImages = $imageCollection->toArray();
708 708
         $currentImages = $currentImageCollection->toArray();
709 709
 
710
-        $compareImages = function (Image $a, Image $b) {
710
+        $compareImages = function(Image $a, Image $b) {
711 711
             $idA = $a->getMediaObjectId()->toNative();
712 712
             $idB = $b->getMediaObjectId()->toNative();
713 713
             return strcmp($idA, $idB);
@@ -854,7 +854,7 @@  discard block
 block discarded – undo
854 854
             if ($this->rejectedReason && $reason->sameValueAs($this->rejectedReason)) {
855 855
                 return true; // nothing left to do if the offer has already been rejected for the same reason
856 856
             } else {
857
-                throw new Exception('The offer has already been rejected for another reason: ' . $this->rejectedReason);
857
+                throw new Exception('The offer has already been rejected for another reason: '.$this->rejectedReason);
858 858
             }
859 859
         }
860 860
 
@@ -1032,7 +1032,7 @@  discard block
 block discarded – undo
1032 1032
         $dutchImagesList = $imagesEvent->getImages()->toArray();
1033 1033
         $translatedImagesList = array_filter(
1034 1034
             $this->images->toArray(),
1035
-            function (Image $image) {
1035
+            function(Image $image) {
1036 1036
                 return $image->getLanguage()->getCode() !== 'nl';
1037 1037
             }
1038 1038
         );
Please login to merge, or discard this patch.
src/Search/ResultsGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
             $total = $results->getTotalItems()->toNative();
110 110
 
111
-            $this->logger->info('Search API reported ' . $total . ' results');
111
+            $this->logger->info('Search API reported '.$total.' results');
112 112
 
113 113
             foreach ($results->getItems() as $item) {
114 114
                 $id = $item->getId();
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                         'query_duplicate_event',
124 124
                         array(
125 125
                             'query' => $query,
126
-                            'error' => "Found duplicate offer {$id} on page {$currentPage}, " .
126
+                            'error' => "Found duplicate offer {$id} on page {$currentPage}, ".
127 127
                                 "occurred first time on page {$ids[$id]}.",
128 128
                         )
129 129
                     );
Please login to merge, or discard this patch.
src/Event/LocationMarkedAsDuplicateProcessManager.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             if (!$result->getType()->sameValueAs(OfferType::EVENT())) {
76 76
                 $skipped[] = $result->getId();
77 77
                 $this->logger->warning(
78
-                    'Skipped result with id ' . $result->getId() . ' because it\'s not an event according to the @id parser.'
78
+                    'Skipped result with id '.$result->getId().' because it\'s not an event according to the @id parser.'
79 79
                 );
80 80
                 continue;
81 81
             }
@@ -89,17 +89,17 @@  discard block
 block discarded – undo
89 89
             $this->commandBus->dispatch($command);
90 90
 
91 91
             $this->logger->info(
92
-                'Dispatched UpdateLocation for result with id ' . $command->getItemId()
92
+                'Dispatched UpdateLocation for result with id '.$command->getItemId()
93 93
             );
94 94
         }
95 95
 
96 96
         $updated = count($commands);
97 97
         $total = $updated + count($skipped);
98 98
 
99
-        $this->logger->info('Received ' . $total . ' results from the search api.');
100
-        $this->logger->info('Updated ' . $updated . ' events to the canonical location.');
99
+        $this->logger->info('Received '.$total.' results from the search api.');
100
+        $this->logger->info('Updated '.$updated.' events to the canonical location.');
101 101
         $this->logger->info(
102
-            'Skipped ' . count($skipped) . ' events:' . PHP_EOL . implode(PHP_EOL, $skipped)
102
+            'Skipped '.count($skipped).' events:'.PHP_EOL.implode(PHP_EOL, $skipped)
103 103
         );
104 104
     }
105 105
 }
Please login to merge, or discard this patch.
src/Offer/OfferCommandHandler.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use CultuurNet\UDB3\Offer\Commands\AbstractAddLabel;
13 13
 use CultuurNet\UDB3\Offer\Commands\AbstractDeleteCurrentOrganizer;
14 14
 use CultuurNet\UDB3\Offer\Commands\AbstractImportLabels;
15
-use CultuurNet\UDB3\Offer\Commands\AbstractLabelCommand;
16 15
 use CultuurNet\UDB3\Offer\Commands\AbstractRemoveLabel;
17 16
 use CultuurNet\UDB3\Offer\Commands\AbstractDeleteOffer;
18 17
 use CultuurNet\UDB3\Offer\Commands\AbstractDeleteOrganizer;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             $matches = [];
110 110
             if (preg_match('/^handle(.+)$/', $method, $matches)) {
111 111
                 $command = $matches[1];
112
-                $classNameMethod = 'get' . $command . 'ClassName';
112
+                $classNameMethod = 'get'.$command.'ClassName';
113 113
 
114 114
                 if (method_exists($this, $classNameMethod)) {
115 115
                     $commandFullClassName = call_user_func(array($this, $classNameMethod));
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
     {
305 305
         $offer = $this->load($addLabel->getItemId());
306 306
 
307
-        $labelName = (string) $addLabel->getLabel();
307
+        $labelName = (string)$addLabel->getLabel();
308 308
         $labelVisibility = $addLabel->getLabel()->isVisible();
309 309
 
310 310
         // Load the label read model so we can determine the correct visibility.
Please login to merge, or discard this patch.
src/Search/Sapi3SearchService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
         $offerRequest = new Request(
82 82
             'GET',
83
-            (string) $offerQuery,
83
+            (string)$offerQuery,
84 84
             $headers
85 85
         );
86 86
 
@@ -89,14 +89,14 @@  discard block
 block discarded – undo
89 89
             ->getBody()
90 90
             ->getContents();
91 91
 
92
-        $this->logger->debug('Send SAPI3 request with the following parameters: ' . json_encode($queryParameters));
93
-        $this->logger->debug('Response data: ' . $searchResponseData);
92
+        $this->logger->debug('Send SAPI3 request with the following parameters: '.json_encode($queryParameters));
93
+        $this->logger->debug('Response data: '.$searchResponseData);
94 94
 
95 95
         $searchResponseData = json_decode($searchResponseData);
96 96
 
97 97
         $offerIds = array_reduce(
98 98
             $searchResponseData->{'member'},
99
-            function (OfferIdentifierCollection $offerIds, $item) {
99
+            function(OfferIdentifierCollection $offerIds, $item) {
100 100
                 return $offerIds->with(
101 101
                     $this->offerIdentifier->fromIri(Url::fromNative($item->{'@id'}))
102 102
                 );
Please login to merge, or discard this patch.
src/UiTID/CdbXmlCreatedByToUserIdResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             return $createdByIdentifier;
41 41
         } catch (InvalidNativeArgumentException $exception) {
42 42
             $this->logger->info(
43
-                'The provided createdByIdentifier ' . $createdByIdentifier->toNative() . ' is not a UUID.',
43
+                'The provided createdByIdentifier '.$createdByIdentifier->toNative().' is not a UUID.',
44 44
                 [
45 45
                     'exception' => $exception,
46 46
                 ]
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         }
79 79
 
80 80
         $this->logger->warning(
81
-            'Unable to find user with identifier ' . $createdByIdentifier
81
+            'Unable to find user with identifier '.$createdByIdentifier
82 82
         );
83 83
 
84 84
         return null;
Please login to merge, or discard this patch.