Code Duplication    Length = 15-23 lines in 2 locations

src/Event/DefaultEventEditingService.php 1 location

@@ 64-86 (lines=23) @@
61
    /**
62
     * {@inheritdoc}
63
     */
64
    public function createEvent(
65
        Title $title,
66
        EventType $eventType,
67
        Location $location,
68
        CalendarInterface $calendar,
69
        $theme = null
70
    ) {
71
        $eventId = $this->uuidGenerator->generate();
72
73
        $event = Event::create(
74
            $eventId,
75
            $title,
76
            $eventType,
77
            $location,
78
            $calendar,
79
            $theme,
80
            $this->publicationDate
81
        );
82
83
        $this->writeRepository->save($event);
84
85
        return $eventId;
86
    }
87
88
    /**
89
     * @inheritdoc

src/Place/DefaultPlaceEditingService.php 1 location

@@ 59-73 (lines=15) @@
56
    /**
57
     * {@inheritdoc}
58
     */
59
    public function createPlace(
60
        Title $title,
61
        EventType $eventType,
62
        Address $address,
63
        CalendarInterface $calendar,
64
        Theme $theme = null
65
    ) {
66
        $id = $this->uuidGenerator->generate();
67
68
        $place = Place::createPlace($id, $title, $eventType, $address, $calendar, $theme, $this->publicationDate);
69
70
        $this->writeRepository->save($place);
71
72
        return $id;
73
    }
74
75
    /**
76
     * {@inheritdoc}