Code Duplication    Length = 15-23 lines in 2 locations

src/Event/DefaultEventEditingService.php 1 location

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

src/Place/DefaultPlaceEditingService.php 1 location

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