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

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