GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Pull Request — master (#7)
by
unknown
03:11
created
src/Facade/Requests/CalendarQueryRequest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
89 89
             ];
90 90
         }
91 91
 
92
-        $nodes =  [
92
+        $nodes = [
93 93
             '{DAV:}prop' => [
94 94
                 $props
95 95
             ],
Please login to merge, or discard this patch.
src/Facade/Requests/AbstractPropFindWebDAVRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@
 block discarded – undo
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
             [
Please login to merge, or discard this patch.
src/Facade/Responses/UserPrincipalSingleResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      * @return string
23 23
      */
24 24
     public function getPrincipalUrl() {
25
-        return isset($this->found_props['current-user-principal']) &&  isset($this->found_props['current-user-principal']['href']) ?
25
+        return isset($this->found_props['current-user-principal']) && isset($this->found_props['current-user-principal']['href']) ?
26 26
             $this->server_url.$this->found_props['current-user-principal']['href'] : null;
27 27
     }
28 28
 }
29 29
\ No newline at end of file
Please login to merge, or discard this patch.
src/Facade/Responses/AbstractCalDAVResponse.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
      * @param string|null $body
43 43
      * @param int $code
44 44
      */
45
-    public function __construct($server_url = null, $body = null, $code = HttpResponse::HttpCodeOk )
45
+    public function __construct($server_url = null, $body = null, $code = HttpResponse::HttpCodeOk)
46 46
     {
47 47
         parent::__construct($body, $code);
48 48
         $this->server_url = $server_url;
49
-        if(!empty($this->body)) {
49
+        if (!empty($this->body)) {
50 50
             $this->stripped = $this->stripNamespacesFromTags($this->body);
51
-            $this->xml     =  simplexml_load_string($this->stripped);
52
-            if($this->xml === FALSE)
51
+            $this->xml     = simplexml_load_string($this->stripped);
52
+            if ($this->xml === FALSE)
53 53
                 throw new XMLResponseParseException();
54 54
             $this->content = $this->toAssocArray($this->xml);
55 55
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     {
62 62
     }
63 63
 
64
-    protected function setContent($content){
64
+    protected function setContent($content) {
65 65
         $this->content = $content;
66 66
     }
67 67
 
@@ -94,13 +94,13 @@  discard block
 block discarded – undo
94 94
         $nameSpaceDefRegEx = '(\S+)=["\']?((?:.(?!["\']?\s+(?:\S+)=|[>"\']))+.)["\']?';
95 95
 
96 96
         // Cycle through each namespace and remove it from the XML string
97
-        foreach( $toRemove as $remove ) {
97
+        foreach ($toRemove as $remove) {
98 98
             // First remove the namespace from the opening of the tag
99
-            $xml = str_replace('<' . $remove . ':', '<', $xml);
99
+            $xml = str_replace('<'.$remove.':', '<', $xml);
100 100
             // Now remove the namespace from the closing of the tag
101
-            $xml = str_replace('</' . $remove . ':', '</', $xml);
101
+            $xml = str_replace('</'.$remove.':', '</', $xml);
102 102
             // This XML uses the name space with CommentText, so remove that too
103
-            $xml = str_replace($remove . ':commentText', 'commentText', $xml);
103
+            $xml = str_replace($remove.':commentText', 'commentText', $xml);
104 104
             // Complete the pattern for RegEx to remove this namespace declaration
105 105
             $pattern = "/xmlns:{$remove}{$nameSpaceDefRegEx}/";
106 106
             // Remove the actual namespace declaration using the Pattern
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     /**
125 125
      * @return bool
126 126
      */
127
-    protected function isValid(){
127
+    protected function isValid() {
128 128
         return isset($this->content['response']);
129 129
     }
130 130
 }
131 131
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,9 @@
 block discarded – undo
49 49
         if(!empty($this->body)) {
50 50
             $this->stripped = $this->stripNamespacesFromTags($this->body);
51 51
             $this->xml     =  simplexml_load_string($this->stripped);
52
-            if($this->xml === FALSE)
53
-                throw new XMLResponseParseException();
52
+            if($this->xml === FALSE) {
53
+                            throw new XMLResponseParseException();
54
+            }
54 55
             $this->content = $this->toAssocArray($this->xml);
55 56
 
56 57
             $this->parse();
Please login to merge, or discard this patch.
src/Facade/Responses/CalendarSyncInfoResponse.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,24 +22,24 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,9 @@  discard block
 block discarded – undo
39 39
     public function getUpdates(){
40 40
         $res = [];
41 41
         foreach ($this->responses as $entity){
42
-            if($entity instanceof ETagEntityResponse && $entity->getStatus() != HttpResponse::HttpOKStatus) continue;
42
+            if($entity instanceof ETagEntityResponse && $entity->getStatus() != HttpResponse::HttpOKStatus) {
43
+                continue;
44
+            }
43 45
                 $res[] = $entity;
44 46
         }
45 47
         return $res;
@@ -51,7 +53,9 @@  discard block
 block discarded – undo
51 53
     public function getDeletes(){
52 54
         $res = [];
53 55
         foreach ($this->responses as $entity){
54
-            if($entity instanceof ETagEntityResponse && $entity->getStatus() != HttpResponse::HttpNotFoundStatus) continue;
56
+            if($entity instanceof ETagEntityResponse && $entity->getStatus() != HttpResponse::HttpNotFoundStatus) {
57
+                continue;
58
+            }
55 59
                 $res[] = $entity;
56 60
         }
57 61
         return $res;
Please login to merge, or discard this patch.
src/Facade/Requests/CalendarQueryFilter.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,14 +46,14 @@
 block discarded – undo
46 46
      * @param DateTime $from
47 47
      * @param DateTime $to
48 48
      */
49
-    public function __construct($get_etags = true, $get_calendar_data = false, DateTime $from = null,  DateTime $to = null)
49
+    public function __construct($get_etags = true, $get_calendar_data = false, DateTime $from = null, DateTime $to = null)
50 50
     {
51 51
         $this->get_etags         = $get_etags;
52 52
         $this->get_calendar_data = $get_calendar_data;
53 53
         $this->from              = $from;
54 54
         $this->to                = $to;
55 55
 
56
-        if(!is_null($this->from) && !is_null($this->to) && $this->from > $this->to)
56
+        if (!is_null($this->from) && !is_null($this->to) && $this->from > $this->to)
57 57
             throw new \InvalidArgumentException("from should be lower than to param");
58 58
     }
59 59
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,9 @@
 block discarded – undo
53 53
         $this->from              = $from;
54 54
         $this->to                = $to;
55 55
 
56
-        if(!is_null($this->from) && !is_null($this->to) && $this->from > $this->to)
57
-            throw new \InvalidArgumentException("from should be lower than to param");
56
+        if(!is_null($this->from) && !is_null($this->to) && $this->from > $this->to) {
57
+                    throw new \InvalidArgumentException("from should be lower than to param");
58
+        }
58 59
     }
59 60
 
60 61
     /**
Please login to merge, or discard this patch.
src/Facade/Responses/GetCalendarResponse.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@  discard block
 block discarded – undo
22 22
     /**
23 23
      * @return string
24 24
      */
25
-    public function getDisplayName(){
25
+    public function getDisplayName() {
26 26
         return isset($this->found_props['displayname']) ? $this->found_props['displayname'] : null;
27 27
     }
28 28
 
29
-    public function getResourceType(){
29
+    public function getResourceType() {
30 30
         return isset($this->found_props['resourcetype']) ? $this->found_props['resourcetype'] : null;
31 31
     }
32 32
 
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
      * @see https://tools.ietf.org/html/rfc6578
35 35
      * @return string
36 36
      */
37
-    public function getSyncToken(){
37
+    public function getSyncToken() {
38 38
         return isset($this->found_props['sync-token']) ? $this->found_props['sync-token'] : null;
39 39
     }
40 40
 
41 41
     /**
42 42
      * @return string
43 43
      */
44
-    public function getCTag(){
44
+    public function getCTag() {
45 45
         return isset($this->found_props['getctag']) ? $this->found_props['getctag'] : null;
46 46
     }
47 47
 
Please login to merge, or discard this patch.
src/Facade/Responses/GetCalendarsResponse.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@
 block discarded – undo
30 30
      * @param string $type
31 31
      * @return array
32 32
      */
33
-    public function getResponseByType($type){
33
+    public function getResponseByType($type) {
34 34
         $responses = [];
35 35
 
36
-        foreach ($this->getResponses() as $response){
37
-            if(!$response instanceof GetCalendarResponse) continue;
36
+        foreach ($this->getResponses() as $response) {
37
+            if (!$response instanceof GetCalendarResponse) continue;
38 38
             $resource_types = $response->getResourceType();
39
-            if(in_array($type, array_keys($resource_types))) $responses[] = $response;
39
+            if (in_array($type, array_keys($resource_types))) $responses[] = $response;
40 40
         }
41 41
 
42 42
         return $responses;
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,9 +34,13 @@
 block discarded – undo
34 34
         $responses = [];
35 35
 
36 36
         foreach ($this->getResponses() as $response){
37
-            if(!$response instanceof GetCalendarResponse) continue;
37
+            if(!$response instanceof GetCalendarResponse) {
38
+                continue;
39
+            }
38 40
             $resource_types = $response->getResourceType();
39
-            if(in_array($type, array_keys($resource_types))) $responses[] = $response;
41
+            if(in_array($type, array_keys($resource_types))) {
42
+                $responses[] = $response;
43
+            }
40 44
         }
41 45
 
42 46
         return $responses;
Please login to merge, or discard this patch.
src/Facade/CalDavClient.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -175,8 +175,7 @@
 block discarded – undo
175 175
             }
176 176
 
177 177
             return $this->client->send($http_request, $options);
178
-        }
179
-        catch (ClientException $ex){
178
+        } catch (ClientException $ex){
180 179
             switch($ex->getCode()){
181 180
                 case 401:
182 181
                     throw new UserUnAuthorizedException();
Please login to merge, or discard this patch.
Spacing   +40 added lines, -59 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      * @param string $authtype
109 109
      * @param array $headers Additional headers to send with each request
110 110
      */
111
-    public function __construct($server_url, $user = null, $password = null, $authtype = self::DefaultAuthType, $headers=[])
111
+    public function __construct($server_url, $user = null, $password = null, $authtype = self::DefaultAuthType, $headers = [])
112 112
     {
113 113
         $this->server_url = $server_url;
114 114
         $this->user       = $user;
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
      * @return mixed|\Psr\Http\Message\ResponseInterface
158 158
      * @throws \GuzzleHttp\Exception\GuzzleException
159 159
      */
160
-    private function makeRequest(Request $http_request){
161
-        try{
160
+    private function makeRequest(Request $http_request) {
161
+        try {
162 162
             $options = [
163 163
                 'timeout' => $this->timeout
164 164
             ];
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
 
177 177
             return $this->client->send($http_request, $options);
178 178
         }
179
-        catch (ClientException $ex){
180
-            switch($ex->getCode()){
179
+        catch (ClientException $ex) {
180
+            switch ($ex->getCode()) {
181 181
                 case 401:
182 182
                     throw new UserUnAuthorizedException();
183 183
                     break;
@@ -210,9 +210,9 @@  discard block
 block discarded – undo
210 210
 
211 211
         $res     = $http_response->hasHeader(self::DAVHeader);
212 212
         $options = [];
213
-        if($res){
213
+        if ($res) {
214 214
             $val = $http_response->getHeaderLine(self::DAVHeader);
215
-            if(!empty($val)){
215
+            if (!empty($val)) {
216 216
                 $options = explode(', ', $val);
217 217
             }
218 218
         }
@@ -226,14 +226,13 @@  discard block
 block discarded – undo
226 226
     public function getUserPrincipal()
227 227
     {
228 228
         $http_response = $this->makeRequest(
229
-            RequestFactory::createPropFindRequest
230
-            (
229
+            RequestFactory::createPropFindRequest(
231 230
                 $this->server_url,
232 231
                 CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::PrincipalRequestType)->getContent()
233 232
             )
234 233
         );
235 234
 
236
-        return new UserPrincipalResponse($this->server_url, (string)$http_response->getBody(), $http_response->getStatusCode());
235
+        return new UserPrincipalResponse($this->server_url, (string) $http_response->getBody(), $http_response->getStatusCode());
237 236
     }
238 237
 
239 238
     /**
@@ -244,14 +243,13 @@  discard block
 block discarded – undo
244 243
     public function getCalendarHome($principal_url)
245 244
     {
246 245
         $http_response = $this->makeRequest(
247
-            RequestFactory::createPropFindRequest
248
-            (
246
+            RequestFactory::createPropFindRequest(
249 247
                 $principal_url,
250 248
                 CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::CalendarHomeRequestType)->getContent()
251 249
             )
252 250
         );
253 251
 
254
-        return new CalendarHomesResponse($this->server_url, (string)$http_response->getBody(), $http_response->getStatusCode());
252
+        return new CalendarHomesResponse($this->server_url, (string) $http_response->getBody(), $http_response->getStatusCode());
255 253
     }
256 254
 
257 255
     /**
@@ -266,10 +264,9 @@  discard block
 block discarded – undo
266 264
         $uid           = $vo->getUID();
267 265
         $resource_name = $vo->getResourceName();
268 266
 
269
-        $resource_url  = $calendar_home_set . ($resource_name ? $resource_name : $uid);
267
+        $resource_url  = $calendar_home_set.($resource_name ? $resource_name : $uid);
270 268
         $http_response = $this->makeRequest(
271
-            RequestFactory::createMakeCalendarRequest
272
-            (
269
+            RequestFactory::createMakeCalendarRequest(
273 270
                 $resource_url,
274 271
                 CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::CalendarCreateRequestType, [$vo])->getContent()
275 272
             )
@@ -286,14 +283,13 @@  discard block
 block discarded – undo
286 283
     public function getCalendars($calendar_home_set_url)
287 284
     {
288 285
         $http_response = $this->makeRequest(
289
-            RequestFactory::createPropFindRequest
290
-            (
286
+            RequestFactory::createPropFindRequest(
291 287
                 $calendar_home_set_url,
292 288
                 CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::CalendarsRequestType)->getContent()
293 289
             )
294 290
         );
295 291
 
296
-        return new GetCalendarsResponse($this->server_url, (string)$http_response->getBody(), $http_response->getStatusCode());
292
+        return new GetCalendarsResponse($this->server_url, (string) $http_response->getBody(), $http_response->getStatusCode());
297 293
     }
298 294
 
299 295
     /**
@@ -305,15 +301,14 @@  discard block
 block discarded – undo
305 301
     public function getCalendar($calendar_url, $depth = 0)
306 302
     {
307 303
         $http_response = $this->makeRequest(
308
-            RequestFactory::createPropFindRequest
309
-            (
304
+            RequestFactory::createPropFindRequest(
310 305
                 $calendar_url,
311 306
                 CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::CalendarRequestType)->getContent(),
312 307
                 $depth
313 308
             )
314 309
         );
315 310
 
316
-        return new GetCalendarMultiResponse($this->server_url, (string)$http_response->getBody(), $http_response->getStatusCode());
311
+        return new GetCalendarMultiResponse($this->server_url, (string) $http_response->getBody(), $http_response->getStatusCode());
317 312
     }
318 313
 
319 314
 
@@ -327,14 +322,13 @@  discard block
 block discarded – undo
327 322
     {
328 323
 
329 324
         $http_response = $this->makeRequest(
330
-            RequestFactory::createReportRequest
331
-            (
325
+            RequestFactory::createReportRequest(
332 326
                 $calendar_url,
333 327
                 CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::CalendarSyncRequestType, [$sync_token])->getContent()
334 328
             )
335 329
         );
336 330
 
337
-        return new CalendarSyncInfoResponse($this->server_url, (string)$http_response->getBody(), $http_response->getStatusCode());
331
+        return new CalendarSyncInfoResponse($this->server_url, (string) $http_response->getBody(), $http_response->getStatusCode());
338 332
     }
339 333
 
340 334
     /**
@@ -348,19 +342,17 @@  discard block
 block discarded – undo
348 342
         $uid           = $vo->getUID();
349 343
         $resource_url  = $calendar_url.$uid.self::SchedulingInformationSuffix;
350 344
         $http_response = $this->makeRequest(
351
-            RequestFactory::createPutRequest
352
-            (
345
+            RequestFactory::createPutRequest(
353 346
                 $resource_url,
354 347
                 CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::EventCreateRequestType, [$vo])->getContent()
355 348
             )
356 349
         );
357 350
         $etag = $http_response->hasHeader(self::ETagHeader) ? $http_response->getHeaderLine(self::ETagHeader) : null;
358
-        return new EventCreatedResponse
359
-        (
351
+        return new EventCreatedResponse(
360 352
             $uid,
361 353
             $etag,
362 354
             $resource_url,
363
-            (string)$http_response->getBody(),
355
+            (string) $http_response->getBody(),
364 356
             $http_response->getStatusCode()
365 357
         );
366 358
     }
@@ -377,20 +369,18 @@  discard block
 block discarded – undo
377 369
         $uid           = $vo->getUID();
378 370
         $resource_url  = $calendar_url.$uid.self::SchedulingInformationSuffix;
379 371
         $http_response = $this->makeRequest(
380
-            RequestFactory::createPutRequest
381
-            (
372
+            RequestFactory::createPutRequest(
382 373
                 $resource_url,
383 374
                 CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::EventUpdateRequestType, [$vo])->getContent(),
384 375
                 $etag
385 376
             )
386 377
         );
387 378
         $etag = $http_response->hasHeader(self::ETagHeader) ? $http_response->getHeaderLine(self::ETagHeader) : null;
388
-        return new EventUpdatedResponse
389
-        (
379
+        return new EventUpdatedResponse(
390 380
             $uid,
391 381
             $etag,
392 382
             $resource_url,
393
-            (string)$http_response->getBody(),
383
+            (string) $http_response->getBody(),
394 384
             $http_response->getStatusCode()
395 385
         );
396 386
     }
@@ -405,16 +395,14 @@  discard block
 block discarded – undo
405 395
     public function deleteEvent($calendar_url, $uid, $etag = null)
406 396
     {
407 397
         $http_response = $this->makeRequest(
408
-            RequestFactory::createDeleteRequest
409
-            (
398
+            RequestFactory::createDeleteRequest(
410 399
                 $calendar_url.$uid.self::SchedulingInformationSuffix,
411 400
                 $etag
412 401
             )
413 402
         );
414 403
 
415
-        return new EventDeletedResponse
416
-        (
417
-            (string)$http_response->getBody(), $http_response->getStatusCode()
404
+        return new EventDeletedResponse(
405
+            (string) $http_response->getBody(), $http_response->getStatusCode()
418 406
         );
419 407
     }
420 408
 
@@ -423,15 +411,14 @@  discard block
 block discarded – undo
423 411
      * @return string
424 412
      * @throws \GuzzleHttp\Exception\GuzzleException
425 413
      */
426
-    public function getEventVCardBy($event_url){
414
+    public function getEventVCardBy($event_url) {
427 415
         $http_response = $this->makeRequest(
428
-            RequestFactory::createGetRequest
429
-            (
416
+            RequestFactory::createGetRequest(
430 417
                 $event_url
431 418
             )
432 419
         );
433 420
 
434
-        $ical = (string)$http_response->getBody();
421
+        $ical = (string) $http_response->getBody();
435 422
         return $ical;
436 423
     }
437 424
 
@@ -444,17 +431,15 @@  discard block
 block discarded – undo
444 431
     public function getEventsBy($calendar_url, array $events_urls)
445 432
     {
446 433
         $http_response = $this->makeRequest(
447
-            RequestFactory::createReportRequest
448
-            (
434
+            RequestFactory::createReportRequest(
449 435
                 $calendar_url,
450 436
                 CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::CalendarMultiGetRequestType, [$events_urls])->getContent()
451 437
             )
452 438
         );
453 439
 
454
-        return new ResourceCollectionResponse
455
-        (
440
+        return new ResourceCollectionResponse(
456 441
             $this->server_url,
457
-            (string)$http_response->getBody(),
442
+            (string) $http_response->getBody(),
458 443
             $http_response->getStatusCode()
459 444
         );
460 445
     }
@@ -469,17 +454,15 @@  discard block
 block discarded – undo
469 454
     {
470 455
 
471 456
         $http_response = $this->makeRequest(
472
-            RequestFactory::createReportRequest
473
-            (
457
+            RequestFactory::createReportRequest(
474 458
                 $calendar_url,
475 459
                 CalDAVRequestFactory::getInstance()->build(CalDAVRequestFactory::CalendarQueryRequestType, [$filter])->getContent()
476 460
             )
477 461
         );
478 462
 
479
-        return new ResourceCollectionResponse
480
-        (
463
+        return new ResourceCollectionResponse(
481 464
             $this->server_url,
482
-            (string)$http_response->getBody(),
465
+            (string) $http_response->getBody(),
483 466
             $http_response->getStatusCode()
484 467
         );
485 468
     }
@@ -493,16 +476,14 @@  discard block
 block discarded – undo
493 476
     public function deleteCalendar($calendar_url, $etag = null)
494 477
     {
495 478
         $http_response = $this->makeRequest(
496
-            RequestFactory::createDeleteRequest
497
-            (
479
+            RequestFactory::createDeleteRequest(
498 480
                 $calendar_url,
499 481
                 $etag
500 482
             )
501 483
         );
502 484
 
503
-        return new CalendarDeletedResponse
504
-        (
505
-            (string)$http_response->getBody(), $http_response->getStatusCode()
485
+        return new CalendarDeletedResponse(
486
+            (string) $http_response->getBody(), $http_response->getStatusCode()
506 487
         );
507 488
     }
508 489
 }
Please login to merge, or discard this patch.