Code Duplication    Length = 12-12 lines in 2 locations

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

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

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

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