Code Duplication    Length = 15-15 lines in 2 locations

src/Event/ReadModel/Permission/Doctrine/DBALRepository.php 1 location

@@ 59-73 (lines=15) @@
56
    /**
57
     * @inheritdoc
58
     */
59
    public function markEventEditableByUser(String $eventId, String $uitId)
60
    {
61
        try {
62
            $this->connection->insert(
63
                $this->tableName->toNative(),
64
                [
65
                    'event_id' => $eventId->toNative(),
66
                    'user_id' => $uitId->toNative()
67
                ]
68
            );
69
        } catch (UniqueConstraintViolationException $e) {
70
            // Intentionally catching database exception occurring when the
71
            // permission record is already in place.
72
        }
73
    }
74
}
75

src/Place/ReadModel/Permission/Doctrine/DBALRepository.php 1 location

@@ 59-73 (lines=15) @@
56
    /**
57
     * @inheritdoc
58
     */
59
    public function markPlaceEditableByUser(String $placeId, String $uitId)
60
    {
61
        try {
62
            $this->connection->insert(
63
                $this->tableName->toNative(),
64
                [
65
                    'place_id' => $placeId->toNative(),
66
                    'user_id' => $uitId->toNative()
67
                ]
68
            );
69
        } catch (UniqueConstraintViolationException $e) {
70
            // Intentionally catching database exception occurring when the
71
            // permission record is already in place.
72
        }
73
    }
74
}
75