Completed
Pull Request — master (#398)
by Kristof
03:34
created
src/Media/Serialization/MediaObjectSerializer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
         $normalizedData = [
50 50
             '@id' => $this->iriGenerator->iri($mediaObject->getMediaObjectId()),
51 51
             '@type' => $type,
52
-            'contentUrl' => (string) $mediaObject->getSourceLocation(),
53
-            'thumbnailUrl' => (string) $mediaObject->getSourceLocation(),
54
-            'description' => (string) $mediaObject->getDescription(),
55
-            'copyrightHolder' => (string) $mediaObject->getCopyrightHolder(),
56
-            'inLanguage' => (string) $mediaObject->getLanguage(),
52
+            'contentUrl' => (string)$mediaObject->getSourceLocation(),
53
+            'thumbnailUrl' => (string)$mediaObject->getSourceLocation(),
54
+            'description' => (string)$mediaObject->getDescription(),
55
+            'copyrightHolder' => (string)$mediaObject->getCopyrightHolder(),
56
+            'inLanguage' => (string)$mediaObject->getLanguage(),
57 57
         ];
58 58
 
59 59
         return $normalizedData;
@@ -61,18 +61,18 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function serializeMimeType(MIMEType $mimeType)
63 63
     {
64
-        $typeParts = explode('/', (string) $mimeType);
64
+        $typeParts = explode('/', (string)$mimeType);
65 65
         $type = array_shift($typeParts);
66 66
 
67 67
         if ($type === 'image') {
68 68
             return 'schema:ImageObject';
69 69
         }
70 70
 
71
-        if ((string) $mimeType === 'application/octet-stream') {
71
+        if ((string)$mimeType === 'application/octet-stream') {
72 72
             return 'schema:mediaObject';
73 73
         }
74 74
 
75
-        throw new UnsupportedException('Unsupported MIME-type "'. $mimeType .'"');
75
+        throw new UnsupportedException('Unsupported MIME-type "'.$mimeType.'"');
76 76
     }
77 77
 
78 78
     public function deserialize($data, $type, $format, array $context = array())
Please login to merge, or discard this patch.
src/Offer/ReadModel/MainLanguage/JSONLDMainLanguageQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         $document = $this->documentRepository->get($cdbid);
39 39
 
40 40
         if (!$document) {
41
-            throw new EntityNotFoundException('Could not load JSON-LD document for cdbid ' . $cdbid);
41
+            throw new EntityNotFoundException('Could not load JSON-LD document for cdbid '.$cdbid);
42 42
         }
43 43
 
44 44
         $json = $document->getBody();
Please login to merge, or discard this patch.
src/Event/ReadModel/JSONLD/CdbXMLImporter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                     'addressCountry' => $address->getCountry(),
193 193
                     'addressLocality' => $address->getCity(),
194 194
                     'postalCode' => $address->getZip(),
195
-                    'streetAddress' => $address->getStreet() . ' ' . $address->getHouseNumber(),
195
+                    'streetAddress' => $address->getStreet().' '.$address->getHouseNumber(),
196 196
                 );
197 197
             }
198 198
         }
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
             $slug = '';
352 352
         }
353 353
 
354
-        $reference = 'http://www.uitinvlaanderen.be/agenda/e/' . $slug . '/' . $event->getCdbId();
354
+        $reference = 'http://www.uitinvlaanderen.be/agenda/e/'.$slug.'/'.$event->getCdbId();
355 355
 
356 356
 
357 357
         if (!property_exists($jsonLD, 'sameAs')) {
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
      */
370 370
     private function importAudience(\CultureFeed_Cdb_Item_Event $event, \stdClass $jsonLD)
371 371
     {
372
-        $eventIsPrivate = (bool) $event->isPrivate();
372
+        $eventIsPrivate = (bool)$event->isPrivate();
373 373
         $eventTargetsEducation = $eventIsPrivate && $event->getCategories()->hasCategory('2.1.3.0.0');
374 374
 
375 375
         $audienceType = $eventTargetsEducation ? 'education' : ($eventIsPrivate ? 'members' : 'everyone');
Please login to merge, or discard this patch.
src/Offer/ReadModel/JSONLD/CdbXMLItemBaseImporter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
 
162 162
         $mainLanguageDetails = array_filter(
163 163
             $details,
164
-            function (\CultureFeed_Cdb_Data_Detail $detail) use ($mainLanguage) {
164
+            function(\CultureFeed_Cdb_Data_Detail $detail) use ($mainLanguage) {
165 165
                 return $detail->getLanguage() === $mainLanguage->getCode();
166 166
             }
167 167
         );
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@
 block discarded – undo
153 153
     }
154 154
 
155 155
     /**
156
-     * @param \CultureFeed_Cdb_Data_DetailList|\CultureFeed_Cdb_Data_Detail[] $details
156
+     * @param \CultureFeed_Cdb_Data_DetailList $details
157 157
      * @param \stdClass $jsonLD
158 158
      */
159 159
     public function importPriceInfo(
Please login to merge, or discard this patch.
src/Organizer/ReadModel/JSONLD/OrganizerJsonDocumentLanguageAnalyzer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,13 +59,13 @@
 block discarded – undo
59 59
         $mainLanguage = isset($body->mainLanguage) ? $body->mainLanguage : 'nl';
60 60
 
61 61
         if (is_string($body->name)) {
62
-            $body->name = (object) [
62
+            $body->name = (object)[
63 63
                 $mainLanguage => $body->name,
64 64
             ];
65 65
         }
66 66
 
67 67
         if (isset($body->address->streetAddress)) {
68
-            $body->address = (object) [
68
+            $body->address = (object)[
69 69
                 $mainLanguage => $body->address,
70 70
             ];
71 71
         }
Please login to merge, or discard this patch.
src/Place/ReadModel/JSONLD/PlaceJsonDocumentLanguageAnalyzer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,20 +62,20 @@
 block discarded – undo
62 62
         $mainLanguage = isset($body->mainLanguage) ? $body->mainLanguage : 'nl';
63 63
 
64 64
         if (isset($body->address->streetAddress)) {
65
-            $body->address = (object) [
65
+            $body->address = (object)[
66 66
                 $mainLanguage => $body->address,
67 67
             ];
68 68
         }
69 69
 
70 70
         if (isset($body->bookingInfo->urlLabel) && is_string($body->bookingInfo->urlLabel)) {
71
-            $body->bookingInfo->urlLabel = (object) [
71
+            $body->bookingInfo->urlLabel = (object)[
72 72
                 $mainLanguage => $body->bookingInfo->urlLabel,
73 73
             ];
74 74
         }
75 75
 
76 76
         if (isset($body->priceInfo) && is_array($body->priceInfo) && is_string($body->priceInfo[0]->name)) {
77 77
             foreach ($body->priceInfo as $priceInfo) {
78
-                $priceInfo->name = (object) [
78
+                $priceInfo->name = (object)[
79 79
                     $mainLanguage => $priceInfo->name,
80 80
                 ];
81 81
             }
Please login to merge, or discard this patch.
src/Event/ReadModel/JSONLD/EventJsonDocumentLanguageAnalyzer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,14 +61,14 @@
 block discarded – undo
61 61
         $mainLanguage = isset($body->mainLanguage) ? $body->mainLanguage : 'nl';
62 62
 
63 63
         if (isset($body->bookingInfo->urlLabel) && is_string($body->bookingInfo->urlLabel)) {
64
-            $body->bookingInfo->urlLabel = (object) [
64
+            $body->bookingInfo->urlLabel = (object)[
65 65
                 $mainLanguage => $body->bookingInfo->urlLabel,
66 66
             ];
67 67
         }
68 68
 
69 69
         if (isset($body->priceInfo) && is_array($body->priceInfo) && is_string($body->priceInfo[0]->name)) {
70 70
             foreach ($body->priceInfo as $priceInfo) {
71
-                $priceInfo->name = (object) [
71
+                $priceInfo->name = (object)[
72 72
                     $mainLanguage => $priceInfo->name,
73 73
                 ];
74 74
             }
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
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
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
         );
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         // Convert the imported labels to label collection.
268 268
         $importLabelsCollection = new LabelCollection(
269 269
             array_map(
270
-                function (\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
270
+                function(\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
271 271
                     return new Label(
272 272
                         $label->getName()->toString(),
273 273
                         $label->isVisible()
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
         foreach ($addedLabels->asArray() as $addedLabel) {
292 292
             $importLabels = $importLabels->with(
293 293
                 new \CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label(
294
-                    new LabelName((string) $addedLabel),
294
+                    new LabelName((string)$addedLabel),
295 295
                     $addedLabel->isVisible()
296 296
                 )
297 297
             );
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
         $importImages = $imageCollection->toArray();
676 676
         $currentImages = $currentImageCollection->toArray();
677 677
 
678
-        $compareImages = function (Image $a, Image $b) {
678
+        $compareImages = function(Image $a, Image $b) {
679 679
             $idA = $a->getMediaObjectId()->toNative();
680 680
             $idB = $b->getMediaObjectId()->toNative();
681 681
             return strcmp($idA, $idB);
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
             if ($this->rejectedReason && $reason->sameValueAs($this->rejectedReason)) {
823 823
                 return true; // nothing left to do if the offer has already been rejected for the same reason
824 824
             } else {
825
-                throw new Exception('The offer has already been rejected for another reason: ' . $this->rejectedReason);
825
+                throw new Exception('The offer has already been rejected for another reason: '.$this->rejectedReason);
826 826
             }
827 827
         }
828 828
 
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
         $dutchImagesList = $imagesEvent->getImages()->toArray();
998 998
         $translatedImagesList = array_filter(
999 999
             $this->images->toArray(),
1000
-            function (Image $image) {
1000
+            function(Image $image) {
1001 1001
                 return $image->getLanguage()->getCode() !== 'nl';
1002 1002
             }
1003 1003
         );
Please login to merge, or discard this patch.
src/Label/ReadModels/JSON/Repository/Doctrine/DBALReadRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     public function getByUuid(UUID $uuid)
55 55
     {
56 56
         $aliases = $this->getAliases();
57
-        $whereId = SchemaConfigurator::UUID_COLUMN . ' = ?';
57
+        $whereId = SchemaConfigurator::UUID_COLUMN.' = ?';
58 58
 
59 59
         $queryBuilder = $this->createQueryBuilder()->select($aliases)
60 60
             ->from($this->getTableName()->toNative())
@@ -215,15 +215,15 @@  discard block
 block discarded – undo
215 215
     private function createUserLabelsSubQuery(Query $query)
216 216
     {
217 217
         return $this->createQueryBuilder()
218
-            ->select('DISTINCT ' . LabelRolesSchemaConfigurator::LABEL_ID_COLUMN)
218
+            ->select('DISTINCT '.LabelRolesSchemaConfigurator::LABEL_ID_COLUMN)
219 219
             ->from($this->userRolesTableName->toNative(), 'ur')
220 220
             ->innerJoin(
221 221
                 'ur',
222 222
                 $this->labelRolesTableName->toNative(),
223 223
                 'lr',
224
-                'ur.' . PermissionsSchemaConfigurator::ROLE_ID_COLUMN . ' = lr.' . LabelRolesSchemaConfigurator::ROLE_ID_COLUMN
224
+                'ur.'.PermissionsSchemaConfigurator::ROLE_ID_COLUMN.' = lr.'.LabelRolesSchemaConfigurator::ROLE_ID_COLUMN
225 225
             )
226
-            ->where('ur.' . PermissionsSchemaConfigurator::USER_ID_COLUMN . '= :' . PermissionsSchemaConfigurator::USER_ID_COLUMN);
226
+            ->where('ur.'.PermissionsSchemaConfigurator::USER_ID_COLUMN.'= :'.PermissionsSchemaConfigurator::USER_ID_COLUMN);
227 227
     }
228 228
 
229 229
     /**
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     {
250 250
         return $queryBuilder->expr()->like(
251 251
             SchemaConfigurator::NAME_COLUMN,
252
-            ':' . SchemaConfigurator::NAME_COLUMN
252
+            ':'.SchemaConfigurator::NAME_COLUMN
253 253
         );
254 254
     }
255 255
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
      */
260 260
     private function createLikeParameter(Query $query)
261 261
     {
262
-        return '%' . $query->getValue()->toNative() . '%';
262
+        return '%'.$query->getValue()->toNative().'%';
263 263
     }
264 264
 
265 265
     /**
Please login to merge, or discard this patch.