@@ -21,7 +21,7 @@ |
||
| 21 | 21 | /** |
| 22 | 22 | * @return bool |
| 23 | 23 | */ |
| 24 | - public function isSuccessFull(){ |
|
| 24 | + public function isSuccessFull() { |
|
| 25 | 25 | return $this->code == HttpResponse::HttpCodeNoContent; |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | \ No newline at end of file |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $this->timezone = $timezone; |
| 61 | 61 | $this->uid = md5(uniqid(mt_rand(), true)); |
| 62 | 62 | |
| 63 | - if(is_null($this->timezone)){ |
|
| 63 | + if (is_null($this->timezone)) { |
|
| 64 | 64 | $this->timezone = new DateTimeZone('UTC'); |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | /** |
| 69 | 69 | * @param string $uid |
| 70 | 70 | */ |
| 71 | - public function setUID($uid){ |
|
| 71 | + public function setUID($uid) { |
|
| 72 | 72 | $this->uid = $uid; |
| 73 | 73 | } |
| 74 | 74 | |
@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | * @param array $params |
| 27 | 27 | * @return array |
| 28 | 28 | */ |
| 29 | - private static function createHeadersFor($http_method, array $params = []){ |
|
| 30 | - switch ($http_method){ |
|
| 29 | + private static function createHeadersFor($http_method, array $params = []) { |
|
| 30 | + switch ($http_method) { |
|
| 31 | 31 | case HttpMethods::PropFind: |
| 32 | 32 | case HttpMethods::Options: |
| 33 | 33 | case HttpMethods::Report: |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | ]; |
| 39 | 39 | case HttpMethods::Delete: |
| 40 | 40 | $etag = $params[0]; |
| 41 | - if(!empty($etag)) { |
|
| 41 | + if (!empty($etag)) { |
|
| 42 | 42 | return [ |
| 43 | 43 | Headers::IfMatch => $etag, |
| 44 | 44 | ]; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | ]; |
| 51 | 51 | case HttpMethods::Put: |
| 52 | 52 | $etag = $params[0]; |
| 53 | - if(!empty($etag)){ |
|
| 53 | + if (!empty($etag)) { |
|
| 54 | 54 | return [ |
| 55 | 55 | Headers::ContentType => ContentTypes::Calendar, |
| 56 | 56 | Headers::IfMatch => $etag |
@@ -65,11 +65,10 @@ discard block |
||
| 65 | 65 | * @param int $depth |
| 66 | 66 | * @return Request |
| 67 | 67 | */ |
| 68 | - public static function createPropFindRequest($url , $body, $depth = 1){ |
|
| 69 | - return new Request |
|
| 70 | - ( |
|
| 68 | + public static function createPropFindRequest($url, $body, $depth = 1) { |
|
| 69 | + return new Request( |
|
| 71 | 70 | HttpMethods::PropFind, |
| 72 | - $url , |
|
| 71 | + $url, |
|
| 73 | 72 | self::createHeadersFor(HttpMethods::PropFind, [$depth]), |
| 74 | 73 | $body |
| 75 | 74 | ); |
@@ -80,9 +79,8 @@ discard block |
||
| 80 | 79 | * @param string $body |
| 81 | 80 | * @return Request |
| 82 | 81 | */ |
| 83 | - public static function createMakeCalendarRequest($url , $body){ |
|
| 84 | - return new Request |
|
| 85 | - ( |
|
| 82 | + public static function createMakeCalendarRequest($url, $body) { |
|
| 83 | + return new Request( |
|
| 86 | 84 | HttpMethods::MakeCalendar, |
| 87 | 85 | $url, |
| 88 | 86 | self::createHeadersFor(HttpMethods::MakeCalendar), |
@@ -95,9 +93,8 @@ discard block |
||
| 95 | 93 | * @param int $depth |
| 96 | 94 | * @return Request |
| 97 | 95 | */ |
| 98 | - public static function createOptionsRequest($url, $depth = 1){ |
|
| 99 | - return new Request |
|
| 100 | - ( |
|
| 96 | + public static function createOptionsRequest($url, $depth = 1) { |
|
| 97 | + return new Request( |
|
| 101 | 98 | HttpMethods::Options, |
| 102 | 99 | $url, |
| 103 | 100 | self::createHeadersFor(HttpMethods::Options, [$depth]) |
@@ -110,9 +107,8 @@ discard block |
||
| 110 | 107 | * @param int $depth |
| 111 | 108 | * @return Request |
| 112 | 109 | */ |
| 113 | - public static function createReportRequest($url , $body, $depth = 1){ |
|
| 114 | - return new Request |
|
| 115 | - ( |
|
| 110 | + public static function createReportRequest($url, $body, $depth = 1) { |
|
| 111 | + return new Request( |
|
| 116 | 112 | HttpMethods::Report, |
| 117 | 113 | $url, |
| 118 | 114 | self::createHeadersFor(HttpMethods::Report, [$depth]), |
@@ -125,9 +121,8 @@ discard block |
||
| 125 | 121 | * @param string $etag |
| 126 | 122 | * @return Request |
| 127 | 123 | */ |
| 128 | - public static function createDeleteRequest($url , $etag){ |
|
| 129 | - return new Request |
|
| 130 | - ( |
|
| 124 | + public static function createDeleteRequest($url, $etag) { |
|
| 125 | + return new Request( |
|
| 131 | 126 | HttpMethods::Delete, |
| 132 | 127 | $url, |
| 133 | 128 | self::createHeadersFor(HttpMethods::Delete, [$etag]) |
@@ -138,9 +133,8 @@ discard block |
||
| 138 | 133 | * @param string $url |
| 139 | 134 | * @return Request |
| 140 | 135 | */ |
| 141 | - public static function createGetRequest($url){ |
|
| 142 | - return new Request |
|
| 143 | - ( |
|
| 136 | + public static function createGetRequest($url) { |
|
| 137 | + return new Request( |
|
| 144 | 138 | HttpMethods::Get, |
| 145 | 139 | $url, |
| 146 | 140 | self::createHeadersFor(HttpMethods::Get) |
@@ -153,9 +147,8 @@ discard block |
||
| 153 | 147 | * @param string $etag |
| 154 | 148 | * @return Request |
| 155 | 149 | */ |
| 156 | - public static function createPutRequest($url, $body, $etag = null){ |
|
| 157 | - return new Request |
|
| 158 | - ( |
|
| 150 | + public static function createPutRequest($url, $body, $etag = null) { |
|
| 151 | + return new Request( |
|
| 159 | 152 | HttpMethods::Put, |
| 160 | 153 | $url, |
| 161 | 154 | self::createHeadersFor(HttpMethods::Put, [$etag]), |
@@ -58,11 +58,11 @@ discard block |
||
| 58 | 58 | $filter = []; |
| 59 | 59 | $props = []; |
| 60 | 60 | |
| 61 | - if($this->filter->useGetETags()){ |
|
| 61 | + if ($this->filter->useGetETags()) { |
|
| 62 | 62 | $props['{DAV:}getetag'] = ''; |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - if($this->filter->useGetCalendarData()){ |
|
| 65 | + if ($this->filter->useGetCalendarData()) { |
|
| 66 | 66 | $props['{urn:ietf:params:xml:ns:caldav}calendar-data'] = ''; |
| 67 | 67 | } |
| 68 | 68 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | ]; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - $nodes = [ |
|
| 92 | + $nodes = [ |
|
| 93 | 93 | '{DAV:}prop' => [ |
| 94 | 94 | $props |
| 95 | 95 | ], |
@@ -37,8 +37,8 @@ |
||
| 37 | 37 | ]; |
| 38 | 38 | |
| 39 | 39 | $elements = []; |
| 40 | - foreach( $this->properties as $val ) { |
|
| 41 | - $elements[] = [ $val => "" ]; |
|
| 40 | + foreach ($this->properties as $val) { |
|
| 41 | + $elements[] = [$val => ""]; |
|
| 42 | 42 | } |
| 43 | 43 | return $service->write('{DAV:}propfind', |
| 44 | 44 | [ |
@@ -22,24 +22,24 @@ discard block |
||
| 22 | 22 | /** |
| 23 | 23 | * @return string|null |
| 24 | 24 | */ |
| 25 | - public function getSyncToken(){ |
|
| 26 | - return isset($this->content['sync-token'])? $this->content['sync-token'] : null; |
|
| 25 | + public function getSyncToken() { |
|
| 26 | + return isset($this->content['sync-token']) ? $this->content['sync-token'] : null; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * @return bool |
| 31 | 31 | */ |
| 32 | - public function hasAvailableChanges(){ |
|
| 32 | + public function hasAvailableChanges() { |
|
| 33 | 33 | return count($this->responses) > 0; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * @return ETagEntityResponse[] |
| 38 | 38 | */ |
| 39 | - public function getUpdates(){ |
|
| 39 | + public function getUpdates() { |
|
| 40 | 40 | $res = []; |
| 41 | - foreach ($this->responses as $entity){ |
|
| 42 | - if($entity instanceof ETagEntityResponse && $entity->getStatus() != HttpResponse::HttpOKStatus) continue; |
|
| 41 | + foreach ($this->responses as $entity) { |
|
| 42 | + if ($entity instanceof ETagEntityResponse && $entity->getStatus() != HttpResponse::HttpOKStatus) continue; |
|
| 43 | 43 | $res[] = $entity; |
| 44 | 44 | } |
| 45 | 45 | return $res; |
@@ -48,10 +48,10 @@ discard block |
||
| 48 | 48 | /** |
| 49 | 49 | * @return ETagEntityResponse[] |
| 50 | 50 | */ |
| 51 | - public function getDeletes(){ |
|
| 51 | + public function getDeletes() { |
|
| 52 | 52 | $res = []; |
| 53 | - foreach ($this->responses as $entity){ |
|
| 54 | - if($entity instanceof ETagEntityResponse && $entity->getStatus() != HttpResponse::HttpNotFoundStatus) continue; |
|
| 53 | + foreach ($this->responses as $entity) { |
|
| 54 | + if ($entity instanceof ETagEntityResponse && $entity->getStatus() != HttpResponse::HttpNotFoundStatus) continue; |
|
| 55 | 55 | $res[] = $entity; |
| 56 | 56 | } |
| 57 | 57 | return $res; |
@@ -139,15 +139,15 @@ discard block |
||
| 139 | 139 | * @param Request $http_request |
| 140 | 140 | * @return mixed|\Psr\Http\Message\ResponseInterface |
| 141 | 141 | */ |
| 142 | - private function makeRequest(Request $http_request){ |
|
| 143 | - try{ |
|
| 142 | + private function makeRequest(Request $http_request) { |
|
| 143 | + try { |
|
| 144 | 144 | return $this->client->send($http_request, [ |
| 145 | 145 | 'auth' => [$this->user, $this->password, $this->authtype], |
| 146 | 146 | 'timeout' => $this->timeout |
| 147 | 147 | ]); |
| 148 | 148 | } |
| 149 | - catch (ClientException $ex){ |
|
| 150 | - switch($ex->getCode()){ |
|
| 149 | + catch (ClientException $ex) { |
|
| 150 | + switch ($ex->getCode()) { |
|
| 151 | 151 | case 401: |
| 152 | 152 | throw new UserUnAuthorizedException(); |
| 153 | 153 | break; |
@@ -175,9 +175,9 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | $res = $http_response->hasHeader(self::DAVHeader); |
| 177 | 177 | $options = []; |
| 178 | - if($res){ |
|
| 178 | + if ($res) { |
|
| 179 | 179 | $val = $http_response->getHeaderLine(self::DAVHeader); |
| 180 | - if(!empty($val)){ |
|
| 180 | + if (!empty($val)) { |
|
| 181 | 181 | $options = explode(', ', $val); |
| 182 | 182 | } |
| 183 | 183 | } |
@@ -191,14 +191,13 @@ discard block |
||
| 191 | 191 | public function getUserPrincipal() |
| 192 | 192 | { |
| 193 | 193 | $http_response = $this->makeRequest( |
| 194 | - RequestFactory::createPropFindRequest |
|
| 195 | - ( |
|
| 194 | + RequestFactory::createPropFindRequest( |
|
| 196 | 195 | $this->server_url, |
| 197 | 196 | CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::PrincipalRequestType)->getContent() |
| 198 | 197 | ) |
| 199 | 198 | ); |
| 200 | 199 | |
| 201 | - return new UserPrincipalResponse($this->server_url, (string)$http_response->getBody(), $http_response->getStatusCode()); |
|
| 200 | + return new UserPrincipalResponse($this->server_url, (string) $http_response->getBody(), $http_response->getStatusCode()); |
|
| 202 | 201 | } |
| 203 | 202 | |
| 204 | 203 | /** |
@@ -208,14 +207,13 @@ discard block |
||
| 208 | 207 | public function getCalendarHome($principal_url) |
| 209 | 208 | { |
| 210 | 209 | $http_response = $this->makeRequest( |
| 211 | - RequestFactory::createPropFindRequest |
|
| 212 | - ( |
|
| 210 | + RequestFactory::createPropFindRequest( |
|
| 213 | 211 | $principal_url, |
| 214 | 212 | CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::CalendarHomeRequestType)->getContent() |
| 215 | 213 | ) |
| 216 | 214 | ); |
| 217 | 215 | |
| 218 | - return new CalendarHomesResponse($this->server_url, (string)$http_response->getBody(), $http_response->getStatusCode()); |
|
| 216 | + return new CalendarHomesResponse($this->server_url, (string) $http_response->getBody(), $http_response->getStatusCode()); |
|
| 219 | 217 | } |
| 220 | 218 | |
| 221 | 219 | /** |
@@ -229,10 +227,9 @@ discard block |
||
| 229 | 227 | $uid = $vo->getUID(); |
| 230 | 228 | $resource_name = $vo->getResourceName(); |
| 231 | 229 | |
| 232 | - $resource_url = $calendar_home_set . ($resource_name ? $resource_name : $uid); |
|
| 230 | + $resource_url = $calendar_home_set.($resource_name ? $resource_name : $uid); |
|
| 233 | 231 | $http_response = $this->makeRequest( |
| 234 | - RequestFactory::createMakeCalendarRequest |
|
| 235 | - ( |
|
| 232 | + RequestFactory::createMakeCalendarRequest( |
|
| 236 | 233 | $resource_url, |
| 237 | 234 | CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::CalendarCreateRequestType, [$vo])->getContent() |
| 238 | 235 | ) |
@@ -248,14 +245,13 @@ discard block |
||
| 248 | 245 | public function getCalendars($calendar_home_set_url) |
| 249 | 246 | { |
| 250 | 247 | $http_response = $this->makeRequest( |
| 251 | - RequestFactory::createPropFindRequest |
|
| 252 | - ( |
|
| 248 | + RequestFactory::createPropFindRequest( |
|
| 253 | 249 | $calendar_home_set_url, |
| 254 | 250 | CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::CalendarsRequestType)->getContent() |
| 255 | 251 | ) |
| 256 | 252 | ); |
| 257 | 253 | |
| 258 | - return new GetCalendarsResponse($this->server_url, (string)$http_response->getBody(), $http_response->getStatusCode()); |
|
| 254 | + return new GetCalendarsResponse($this->server_url, (string) $http_response->getBody(), $http_response->getStatusCode()); |
|
| 259 | 255 | } |
| 260 | 256 | |
| 261 | 257 | /** |
@@ -266,15 +262,14 @@ discard block |
||
| 266 | 262 | public function getCalendar($calendar_url, $depth = 0) |
| 267 | 263 | { |
| 268 | 264 | $http_response = $this->makeRequest( |
| 269 | - RequestFactory::createPropFindRequest |
|
| 270 | - ( |
|
| 265 | + RequestFactory::createPropFindRequest( |
|
| 271 | 266 | $calendar_url, |
| 272 | 267 | CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::CalendarRequestType)->getContent(), |
| 273 | 268 | $depth |
| 274 | 269 | ) |
| 275 | 270 | ); |
| 276 | 271 | |
| 277 | - return new GetCalendarResponse($this->server_url, (string)$http_response->getBody(), $http_response->getStatusCode()); |
|
| 272 | + return new GetCalendarResponse($this->server_url, (string) $http_response->getBody(), $http_response->getStatusCode()); |
|
| 278 | 273 | } |
| 279 | 274 | |
| 280 | 275 | |
@@ -287,14 +282,13 @@ discard block |
||
| 287 | 282 | { |
| 288 | 283 | |
| 289 | 284 | $http_response = $this->makeRequest( |
| 290 | - RequestFactory::createReportRequest |
|
| 291 | - ( |
|
| 285 | + RequestFactory::createReportRequest( |
|
| 292 | 286 | $calendar_url, |
| 293 | 287 | CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::CalendarSyncRequestType, [$sync_token])->getContent() |
| 294 | 288 | ) |
| 295 | 289 | ); |
| 296 | 290 | |
| 297 | - return new CalendarSyncInfoResponse($this->server_url, (string)$http_response->getBody(), $http_response->getStatusCode()); |
|
| 291 | + return new CalendarSyncInfoResponse($this->server_url, (string) $http_response->getBody(), $http_response->getStatusCode()); |
|
| 298 | 292 | } |
| 299 | 293 | |
| 300 | 294 | /** |
@@ -307,19 +301,17 @@ discard block |
||
| 307 | 301 | $uid = $vo->getUID(); |
| 308 | 302 | $resource_url = $calendar_url.$uid.self::SchedulingInformationSuffix; |
| 309 | 303 | $http_response = $this->makeRequest( |
| 310 | - RequestFactory::createPutRequest |
|
| 311 | - ( |
|
| 304 | + RequestFactory::createPutRequest( |
|
| 312 | 305 | $resource_url, |
| 313 | 306 | CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::EventCreateRequestType, [$vo])->getContent() |
| 314 | 307 | ) |
| 315 | 308 | ); |
| 316 | 309 | $etag = $http_response->hasHeader(self::ETagHeader) ? $http_response->getHeaderLine(self::ETagHeader) : null; |
| 317 | - return new EventCreatedResponse |
|
| 318 | - ( |
|
| 310 | + return new EventCreatedResponse( |
|
| 319 | 311 | $uid, |
| 320 | 312 | $etag, |
| 321 | 313 | $resource_url, |
| 322 | - (string)$http_response->getBody(), |
|
| 314 | + (string) $http_response->getBody(), |
|
| 323 | 315 | $http_response->getStatusCode() |
| 324 | 316 | ); |
| 325 | 317 | } |
@@ -335,20 +327,18 @@ discard block |
||
| 335 | 327 | $uid = $vo->getUID(); |
| 336 | 328 | $resource_url = $calendar_url.$uid.self::SchedulingInformationSuffix; |
| 337 | 329 | $http_response = $this->makeRequest( |
| 338 | - RequestFactory::createPutRequest |
|
| 339 | - ( |
|
| 330 | + RequestFactory::createPutRequest( |
|
| 340 | 331 | $resource_url, |
| 341 | 332 | CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::EventUpdateRequestType, [$vo])->getContent(), |
| 342 | 333 | $etag |
| 343 | 334 | ) |
| 344 | 335 | ); |
| 345 | 336 | $etag = $http_response->hasHeader(self::ETagHeader) ? $http_response->getHeaderLine(self::ETagHeader) : null; |
| 346 | - return new EventUpdatedResponse |
|
| 347 | - ( |
|
| 337 | + return new EventUpdatedResponse( |
|
| 348 | 338 | $uid, |
| 349 | 339 | $etag, |
| 350 | 340 | $resource_url, |
| 351 | - (string)$http_response->getBody(), |
|
| 341 | + (string) $http_response->getBody(), |
|
| 352 | 342 | $http_response->getStatusCode() |
| 353 | 343 | ); |
| 354 | 344 | } |
@@ -362,16 +352,14 @@ discard block |
||
| 362 | 352 | public function deleteEvent($calendar_url, $uid, $etag = null) |
| 363 | 353 | { |
| 364 | 354 | $http_response = $this->makeRequest( |
| 365 | - RequestFactory::createDeleteRequest |
|
| 366 | - ( |
|
| 355 | + RequestFactory::createDeleteRequest( |
|
| 367 | 356 | $calendar_url.$uid.self::SchedulingInformationSuffix, |
| 368 | 357 | $etag |
| 369 | 358 | ) |
| 370 | 359 | ); |
| 371 | 360 | |
| 372 | - return new EventDeletedResponse |
|
| 373 | - ( |
|
| 374 | - (string)$http_response->getBody(), $http_response->getStatusCode() |
|
| 361 | + return new EventDeletedResponse( |
|
| 362 | + (string) $http_response->getBody(), $http_response->getStatusCode() |
|
| 375 | 363 | ); |
| 376 | 364 | } |
| 377 | 365 | |
@@ -379,15 +367,14 @@ discard block |
||
| 379 | 367 | * @param string $event_url |
| 380 | 368 | * @return string |
| 381 | 369 | */ |
| 382 | - public function getEventVCardBy($event_url){ |
|
| 370 | + public function getEventVCardBy($event_url) { |
|
| 383 | 371 | $http_response = $this->makeRequest( |
| 384 | - RequestFactory::createGetRequest |
|
| 385 | - ( |
|
| 372 | + RequestFactory::createGetRequest( |
|
| 386 | 373 | $event_url |
| 387 | 374 | ) |
| 388 | 375 | ); |
| 389 | 376 | |
| 390 | - $ical = (string)$http_response->getBody(); |
|
| 377 | + $ical = (string) $http_response->getBody(); |
|
| 391 | 378 | return $ical; |
| 392 | 379 | } |
| 393 | 380 | |
@@ -399,17 +386,15 @@ discard block |
||
| 399 | 386 | public function getEventsBy($calendar_url, array $events_urls) |
| 400 | 387 | { |
| 401 | 388 | $http_response = $this->makeRequest( |
| 402 | - RequestFactory::createReportRequest |
|
| 403 | - ( |
|
| 389 | + RequestFactory::createReportRequest( |
|
| 404 | 390 | $calendar_url, |
| 405 | 391 | CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::CalendarMultiGetRequestType, [$events_urls])->getContent() |
| 406 | 392 | ) |
| 407 | 393 | ); |
| 408 | 394 | |
| 409 | - return new ResourceCollectionResponse |
|
| 410 | - ( |
|
| 395 | + return new ResourceCollectionResponse( |
|
| 411 | 396 | $this->server_url, |
| 412 | - (string)$http_response->getBody(), |
|
| 397 | + (string) $http_response->getBody(), |
|
| 413 | 398 | $http_response->getStatusCode() |
| 414 | 399 | ); |
| 415 | 400 | } |
@@ -423,17 +408,15 @@ discard block |
||
| 423 | 408 | { |
| 424 | 409 | |
| 425 | 410 | $http_response = $this->makeRequest( |
| 426 | - RequestFactory::createReportRequest |
|
| 427 | - ( |
|
| 411 | + RequestFactory::createReportRequest( |
|
| 428 | 412 | $calendar_url, |
| 429 | 413 | CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::CalendarQueryRequestType, [$filter])->getContent() |
| 430 | 414 | ) |
| 431 | 415 | ); |
| 432 | 416 | |
| 433 | - return new ResourceCollectionResponse |
|
| 434 | - ( |
|
| 417 | + return new ResourceCollectionResponse( |
|
| 435 | 418 | $this->server_url, |
| 436 | - (string)$http_response->getBody(), |
|
| 419 | + (string) $http_response->getBody(), |
|
| 437 | 420 | $http_response->getStatusCode() |
| 438 | 421 | ); |
| 439 | 422 | } |
@@ -446,16 +429,14 @@ discard block |
||
| 446 | 429 | public function deleteCalendar($calendar_url, $etag = null) |
| 447 | 430 | { |
| 448 | 431 | $http_response = $this->makeRequest( |
| 449 | - RequestFactory::createDeleteRequest |
|
| 450 | - ( |
|
| 432 | + RequestFactory::createDeleteRequest( |
|
| 451 | 433 | $calendar_url, |
| 452 | 434 | $etag |
| 453 | 435 | ) |
| 454 | 436 | ); |
| 455 | 437 | |
| 456 | - return new CalendarDeletedResponse |
|
| 457 | - ( |
|
| 458 | - (string)$http_response->getBody(), $http_response->getStatusCode() |
|
| 438 | + return new CalendarDeletedResponse( |
|
| 439 | + (string) $http_response->getBody(), $http_response->getStatusCode() |
|
| 459 | 440 | ); |
| 460 | 441 | } |
| 461 | 442 | } |