Code Duplication    Length = 8-8 lines in 2 locations

src/GoogleCalendar.php 2 locations

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