Completed
Pull Request — master (#443)
by
unknown
03:01
created
src/SavedSearches/UDB3SavedSearchRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
     ): void {
91 91
         $queryBuilder = $this->connection->createQueryBuilder()
92 92
             ->delete($this->tableName->toNative())
93
-            ->where(SchemaConfigurator::USER . ' = ?')
94
-            ->andWhere(SchemaConfigurator::ID . ' = ?')
93
+            ->where(SchemaConfigurator::USER.' = ?')
94
+            ->andWhere(SchemaConfigurator::ID.' = ?')
95 95
             ->setParameters(
96 96
                 [
97 97
                     $userId->toNative(),
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $queryBuilder = $this->connection->createQueryBuilder()
111 111
             ->select('*')
112 112
             ->from($this->tableName->toNative())
113
-            ->where(SchemaConfigurator::USER . ' = ?')
113
+            ->where(SchemaConfigurator::USER.' = ?')
114 114
             ->setParameters(
115 115
                 [
116 116
                     $this->userId->toNative(),
Please login to merge, or discard this patch.
src/Organizer/OrganizerLDProjector.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@
 block discarded – undo
197 197
     /**
198 198
      * @param $jsonLD
199 199
      * @param DomainMessage $domainMessage
200
-     * @return mixed
200
+     * @return \stdClass
201 201
      */
202 202
     private function appendCreator($jsonLD, $domainMessage)
203 203
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 
233 233
         $this->setMainLanguage($jsonLD, $organizerCreated->getMainLanguage());
234 234
 
235
-        $jsonLD->url = (string) $organizerCreated->getWebsite();
235
+        $jsonLD->url = (string)$organizerCreated->getWebsite();
236 236
 
237 237
         $jsonLD->name = [
238 238
             $this->getMainLanguage($jsonLD)->getCode() => $organizerCreated->getTitle(),
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         $document = $this->repository->get($organizerId);
263 263
 
264 264
         $jsonLD = $document->getBody();
265
-        $jsonLD->url = (string) $websiteUpdated->getWebsite();
265
+        $jsonLD->url = (string)$websiteUpdated->getWebsite();
266 266
 
267 267
         return $document->withBody($jsonLD);
268 268
     }
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
         $labelsProperty = $labelAdded->getLabel()->isVisible() ? 'labels' : 'hiddenLabels';
372 372
 
373 373
         $labels = isset($jsonLD->{$labelsProperty}) ? $jsonLD->{$labelsProperty} : [];
374
-        $label = (string) $labelAdded->getLabel();
374
+        $label = (string)$labelAdded->getLabel();
375 375
 
376 376
         $labels[] = $label;
377 377
         $jsonLD->{$labelsProperty} = array_unique($labels);
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
             if (isset($jsonLD->{$labelsProperty}) && is_array($jsonLD->{$labelsProperty})) {
397 397
                 $jsonLD->{$labelsProperty} = array_filter(
398 398
                     $jsonLD->{$labelsProperty},
399
-                    function ($label) use ($labelRemoved) {
399
+                    function($label) use ($labelRemoved) {
400 400
                         return !$labelRemoved->getLabel()->equals(
401 401
                             new Label($label)
402 402
                         );
Please login to merge, or discard this patch.
src/SavedSearches/Properties/CreatedByQueryString.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
15 15
 
16 16
         $query = implode(' OR ', $queryParts);
17 17
         if (count($queryParts) > 1) {
18
-            $query = '(' . $query . ')';
18
+            $query = '('.$query.')';
19 19
         }
20
-        $query = 'createdby:' . $query;
20
+        $query = 'createdby:'.$query;
21 21
 
22 22
         parent::__construct($query);
23 23
     }
Please login to merge, or discard this patch.
src/Search/Sapi3SearchService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
         $offerRequest = new Request(
74 74
             'GET',
75
-            (string) $offerQuery,
75
+            (string)$offerQuery,
76 76
             $headers
77 77
         );
78 78
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         $offerIds = array_reduce(
85 85
             $searchResponseData->{'member'},
86
-            function (OfferIdentifierCollection $offerIds, $item) {
86
+            function(OfferIdentifierCollection $offerIds, $item) {
87 87
                 return $offerIds->with(
88 88
                     $this->offerIdentifier->fromIri(Url::fromNative($item->{'@id'}))
89 89
                 );
Please login to merge, or discard this patch.
src/Offer/Security/Sapi3SearchQueryFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
19 19
         StringLiteral $constraint,
20 20
         StringLiteral $offerId
21 21
     ) {
22
-        $constraintStr = '(' . $constraint->toNative() . ')';
22
+        $constraintStr = '('.$constraint->toNative().')';
23 23
         $offerIdStr = $offerId->toNative();
24 24
 
25
-        return '(' . $constraintStr . ' AND id:' . $offerIdStr . ')';
25
+        return '('.$constraintStr.' AND id:'.$offerIdStr.')';
26 26
     }
27 27
 }
Please login to merge, or discard this patch.
src/SavedSearches/Properties/CreatorQueryString.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
15 15
 
16 16
         $query = implode(' OR ', $queryParts);
17 17
         if (count($queryParts) > 1) {
18
-            $query = '(' . $query . ')';
18
+            $query = '('.$query.')';
19 19
         }
20
-        $query = 'creator:' . $query;
20
+        $query = 'creator:'.$query;
21 21
 
22 22
         parent::__construct($query);
23 23
     }
Please login to merge, or discard this patch.
src/Search/Sapi3CountingSearchService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
         $request = new Request(
80 80
             'GET',
81
-            (string) $url,
81
+            (string)$url,
82 82
             $headers
83 83
         );
84 84
 
@@ -88,6 +88,6 @@  discard block
 block discarded – undo
88 88
             $response->getBody()->getContents()
89 89
         );
90 90
 
91
-        return (int) $decodedResponse->{'totalItems'};
91
+        return (int)$decodedResponse->{'totalItems'};
92 92
     }
93 93
 }
Please login to merge, or discard this patch.
src/Organizer/Organizer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
      */
260 260
     public function importLabels(Labels $labels, Labels $labelsToKeepIfAlreadyOnOrganizer)
261 261
     {
262
-        $convertLabelClass = function (\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
262
+        $convertLabelClass = function(\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
263 263
             return new Label(
264 264
                 $label->getName()->toString(),
265 265
                 $label->isVisible()
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
         foreach ($addedLabels->asArray() as $addedLabel) {
291 291
             $importLabels = $importLabels->with(
292 292
                 new \CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label(
293
-                    new LabelName((string) $addedLabel),
293
+                    new LabelName((string)$addedLabel),
294 294
                     $addedLabel->isVisible()
295 295
                 )
296 296
             );
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
     protected function applyOrganizerImportedFromUDB2(
360 360
         OrganizerImportedFromUDB2 $organizerImported
361 361
     ) {
362
-        $this->actorId = (string) $organizerImported->getActorId();
362
+        $this->actorId = (string)$organizerImported->getActorId();
363 363
 
364 364
         // On import from UDB2 the default main language is 'nl'.
365 365
         $this->mainLanguage = new Language('nl');
Please login to merge, or discard this patch.
src/Offer/Commands/AbstractImportLabels.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
     public function getLabelsToImport()
49 49
     {
50 50
         $labelNamesToKeep = array_map(
51
-            function (Label $label) {
51
+            function(Label $label) {
52 52
                 return $label->getName();
53 53
             },
54 54
             $this->labelsToKeepIfAlreadyOnOffer->toArray()
55 55
         );
56 56
 
57 57
         return $this->labels->filter(
58
-            function (Label $label) use ($labelNamesToKeep) {
58
+            function(Label $label) use ($labelNamesToKeep) {
59 59
                 return !in_array($label->getName(), $labelNamesToKeep);
60 60
             }
61 61
         );
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     public function getNames()
68 68
     {
69 69
         return array_map(
70
-            function (Label $label) {
70
+            function(Label $label) {
71 71
                 return new StringLiteral($label->getName()->toString());
72 72
             },
73 73
             $this->getLabelsToImport()->toArray()
Please login to merge, or discard this patch.