Code Duplication    Length = 12-12 lines in 2 locations

src/Event/ReadModel/Permission/Projector.php 1 location

@@ 98-109 (lines=12) @@
95
        );
96
    }
97
98
    protected function applyEventCreated(
99
        EventCreated $eventCreated,
100
        DomainMessage $domainMessage
101
    ) {
102
        $metadata = $domainMessage->getMetadata()->serialize();
103
        $ownerId = new String($metadata['user_id']);
104
105
        $this->permissionRepository->markOfferEditableByUser(
106
            new String($eventCreated->getEventId()),
107
            $ownerId
108
        );
109
    }
110
}
111

src/Place/ReadModel/Permission/Projector.php 1 location

@@ 91-102 (lines=12) @@
88
        }
89
    }
90
91
    protected function applyPlaceCreated(
92
        PlaceCreated $placeCreated,
93
        DomainMessage $domainMessage
94
    ) {
95
        $metadata = $domainMessage->getMetadata()->serialize();
96
        $ownerId = new String($metadata['user_id']);
97
98
        $this->permissionRepository->markOfferEditableByUser(
99
            new String($placeCreated->getPlaceId()),
100
            $ownerId
101
        );
102
    }
103
}
104