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

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