@@ -16,10 +16,10 @@ discard block |
||
16 | 16 | { |
17 | 17 | $url_parameters = array(); |
18 | 18 | |
19 | - if(!empty($syncToken)){ |
|
19 | + if (!empty($syncToken)) { |
|
20 | 20 | $url_parameters['syncToken'] = strip_tags($syncToken); |
21 | 21 | } else { |
22 | - if(is_null($startDate)){ |
|
22 | + if (is_null($startDate)) { |
|
23 | 23 | $startDate = new DateTime('now'); |
24 | 24 | $interval = new DateInterval("P1D"); |
25 | 25 | $startDate->sub($interval); |
@@ -29,14 +29,14 @@ discard block |
||
29 | 29 | |
30 | 30 | $this->request( |
31 | 31 | "GET", |
32 | - "v3/calendars/primary/events?". http_build_query($url_parameters), |
|
32 | + "v3/calendars/primary/events?" . http_build_query($url_parameters), |
|
33 | 33 | null, |
34 | 34 | $headers |
35 | 35 | ); |
36 | 36 | return $this; |
37 | 37 | } |
38 | 38 | |
39 | - public function create(string $summary, DateTime $start, DateTime $end,?string $description = null, ?string $location = null, ?string $calendaId = 'primary', ?array $attendees = []): Schedule |
|
39 | + public function create(string $summary, DateTime $start, DateTime $end, ?string $description = null, ?string $location = null, ?string $calendaId = 'primary', ?array $attendees = []): Schedule |
|
40 | 40 | { |
41 | 41 | $schedule = [ |
42 | 42 | "summary" => $summary, |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | return $this; |
57 | 57 | } |
58 | 58 | |
59 | - public function update(string $eventId, string $summary, DateTime $start, DateTime $end,?string $description = null, ?string $location = null, ?string $calendaId = 'primary', string $status = 'confirmed', ?array $attendees = []): Schedule |
|
59 | + public function update(string $eventId, string $summary, DateTime $start, DateTime $end, ?string $description = null, ?string $location = null, ?string $calendaId = 'primary', string $status = 'confirmed', ?array $attendees = []): Schedule |
|
60 | 60 | { |
61 | 61 | $schedule = [ |
62 | 62 | "summary" => $summary, |
@@ -14,7 +14,7 @@ |
||
14 | 14 | public function __construct(string $token) |
15 | 15 | { |
16 | 16 | $this->apiUrl = 'https://www.googleapis.com/calendar'; |
17 | - $this->headers(['Authorization' => 'Bearer '. $token]); |
|
17 | + $this->headers(['Authorization' => 'Bearer ' . $token]); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | protected function request(string $method, string $endpoint, ?array $fields = null, ?array $headers = null): void |
@@ -13,8 +13,8 @@ |
||
13 | 13 | { |
14 | 14 | $url_parameters = array(); |
15 | 15 | |
16 | - $url_parameters['fields'] = 'items(id,summary,timeZone)'; |
|
17 | - $url_parameters['minAccessRole'] = 'owner'; |
|
16 | + $url_parameters['fields'] = 'items(id,summary,timeZone)'; |
|
17 | + $url_parameters['minAccessRole'] = 'owner'; |
|
18 | 18 | |
19 | 19 | $this->request( |
20 | 20 | "GET", |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | $this->request( |
20 | 20 | "GET", |
21 | - "v3/users/me/calendarList?". http_build_query($url_parameters), |
|
21 | + "v3/users/me/calendarList?" . http_build_query($url_parameters), |
|
22 | 22 | null, |
23 | 23 | $headers |
24 | 24 | ); |