@@ -221,7 +221,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | ); |
@@ -108,7 +108,7 @@ discard block |
||
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 |
||
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 | ); |
@@ -75,7 +75,7 @@ discard block |
||
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 |
||
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 | } |
@@ -12,7 +12,6 @@ |
||
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; |
@@ -109,7 +109,7 @@ discard block |
||
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 |
||
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. |
@@ -80,7 +80,7 @@ discard block |
||
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 |
||
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 | ); |
@@ -26,14 +26,14 @@ discard block |
||
26 | 26 | if ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_PeriodList) { |
27 | 27 | /** @var \CultureFeed_Cdb_Data_Calendar_Period $period */ |
28 | 28 | $period = $cdbCalendar->current(); |
29 | - $startDateString = $period->getDateFrom() . 'T00:00:00'; |
|
29 | + $startDateString = $period->getDateFrom().'T00:00:00'; |
|
30 | 30 | } elseif ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_TimestampList) { |
31 | 31 | /** @var \CultureFeed_Cdb_Data_Calendar_Timestamp $timestamp */ |
32 | 32 | $timestamp = $cdbCalendar->current(); |
33 | 33 | if ($timestamp->getStartTime()) { |
34 | - $startDateString = $timestamp->getDate() . 'T' . substr($timestamp->getStartTime(), 0, 5) . ':00'; |
|
34 | + $startDateString = $timestamp->getDate().'T'.substr($timestamp->getStartTime(), 0, 5).':00'; |
|
35 | 35 | } else { |
36 | - $startDateString = $timestamp->getDate() . 'T00:00:00'; |
|
36 | + $startDateString = $timestamp->getDate().'T00:00:00'; |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | $startDate = !empty($startDateString) ? DateTimeFactory::dateTimeFromDateString($startDateString) : null; |
@@ -46,17 +46,17 @@ discard block |
||
46 | 46 | if ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_PeriodList) { |
47 | 47 | /** @var \CultureFeed_Cdb_Data_Calendar_Period $period */ |
48 | 48 | $period = $cdbCalendar->current(); |
49 | - $endDateString = $period->getDateTo() . 'T00:00:00'; |
|
49 | + $endDateString = $period->getDateTo().'T00:00:00'; |
|
50 | 50 | } elseif ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_TimestampList) { |
51 | 51 | $firstTimestamp = $cdbCalendar->current(); |
52 | 52 | /** @var \CultureFeed_Cdb_Data_Calendar_Timestamp $timestamp */ |
53 | 53 | $cdbCalendarAsArray = iterator_to_array($cdbCalendar); |
54 | 54 | $timestamp = $this->getLastTimestamp($cdbCalendarAsArray, $firstTimestamp); |
55 | 55 | if ($timestamp->getEndTime()) { |
56 | - $endDateString = $timestamp->getDate() . 'T' . $timestamp->getEndTime(); |
|
56 | + $endDateString = $timestamp->getDate().'T'.$timestamp->getEndTime(); |
|
57 | 57 | } else { |
58 | 58 | $endTime = $timestamp->getStartTime() ? $timestamp->getStartTime() : '00:00:00'; |
59 | - $endDateString = $timestamp->getDate() . 'T' . $endTime; |
|
59 | + $endDateString = $timestamp->getDate().'T'.$endTime; |
|
60 | 60 | } |
61 | 61 | } |
62 | 62 | $endDate = !empty($endDateString) ? DateTimeFactory::dateTimeFromDateString($endDateString) : null; |
@@ -74,12 +74,12 @@ discard block |
||
74 | 74 | $cdbCalendar->next(); |
75 | 75 | |
76 | 76 | $startTime = $timestamp->getStartTime() ? $timestamp->getStartTime() : '00:00:00'; |
77 | - $startDateString = $timestamp->getDate() . 'T' . $startTime; |
|
77 | + $startDateString = $timestamp->getDate().'T'.$startTime; |
|
78 | 78 | |
79 | 79 | if ($timestamp->getEndTime()) { |
80 | - $endDateString = $timestamp->getDate() . 'T' . $timestamp->getEndTime(); |
|
80 | + $endDateString = $timestamp->getDate().'T'.$timestamp->getEndTime(); |
|
81 | 81 | } else { |
82 | - $endDateString = $timestamp->getDate() . 'T' . $startTime; |
|
82 | + $endDateString = $timestamp->getDate().'T'.$startTime; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | $timestamp = $this->createTimestamp( |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | } |
97 | 97 | |
98 | 98 | $periods = array_map( |
99 | - function (array $periodParts) { |
|
99 | + function(array $periodParts) { |
|
100 | 100 | $firstPart = array_shift($periodParts); |
101 | 101 | $lastPart = array_pop($periodParts); |
102 | 102 | return new Timestamp( |