Code Duplication    Length = 15-23 lines in 2 locations

src/Place/DefaultPlaceEditingService.php 1 location

@@ 49-63 (lines=15) @@
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function createPlace(
50
        Title $title,
51
        EventType $eventType,
52
        Address $address,
53
        CalendarInterface $calendar,
54
        Theme $theme = null
55
    ) {
56
        $id = $this->uuidGenerator->generate();
57
58
        $place = Place::createPlace($id, $title, $eventType, $address, $calendar, $theme, $this->publicationDate);
59
60
        $this->writeRepository->save($place);
61
62
        return $id;
63
    }
64
65
    /**
66
     * {@inheritdoc}

src/Event/DefaultEventEditingService.php 1 location

@@ 83-105 (lines=23) @@
80
    /**
81
     * {@inheritdoc}
82
     */
83
    public function createEvent(
84
        Title $title,
85
        EventType $eventType,
86
        Location $location,
87
        CalendarInterface $calendar,
88
        $theme = null
89
    ) {
90
        $eventId = $this->uuidGenerator->generate();
91
92
        $event = Event::create(
93
            $eventId,
94
            $title,
95
            $eventType,
96
            $location,
97
            $calendar,
98
            $theme,
99
            $this->publicationDate
100
        );
101
102
        $this->writeRepository->save($event);
103
104
        return $eventId;
105
    }
106
107
    /**
108
     * @inheritdoc