Completed
Pull Request — master (#161)
by Kristof
05:38
created
src/Variations/Command/CreateOfferVariationJSONDeserializer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
     private function getErrorMessages($validationErrors)
97 97
     {
98 98
         $errorMessages = array_map(
99
-            function ($error) {
99
+            function($error) {
100 100
                 return $error['message'];
101 101
             },
102 102
             $validationErrors
Please login to merge, or discard this patch.
src/ReadModel/Index/Projector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             );
137 137
         }
138 138
 
139
-        return isset($userId) ? (string) $userId : '';
139
+        return isset($userId) ? (string)$userId : '';
140 140
     }
141 141
 
142 142
     /**
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         $this->updateIndex(
225 225
             $itemId,
226 226
             $itemType,
227
-            (string) $userId,
227
+            (string)$userId,
228 228
             $name,
229 229
             $postalCode,
230 230
             $this->UDB2Domain,
Please login to merge, or discard this patch.
src/CalendarDeserializer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,24 +19,24 @@
 block discarded – undo
19 19
                     if (!empty($timestamp->showStartHour) && !empty($timestamp->startHour)) {
20 20
                         list($hour, $minute) = explode(':', $timestamp->startHour);
21 21
                         if (strlen($hour) == 2 && strlen($minute) == 2) {
22
-                            $startDate = $date . 'T' . $timestamp->startHour . ':00';
22
+                            $startDate = $date.'T'.$timestamp->startHour.':00';
23 23
                         } else {
24
-                            $startDate = $date . 'T00:00:00';
24
+                            $startDate = $date.'T00:00:00';
25 25
                         }
26 26
                     } else {
27
-                        $startDate = $date . 'T00:00:00';
27
+                        $startDate = $date.'T00:00:00';
28 28
                     }
29 29
 
30 30
                     // Check if a correct endhour is given.
31 31
                     if (!empty($timestamp->showEndHour) && !empty($timestamp->endHour)) {
32 32
                         list($hour, $minute) = explode(':', $timestamp->endHour);
33 33
                         if (strlen($hour) == 2 && strlen($minute) == 2) {
34
-                            $endDate = $date . 'T' . $timestamp->endHour . ':00';
34
+                            $endDate = $date.'T'.$timestamp->endHour.':00';
35 35
                         } else {
36
-                            $endDate = $date . 'T00:00:00';
36
+                            $endDate = $date.'T00:00:00';
37 37
                         }
38 38
                     } else {
39
-                        $endDate = $date . 'T00:00:00';
39
+                        $endDate = $date.'T00:00:00';
40 40
                     }
41 41
 
42 42
                     $timestamps[strtotime($startDate)] = new Timestamp($startDate, $endDate);
Please login to merge, or discard this patch.
src/ReadModel/Index/EntityIriGeneratorFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@
 block discarded – undo
23 23
     {
24 24
         $baseUrl = $this->baseUrl;
25 25
         return new CallableIriGenerator(
26
-            function ($cdbid) use ($baseUrl, $entityType) {
27
-                return $baseUrl . '/' . $entityType . '/' . $cdbid;
26
+            function($cdbid) use ($baseUrl, $entityType) {
27
+                return $baseUrl.'/'.$entityType.'/'.$cdbid;
28 28
             }
29 29
         );
30 30
     }
Please login to merge, or discard this patch.
src/ReadModel/Index/Doctrine/DBALRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
             );
265 265
 
266 266
         $q->setParameter('entity_type', EntityType::ORGANIZER()->toNative());
267
-        $q->setParameter('title', '%' . $part . '%');
267
+        $q->setParameter('title', '%'.$part.'%');
268 268
 
269 269
         $results = $q->execute();
270 270
 
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 
341 341
         $results = $queryBuilder->execute();
342 342
         $offerIdentifierArray = array_map(
343
-            function ($resultRow) {
343
+            function($resultRow) {
344 344
                 $offerIdentifier = new IriOfferIdentifier(
345 345
                     $resultRow['entity_iri'],
346 346
                     $resultRow['entity_id'],
Please login to merge, or discard this patch.
src/Offer/ReadModel/JSONLD/OfferLDProjector.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
             if (preg_match('/^apply(.+)$/', $method, $matches)) {
120 120
                 $event = $matches[1];
121
-                $classNameMethod = 'get' . $event . 'ClassName';
121
+                $classNameMethod = 'get'.$event.'ClassName';
122 122
 
123 123
                 if (method_exists($this, $classNameMethod)) {
124 124
                     $eventFullClassName = call_user_func(array($this, $classNameMethod));
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         $offerLd = $document->getBody();
191 191
 
192 192
         $labels = isset($offerLd->labels) ? $offerLd->labels : [];
193
-        $label = (string) $labelAdded->getLabel();
193
+        $label = (string)$labelAdded->getLabel();
194 194
 
195 195
         $labels[] = $label;
196 196
         $offerLd->labels = array_unique($labels);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         if (isset($offerLd->labels) && is_array($offerLd->labels)) {
211 211
             $offerLd->labels = array_filter(
212 212
                 $offerLd->labels,
213
-                function ($label) use ($deleteLabel) {
213
+                function($label) use ($deleteLabel) {
214 214
                     return !$deleteLabel->getLabel()->equals(
215 215
                         new Label($label)
216 216
                     );
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
             return;
302 302
         }
303 303
 
304
-        $imageId = (string) $imageRemoved->getImage()->getMediaObjectId();
304
+        $imageId = (string)$imageRemoved->getImage()->getMediaObjectId();
305 305
 
306 306
         /**
307 307
          * Matches any object that is not the removed image.
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
          * @return bool
313 313
          *  Returns true when the media object does not match the image to remove.
314 314
          */
315
-        $shouldNotBeRemoved = function ($mediaObject) use ($imageId) {
315
+        $shouldNotBeRemoved = function($mediaObject) use ($imageId) {
316 316
             $containsId = !!strpos($mediaObject->{'@id'}, $imageId);
317 317
             return !$containsId;
318 318
         };
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
         $document = $this->loadDocumentFromRepository($mainImageSelected);
351 351
         $offerLd = $document->getBody();
352 352
         $imageId = $mainImageSelected->getImage()->getMediaObjectId();
353
-        $mediaObjectMatcher = function ($matchingMediaObject, $currentMediaObject) use ($imageId) {
353
+        $mediaObjectMatcher = function($matchingMediaObject, $currentMediaObject) use ($imageId) {
354 354
             if (!$matchingMediaObject && $this->mediaObjectMatchesId($currentMediaObject, $imageId)) {
355 355
                 $matchingMediaObject = $currentMediaObject;
356 356
             }
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
      */
376 376
     protected function mediaObjectMatchesId($mediaObject, UUID $mediaObjectId)
377 377
     {
378
-        return strpos($mediaObject->{'@id'}, (string) $mediaObjectId) > 0;
378
+        return strpos($mediaObject->{'@id'}, (string)$mediaObjectId) > 0;
379 379
     }
380 380
 
381 381
     /**
Please login to merge, or discard this patch.
src/Offer/ReadModel/History/OfferHistoryProjector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 
63 63
             if (preg_match('/^apply(.+)$/', $method, $matches)) {
64 64
                 $event = $matches[1];
65
-                $classNameMethod = 'get' . $event . 'ClassName';
65
+                $classNameMethod = 'get'.$event.'ClassName';
66 66
 
67 67
                 if (method_exists($this, $classNameMethod)) {
68 68
                     $eventFullClassName = call_user_func(array($this, $classNameMethod));
Please login to merge, or discard this patch.
src/Offer/IriOfferIdentifierFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
         $this->regex = $regex;
21 21
 
22 22
         $match = @preg_match(
23
-            '@^' . $regex . '$@',
23
+            '@^'.$regex.'$@',
24 24
             '',
25 25
             $matches
26 26
         );
27 27
 
28 28
         if (false === $match) {
29 29
             throw new \InvalidArgumentException(
30
-                'Problem evaluating regular expression pattern ' . $regex
30
+                'Problem evaluating regular expression pattern '.$regex
31 31
             );
32 32
         }
33 33
     }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function fromIri($iri)
40 40
     {
41 41
         $match = @preg_match(
42
-            '@^' . $this->regex . '$@',
42
+            '@^'.$this->regex.'$@',
43 43
             (string)$iri,
44 44
             $matches
45 45
         );
Please login to merge, or discard this patch.
src/Offer/OfferCommandHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
             $matches = [];
57 57
             if (preg_match('/^handle(.+)$/', $method, $matches)) {
58 58
                 $command = $matches[1];
59
-                $classNameMethod = 'get' . $command . 'ClassName';
59
+                $classNameMethod = 'get'.$command.'ClassName';
60 60
 
61 61
                 if (method_exists($this, $classNameMethod)) {
62 62
                     $commandFullClassName = call_user_func(array($this, $classNameMethod));
Please login to merge, or discard this patch.