Code Duplication    Length = 12-12 lines in 2 locations

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

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

@@ 63-74 (lines=12) @@
60
        }
61
    }
62
63
    protected function applyEventCreated(
64
        EventCreated $eventCreated,
65
        DomainMessage $domainMessage
66
    ) {
67
        $metadata = $domainMessage->getMetadata()->serialize();
68
        $ownerId = new String($metadata['user_id']);
69
70
        $this->permissionRepository->markOfferEditableByUser(
71
            new String($eventCreated->getEventId()),
72
            $ownerId
73
        );
74
    }
75
}
76