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

@@ 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