Code Duplication    Length = 8-8 lines in 2 locations

src/GoogleCalendar.php 2 locations

@@ 93-100 (lines=8) @@
90
     * @link https://developers.google.com/google-apps/calendar/v3/reference/events/insert
91
     * @return Google_Service_Calendar_Event|RequestInterface
92
     */
93
    public function insertEvent($event, $optParams = [])
94
    {
95
        if ($event instanceof Event) {
96
            $event = $event->googleEvent;
97
        }
98
99
        return $this->calendarService->events->insert($this->calendarId, $event, $optParams);
100
    }
101
102
    public function insertEvents(iterable $events, $optParams = [])
103
    {
@@ 119-126 (lines=8) @@
116
     *
117
     * @return Google_Service_Calendar_Event|RequestInterface
118
     */
119
    public function updateEvent($event, $optParams = [])
120
    {
121
        if ($event instanceof Event) {
122
            $event = $event->googleEvent;
123
        }
124
125
        return $this->calendarService->events->update($this->calendarId, $event->id, $event, $optParams);
126
    }
127
128
    public function updateEvents(iterable $events, $optParams = [])
129
    {