@@ -2,11 +2,11 @@ |
||
2 | 2 | |
3 | 3 | namespace Spatie\GoogleCalendar; |
4 | 4 | |
5 | -use DateTime; |
|
6 | 5 | use Carbon\Carbon; |
6 | +use DateTime; |
|
7 | 7 | use Google_Service_Calendar_Event; |
8 | -use Illuminate\Support\Collection; |
|
9 | 8 | use Google_Service_Calendar_EventDateTime; |
9 | +use Illuminate\Support\Collection; |
|
10 | 10 | |
11 | 11 | class Event |
12 | 12 | { |
@@ -18,6 +18,9 @@ discard block |
||
18 | 18 | |
19 | 19 | protected $attendees; |
20 | 20 | |
21 | + /** |
|
22 | + * @param null|string $calendarId |
|
23 | + */ |
|
21 | 24 | public static function createFromGoogleCalendarEvent(Google_Service_Calendar_Event $googleEvent, $calendarId) |
22 | 25 | { |
23 | 26 | $event = new static(); |
@@ -140,6 +143,9 @@ discard block |
||
140 | 143 | return static::createFromGoogleCalendarEvent($googleEvent, $calendarId); |
141 | 144 | } |
142 | 145 | |
146 | + /** |
|
147 | + * @param string $method |
|
148 | + */ |
|
143 | 149 | public function save($method = null): Event |
144 | 150 | { |
145 | 151 | $method = $method ?? ($this->exists() ? 'updateEvent' : 'insertEvent'); |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Spatie\GoogleCalendar; |
4 | 4 | |
5 | -use DateTime; |
|
6 | 5 | use Carbon\Carbon; |
6 | +use DateTime; |
|
7 | 7 | use Google_Service_Calendar; |
8 | 8 | use Google_Service_Calendar_Event; |
9 | 9 |