Completed
Pull Request — master (#379)
by Kristof
05:38
created
src/Offer/Commands/AbstractCreateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     {
20 20
         if (!is_string($itemId)) {
21 21
             throw new \InvalidArgumentException(
22
-                'Expected itemId to be a string, received ' . gettype($itemId)
22
+                'Expected itemId to be a string, received '.gettype($itemId)
23 23
             );
24 24
         }
25 25
 
Please login to merge, or discard this patch.
src/Organizer/DBALWebsiteLookupService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         $tableName
28 28
     ) {
29 29
         $this->connection = $connection;
30
-        $this->tableName = (string) $tableName;
30
+        $this->tableName = (string)$tableName;
31 31
     }
32 32
 
33 33
     /**
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             ->select(UniqueDBALEventStoreDecorator::UUID_COLUMN)
42 42
             ->from($this->tableName)
43 43
             ->where($expr->eq(UniqueDBALEventStoreDecorator::UNIQUE_COLUMN, ':url'))
44
-            ->setParameter(':url', (string) $url)
44
+            ->setParameter(':url', (string)$url)
45 45
             ->execute();
46 46
 
47 47
         $uuid = $results->fetchColumn();
Please login to merge, or discard this patch.
src/Offer/OfferFacilityResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@
 block discarded – undo
25 25
      */
26 26
     public function byId(StringLiteral $facilityId)
27 27
     {
28
-        if (!array_key_exists((string) $facilityId, $this->facilities)) {
28
+        if (!array_key_exists((string)$facilityId, $this->facilities)) {
29 29
             throw new \Exception("Unknown facility id '{$facilityId}'");
30 30
         }
31 31
 
32
-        return $this->facilities[(string) $facilityId];
32
+        return $this->facilities[(string)$facilityId];
33 33
     }
34 34
 
35 35
     /**
Please login to merge, or discard this patch.
src/Organizer/Commands/AbstractLabelCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     public function getNames()
50 50
     {
51 51
         return [
52
-            new StringLiteral((string) $this->label),
52
+            new StringLiteral((string)$this->label),
53 53
         ];
54 54
     }
55 55
 
Please login to merge, or discard this patch.
src/Offer/Commands/AbstractImportLabels.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
     public function getNames()
39 39
     {
40 40
         return array_map(
41
-            function (Label $label) {
41
+            function(Label $label) {
42 42
                 return new StringLiteral($label->getName()->toString());
43 43
             },
44 44
             $this->getLabels()->toArray()
Please login to merge, or discard this patch.
src/Organizer/Commands/ImportLabels.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
     public function getNames()
39 39
     {
40 40
         return array_map(
41
-            function (Label $label) {
41
+            function(Label $label) {
42 42
                 return new StringLiteral($label->getName()->toString());
43 43
             },
44 44
             $this->getLabels()->toArray()
Please login to merge, or discard this patch.
src/Organizer/Organizer.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 use CultuurNet\UDB3\Language;
14 14
 use CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\LabelName;
15 15
 use CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Labels;
16
-use CultuurNet\UDB3\Organizer\Commands\ImportLabels;
17 16
 use CultuurNet\UDB3\Organizer\Events\AddressUpdated;
18 17
 use CultuurNet\UDB3\Organizer\Events\ContactPointUpdated;
19 18
 use CultuurNet\UDB3\Organizer\Events\LabelAdded;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         // Convert the imported labels to label collection.
249 249
         $importLabelsCollection = new LabelCollection(
250 250
             array_map(
251
-                function (\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
251
+                function(\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
252 252
                     return new Label(
253 253
                         $label->getName()->toString(),
254 254
                         $label->isVisible()
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         foreach ($addedLabels->asArray() as $addedLabel) {
273 273
             $importLabels = $importLabels->with(
274 274
                 new \CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label(
275
-                    new LabelName((string) $addedLabel),
275
+                    new LabelName((string)$addedLabel),
276 276
                     $addedLabel->isVisible()
277 277
                 )
278 278
             );
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
     protected function applyOrganizerImportedFromUDB2(
339 339
         OrganizerImportedFromUDB2 $organizerImported
340 340
     ) {
341
-        $this->actorId = (string) $organizerImported->getActorId();
341
+        $this->actorId = (string)$organizerImported->getActorId();
342 342
 
343 343
         // On import from UDB2 the default main language is 'nl'.
344 344
         $this->mainLanguage = new Language('nl');
Please login to merge, or discard this patch.
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/BookingInfo.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,10 +116,10 @@
 block discarded – undo
116 116
     {
117 117
         $serialized = array_filter(
118 118
             [
119
-              'phone' => $this->phone,
120
-              'email' => $this->email,
121
-              'url' => $this->url,
122
-              'urlLabel' => $this->urlLabel,
119
+                'phone' => $this->phone,
120
+                'email' => $this->email,
121
+                'url' => $this->url,
122
+                'urlLabel' => $this->urlLabel,
123 123
             ]
124 124
         );
125 125
 
Please login to merge, or discard this patch.