Code Duplication    Length = 17-17 lines in 2 locations

src/ReadModel/Index/Projector.php 2 locations

@@ 100-116 (lines=17) @@
97
     * @param EventCreated $eventCreated
98
     * @param DomainMessage $domainMessage
99
     */
100
    protected function applyEventCreated(
101
        EventCreated $eventCreated,
102
        DomainMessage $domainMessage
103
    ) {
104
        $eventId = $eventCreated->getEventId();
105
106
        $location = $eventCreated->getLocation();
107
108
        $this->addNewItemToIndex(
109
            $domainMessage,
110
            $eventId,
111
            EntityType::EVENT(),
112
            $eventCreated->getTitle(),
113
            $location->getAddress()->getPostalCode(),
114
            $location->getAddress()->getCountry()->getCode()
115
        );
116
    }
117
118
    /**
119
     * @param EventCopied $eventCopied
@@ 140-156 (lines=17) @@
137
     * @param PlaceCreated $placeCreated
138
     * @param DomainMessage $domainMessage
139
     */
140
    protected function applyPlaceCreated(
141
        PlaceCreated $placeCreated,
142
        DomainMessage $domainMessage
143
    ) {
144
        $placeId = $placeCreated->getPlaceId();
145
146
        $address = $placeCreated->getAddress();
147
148
        $this->addNewItemToIndex(
149
            $domainMessage,
150
            $placeId,
151
            EntityType::PLACE(),
152
            $placeCreated->getTitle(),
153
            $address->getPostalCode(),
154
            $address->getCountry()->getCode()
155
        );
156
    }
157
158
    private function addNewItemToIndex(
159
        DomainMessage $domainMessage,