@@ -16,6 +16,9 @@ discard block |
||
16 | 16 | /** @var int */ |
17 | 17 | protected $calendarId; |
18 | 18 | |
19 | + /** |
|
20 | + * @param null|string $calendarId |
|
21 | + */ |
|
19 | 22 | public static function createFromGoogleCalendarEvent(Google_Service_Calendar_Event $googleEvent, $calendarId) |
20 | 23 | { |
21 | 24 | $event = new static(); |
@@ -137,6 +140,9 @@ discard block |
||
137 | 140 | return static::createFromGoogleCalendarEvent($googleEvent, $calendarId); |
138 | 141 | } |
139 | 142 | |
143 | + /** |
|
144 | + * @param string $method |
|
145 | + */ |
|
140 | 146 | public function save($method = null): Event |
141 | 147 | { |
142 | 148 | $method = $method ?? ($this->exists() ? 'updateEvent' : 'insertEvent'); |
@@ -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 | { |
@@ -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 |