Completed
Pull Request — master (#239)
by Luc
05:21
created
src/Offer/Offer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
     {
258 258
         $equalImages = array_filter(
259 259
             $this->mediaObjects,
260
-            function ($existingMediaObjectId) use ($image) {
260
+            function($existingMediaObjectId) use ($image) {
261 261
                 return $image
262 262
                     ->getMediaObjectId()
263 263
                     ->sameValueAs($existingMediaObjectId);
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
             if ($this->rejectedReason && $reason->sameValueAs($this->rejectedReason)) {
382 382
                 return true; // nothing left to do if the offer has already been rejected for the same reason
383 383
             } else {
384
-                throw new Exception('The offer has already been rejected for another reason: ' . $this->rejectedReason);
384
+                throw new Exception('The offer has already been rejected for another reason: '.$this->rejectedReason);
385 385
             }
386 386
         }
387 387
 
Please login to merge, or discard this patch.
src/Security/CommandAuthorizationException.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@
 block discarded – undo
26 26
         StringLiteral $userId,
27 27
         AuthorizableCommandInterface $command
28 28
     ) {
29
-        parent::__construct('User with id: ' . $userId->toNative() .
30
-            ' has no permission: "' . $command->getPermission()->toNative() .
31
-            '" on item: ' . $command->getItemId() .
32
-            ' when executing command: ' . get_class($command));
29
+        parent::__construct('User with id: '.$userId->toNative().
30
+            ' has no permission: "'.$command->getPermission()->toNative().
31
+            '" on item: '.$command->getItemId().
32
+            ' when executing command: '.get_class($command));
33 33
 
34 34
         $this->userId = $userId;
35 35
         $this->command = $command;
Please login to merge, or discard this patch.
src/Location/Location.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,9 +66,9 @@
 block discarded – undo
66 66
     public function serialize()
67 67
     {
68 68
         return [
69
-          'cdbid' => $this->cdbid,
70
-          'name' => $this->name->toNative(),
71
-          'address' => $this->address->serialize()
69
+            'cdbid' => $this->cdbid,
70
+            'name' => $this->name->toNative(),
71
+            'address' => $this->address->serialize()
72 72
         ];
73 73
     }
74 74
 
Please login to merge, or discard this patch.
src/Organizer/Events/OrganizerCreatedWithUniqueWebsite.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,8 +148,8 @@
 block discarded – undo
148 148
         }
149 149
 
150 150
         return parent::serialize() + array(
151
-            'website' => (string) $this->getWebsite(),
152
-            'title' => (string) $this->getTitle(),
151
+            'website' => (string)$this->getWebsite(),
152
+            'title' => (string)$this->getTitle(),
153 153
             'addresses' => $addresses,
154 154
             'phones' => $this->getPhones(),
155 155
             'emails' => $this->getEmails(),
Please login to merge, or discard this patch.
src/Address/Address.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,10 +81,10 @@
 block discarded – undo
81 81
     public function serialize()
82 82
     {
83 83
         return [
84
-          'streetAddress' => $this->streetAddress->toNative(),
85
-          'postalCode' => $this->postalCode->toNative(),
86
-          'addressLocality' => $this->locality->toNative(),
87
-          'addressCountry' => $this->countryCode,
84
+            'streetAddress' => $this->streetAddress->toNative(),
85
+            'postalCode' => $this->postalCode->toNative(),
86
+            'addressLocality' => $this->locality->toNative(),
87
+            'addressCountry' => $this->countryCode,
88 88
         ];
89 89
     }
90 90
 
Please login to merge, or discard this patch.
src/Timestamp.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Broadway\Serializer\SerializableInterface;
6 6
 use DateTime;
7 7
 use DateTimeInterface;
8
-use ValueObjects\DateTime\Date;
9 8
 
10 9
 /**
11 10
  * Provices a class for a timestamp.
Please login to merge, or discard this patch.
src/Calendar.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         );
85 85
 
86 86
         $calendar = [
87
-          'type' => $this->type,
87
+            'type' => $this->type,
88 88
         ];
89 89
 
90 90
         empty($this->startDate) ?: $calendar['startDate'] = $this->startDate->format(DateTime::ATOM);
@@ -167,9 +167,9 @@  discard block
 block discarded – undo
167 167
             $jsonLd['subEvent'] = array();
168 168
             foreach ($timestamps as $timestamp) {
169 169
                 $jsonLd['subEvent'][] = array(
170
-                  '@type' => 'Event',
171
-                  'startDate' => $timestamp->getStartDate()->format(DateTime::ATOM),
172
-                  'endDate' => $timestamp->getEndDate()->format(DateTime::ATOM),
170
+                    '@type' => 'Event',
171
+                    'startDate' => $timestamp->getStartDate()->format(DateTime::ATOM),
172
+                    'endDate' => $timestamp->getEndDate()->format(DateTime::ATOM),
173 173
                 );
174 174
             }
175 175
         }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         array $openingHours = array()
55 55
     ) {
56 56
         if (($type->is(CalendarType::MULTIPLE()) || $type->is(CalendarType::SINGLE())) && empty($startDate)) {
57
-            throw new \UnexpectedValueException('Start date can not be empty for calendar type: ' . $type . '.');
57
+            throw new \UnexpectedValueException('Start date can not be empty for calendar type: '.$type.'.');
58 58
         }
59 59
 
60 60
         if ($type->is(CalendarType::PERIODIC()) && (empty($startDate) || empty($endDate))) {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     public function serialize()
83 83
     {
84 84
         $serializedTimestamps = array_map(
85
-            function (Timestamp $timestamp) {
85
+            function(Timestamp $timestamp) {
86 86
                 return $timestamp->serialize();
87 87
             },
88 88
             $this->timestamps
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             !empty($data['startDate']) ? self::deserializeDateTime($data['startDate']) : null,
111 111
             !empty($data['endDate']) ? self::deserializeDateTime($data['endDate']) : null,
112 112
             !empty($data['timestamps']) ? array_map(
113
-                function ($timestamp) {
113
+                function($timestamp) {
114 114
                     return Timestamp::deserialize($timestamp);
115 115
                 },
116 116
                 $data['timestamps']
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         // Permanent - with openingtimes
211 211
         $openingHours = $this->getOpeningHours();
212 212
         if (!empty($openingHours)) {
213
-            $jsonLd['openingHours'] = (array) $openingHours;
213
+            $jsonLd['openingHours'] = (array)$openingHours;
214 214
         }
215 215
 
216 216
         return $jsonLd;
Please login to merge, or discard this patch.
src/EventExport/Format/TabularData/OOXML/OOXMLFileFormat.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
     /**
25 25
      * @param EventInfoServiceInterface|null $uitpas
26
-     * @param string[]|null $include
26
+     * @param string[] $include
27 27
      */
28 28
     public function __construct($include = null, EventInfoServiceInterface $uitpas = null)
29 29
     {
Please login to merge, or discard this patch.
src/EventExport/Format/TabularData/TabularDataEventFormatter.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -160,14 +160,14 @@  discard block
 block discarded – undo
160 160
     protected function columns()
161 161
     {
162 162
         $formatter = $this;
163
-        $contactPoint = function (\stdClass $event, $type = null) use ($formatter) {
163
+        $contactPoint = function(\stdClass $event, $type = null) use ($formatter) {
164 164
             return $formatter->contactPoint($event, $type);
165 165
         };
166 166
 
167 167
         return [
168 168
             'id' => [
169 169
                 'name' => 'id',
170
-                'include' => function ($event) {
170
+                'include' => function($event) {
171 171
                     $eventUri = $event->{'@id'};
172 172
                     $uriParts = explode('/', $eventUri);
173 173
                     $eventId = array_pop($uriParts);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             ],
179 179
             'name' => [
180 180
                 'name' => 'titel',
181
-                'include' => function ($event) {
181
+                'include' => function($event) {
182 182
                     if ($event->name) {
183 183
                         return reset($event->name);
184 184
                     }
@@ -187,14 +187,14 @@  discard block
 block discarded – undo
187 187
             ],
188 188
             'creator' => [
189 189
                 'name' => 'auteur',
190
-                'include' => function ($event) {
190
+                'include' => function($event) {
191 191
                     return $event->creator;
192 192
                 },
193 193
                 'property' => 'creator'
194 194
             ],
195 195
             'bookingInfo.price' => [
196 196
                 'name' => 'prijs',
197
-                'include' => function ($event) {
197
+                'include' => function($event) {
198 198
                     if (property_exists($event, 'bookingInfo') && is_array($event->bookingInfo)) {
199 199
                         $first = reset($event->bookingInfo);
200 200
                         if (is_object($first) && property_exists($first, 'price')) {
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             ],
207 207
             'kansentarief' => [
208 208
                 'name' => 'kansentarief',
209
-                'include' => function ($event) {
209
+                'include' => function($event) {
210 210
                     $eventUri = $event->{'@id'};
211 211
                     $uriParts = explode('/', $eventUri);
212 212
                     $eventId = array_pop($uriParts);
@@ -215,18 +215,18 @@  discard block
 block discarded – undo
215 215
                     if ($uitpasInfo) {
216 216
                         $uitpasInfo = $this->uitpasInfoFormatter->format($uitpasInfo);
217 217
 
218
-                        $cardSystems = array_reduce($uitpasInfo['prices'], function ($cardSystems, $tariff) {
218
+                        $cardSystems = array_reduce($uitpasInfo['prices'], function($cardSystems, $tariff) {
219 219
                             $cardSystem = isset($cardSystems[$tariff['cardSystem']]) ? $cardSystems[$tariff['cardSystem']] : '';
220 220
                             $cardSystem = empty($cardSystem)
221
-                                ? $tariff['cardSystem'] .': € ' . $tariff['price']
222
-                                : $cardSystem . ' / € ' . $tariff['price'];
221
+                                ? $tariff['cardSystem'].': € '.$tariff['price']
222
+                                : $cardSystem.' / € '.$tariff['price'];
223 223
 
224 224
                             $cardSystems[$tariff['cardSystem']] = $cardSystem;
225 225
                             return $cardSystems;
226 226
                         }, []);
227 227
 
228
-                        $formattedTariffs = array_reduce($cardSystems, function ($tariffs, $cardSystemPrices) {
229
-                            return $tariffs ? $tariffs . ' | ' . $cardSystemPrices : $cardSystemPrices;
228
+                        $formattedTariffs = array_reduce($cardSystems, function($tariffs, $cardSystemPrices) {
229
+                            return $tariffs ? $tariffs.' | '.$cardSystemPrices : $cardSystemPrices;
230 230
                         });
231 231
 
232 232
                         if (!empty($formattedTariffs)) {
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
             ],
239 239
             'bookingInfo.url' => [
240 240
                 'name' => 'ticket link',
241
-                'include' => function ($event) {
241
+                'include' => function($event) {
242 242
                     if (property_exists($event, 'bookingInfo')) {
243 243
                         $first = reset($event->bookingInfo);
244 244
                         if (is_object($first) && property_exists($first, 'url')) {
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
             ],
251 251
             'description' => [
252 252
                 'name' => 'omschrijving',
253
-                'include' => function ($event) {
253
+                'include' => function($event) {
254 254
                     if (property_exists($event, 'description')) {
255 255
                         $description = reset($event->description);
256 256
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
             ],
271 271
             'organizer' => [
272 272
                 'name' => 'organisatie',
273
-                'include' => function ($event) {
273
+                'include' => function($event) {
274 274
                     if (property_exists($event, 'organizer') &&
275 275
                         isset($event->organizer->name)
276 276
                     ) {
@@ -281,14 +281,14 @@  discard block
 block discarded – undo
281 281
             ],
282 282
             'calendarSummary' => [
283 283
                 'name' => 'tijdsinformatie',
284
-                'include' => function ($event) {
284
+                'include' => function($event) {
285 285
                     return $event->calendarSummary;
286 286
                 },
287 287
                 'property' => 'calendarSummary'
288 288
             ],
289 289
             'labels' => [
290 290
                 'name' => 'labels',
291
-                'include' => function ($event) {
291
+                'include' => function($event) {
292 292
                     if (isset($event->labels)) {
293 293
                         return implode(';', $event->labels);
294 294
                     }
@@ -297,14 +297,14 @@  discard block
 block discarded – undo
297 297
             ],
298 298
             'typicalAgeRange' => [
299 299
                 'name' => 'leeftijd',
300
-                'include' => function ($event) {
300
+                'include' => function($event) {
301 301
                     return $event->typicalAgeRange;
302 302
                 },
303 303
                 'property' => 'typicalAgeRange'
304 304
             ],
305 305
             'performer' => [
306 306
                 'name' => 'uitvoerders',
307
-                'include' => function ($event) {
307
+                'include' => function($event) {
308 308
                     if (property_exists($event, 'performer')) {
309 309
                         $performerNames = [];
310 310
                         foreach ($event->performer as $performer) {
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
             ],
319 319
             'language' => [
320 320
                 'name' => 'taal van het aanbod',
321
-                'include' => function ($event) {
321
+                'include' => function($event) {
322 322
                     if (property_exists($event, 'language')) {
323 323
                         return implode(';', $event->language);
324 324
                     }
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
             ],
328 328
             'terms.theme' => [
329 329
                 'name' => 'thema',
330
-                'include' => function ($event) {
330
+                'include' => function($event) {
331 331
                     if (property_exists($event, 'terms')) {
332 332
                         foreach ($event->terms as $term) {
333 333
                             if ($term->domain && $term->label && $term->domain == 'theme') {
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
             ],
341 341
             'terms.eventtype' => [
342 342
                 'name' => 'soort aanbod',
343
-                'include' => function ($event) {
343
+                'include' => function($event) {
344 344
                     if (property_exists($event, 'terms')) {
345 345
                         foreach ($event->terms as $term) {
346 346
                             if ($term->domain && $term->label && $term->domain == 'eventtype') {
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
             ],
354 354
             'created' => [
355 355
                 'name' => 'datum aangemaakt',
356
-                'include' => function ($event) {
356
+                'include' => function($event) {
357 357
                     if (!empty($event->created)) {
358 358
                         return $this->formatDate($event->created);
359 359
                     } else {
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
             ],
365 365
             'modified' => [
366 366
                 'name' => 'datum laatste aanpassing',
367
-                'include' => function ($event) {
367
+                'include' => function($event) {
368 368
                     if (!empty($event->modified)) {
369 369
                         return $this->formatDate($event->modified);
370 370
                     } else {
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
             ],
376 376
             'available' => [
377 377
                 'name' => 'embargodatum',
378
-                'include' => function ($event) {
378
+                'include' => function($event) {
379 379
                     if (!empty($event->available)) {
380 380
                         return $this->formatDateWithoutTime($event->available);
381 381
                     } else {
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
             ],
387 387
             'startDate' => [
388 388
                 'name' => 'startdatum',
389
-                'include' => function ($event) {
389
+                'include' => function($event) {
390 390
                     if (!empty($event->startDate)) {
391 391
                         return $this->formatDate($event->startDate);
392 392
                     } else {
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
             ],
398 398
             'endDate' => [
399 399
                 'name' => 'einddatum',
400
-                'include' => function ($event) {
400
+                'include' => function($event) {
401 401
                     if (!empty($event->endDate)) {
402 402
                         return $this->formatDate($event->endDate);
403 403
                     } else {
@@ -408,14 +408,14 @@  discard block
 block discarded – undo
408 408
             ],
409 409
             'calendarType' => [
410 410
                 'name' => 'tijd type',
411
-                'include' => function ($event) {
411
+                'include' => function($event) {
412 412
                     return $event->calendarType;
413 413
                 },
414 414
                 'property' => 'calendarType'
415 415
             ],
416 416
             'location' => [
417 417
                 'name' => 'locatie naam',
418
-                'include' => function ($event) {
418
+                'include' => function($event) {
419 419
                     if (property_exists($event, 'location') && isset($event->location->name)) {
420 420
                         return reset($event->location->name);
421 421
                     }
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
             ],
425 425
             'address.streetAddress' => [
426 426
                 'name' => 'straat',
427
-                'include' => function ($event) {
427
+                'include' => function($event) {
428 428
                     if (isset($event->location->address->streetAddress)) {
429 429
                         return $event->location->address->streetAddress;
430 430
                     }
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
             ],
434 434
             'address.postalCode' => [
435 435
                 'name' => 'postcode',
436
-                'include' => function ($event) {
436
+                'include' => function($event) {
437 437
                     if (isset($event->location->address->postalCode)) {
438 438
                         return $event->location->address->postalCode;
439 439
                     }
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
             ],
443 443
             'address.addressLocality' => [
444 444
                 'name' => 'gemeente',
445
-                'include' => function ($event) {
445
+                'include' => function($event) {
446 446
                     if (isset($event->location->address->addressLocality)) {
447 447
                         return $event->location->address->addressLocality;
448 448
                     }
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
             ],
452 452
             'address.addressCountry' => [
453 453
                 'name' => 'land',
454
-                'include' => function ($event) {
454
+                'include' => function($event) {
455 455
                     if (isset($event->location->address->addressCountry)) {
456 456
                         return $event->location->address->addressCountry;
457 457
                     }
@@ -460,14 +460,14 @@  discard block
 block discarded – undo
460 460
             ],
461 461
             'image' => [
462 462
                 'name' => 'afbeelding',
463
-                'include' => function ($event) {
463
+                'include' => function($event) {
464 464
                     return !empty($event->image) ? $event->image : '';
465 465
                 },
466 466
                 'property' => 'image'
467 467
             ],
468 468
             'sameAs' => [
469 469
                 'name' => 'externe ids',
470
-                'include' => function ($event) {
470
+                'include' => function($event) {
471 471
                     if (property_exists($event, 'sameAs')) {
472 472
                         $ids = array();
473 473
 
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
             ],
483 483
             'contactPoint.email' => [
484 484
                 'name' => 'e-mail',
485
-                'include' => function ($event) use ($contactPoint) {
485
+                'include' => function($event) use ($contactPoint) {
486 486
                     return $this->listJsonldProperty(
487 487
                         $contactPoint($event),
488 488
                         'email'
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
             ],
493 493
             'contactPoint.telephone' => [
494 494
                 'name' => 'telefoon',
495
-                'include' => function ($event) use ($contactPoint) {
495
+                'include' => function($event) use ($contactPoint) {
496 496
                     return $this->listJsonldProperty(
497 497
                         $contactPoint($event),
498 498
                         'telephone'
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
             ],
503 503
             'contactPoint.url' => [
504 504
                 'name' => 'url',
505
-                'include' => function ($event) use ($contactPoint) {
505
+                'include' => function($event) use ($contactPoint) {
506 506
                     $contactUrls = $this->listJsonldProperty(
507 507
                         $contactPoint($event),
508 508
                         'url'
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
             ],
516 516
             'contactPoint.reservations.email' => [
517 517
                 'name' => 'e-mail reservaties',
518
-                'include' => function ($event) use ($contactPoint) {
518
+                'include' => function($event) use ($contactPoint) {
519 519
                     return $this->listJsonldProperty(
520 520
                         $contactPoint($event, 'Reservations'),
521 521
                         'email'
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
             ],
526 526
             'contactPoint.reservations.telephone' => [
527 527
                 'name' => 'telefoon reservaties',
528
-                'include' => function ($event) use ($contactPoint) {
528
+                'include' => function($event) use ($contactPoint) {
529 529
                     return $this->listJsonldProperty(
530 530
                         $contactPoint($event, 'Reservations'),
531 531
                         'telephone'
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
             ],
536 536
             'contactPoint.reservations.url' => [
537 537
                 'name' => 'online reservaties',
538
-                'include' => function ($event) use ($contactPoint) {
538
+                'include' => function($event) use ($contactPoint) {
539 539
                     return $this->listJsonldProperty(
540 540
                         $contactPoint($event, 'Reservations'),
541 541
                         'url'
Please login to merge, or discard this patch.