Code Duplication    Length = 8-8 lines in 2 locations

src/GoogleCalendar.php 2 locations

@@ 95-102 (lines=8) @@
92
     *
93
     * @return \Google_Service_Calendar_Event
94
     */
95
    public function insertEvent($event) : Google_Service_Calendar_Event
96
    {
97
        if ($event instanceof Event) {
98
            $event = $event->googleEvent;
99
        }
100
101
        return $this->calendarService->events->insert($this->calendarId, $event);
102
    }
103
104
    /**
105
     * @param \Spatie\GoogleCalendar\Event|Google_Service_Calendar_Event $event
@@ 109-116 (lines=8) @@
106
     *
107
     * @return \Google_Service_Calendar_Event
108
     */
109
    public function updateEvent($event) : Google_Service_Calendar_Event
110
    {
111
        if ($event instanceof Event) {
112
            $event = $event->googleEvent;
113
        }
114
115
        return $this->calendarService->events->update($this->calendarId, $event->id, $event);
116
    }
117
118
    /**
119
     * @param string|\Spatie\GoogleCalendar\Event $eventId