@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | |
66 | 66 | $output->startProgress(count($objects)); |
67 | 67 | foreach ($objects as $row) { |
68 | - $calObject = $this->calDavBackend->getCalendarObject((int)$row['calendarid'], $row['uri']); |
|
69 | - $data = preg_replace('/' . $pattern . '/', ':', $calObject['calendardata']); |
|
68 | + $calObject = $this->calDavBackend->getCalendarObject((int) $row['calendarid'], $row['uri']); |
|
69 | + $data = preg_replace('/'.$pattern.'/', ':', $calObject['calendardata']); |
|
70 | 70 | |
71 | 71 | if ($data !== $calObject['calendardata']) { |
72 | 72 | $output->advance(); |
@@ -76,14 +76,14 @@ discard block |
||
76 | 76 | } catch (InvalidDataException $e) { |
77 | 77 | $this->logger->info('Calendar object for calendar {cal} with uri {uri} still invalid', [ |
78 | 78 | 'app' => 'dav', |
79 | - 'cal' => (int)$row['calendarid'], |
|
79 | + 'cal' => (int) $row['calendarid'], |
|
80 | 80 | 'uri' => $row['uri'], |
81 | 81 | ]); |
82 | 82 | $warnings++; |
83 | 83 | continue; |
84 | 84 | } |
85 | 85 | |
86 | - $this->calDavBackend->updateCalendarObject((int)$row['calendarid'], $row['uri'], $data); |
|
86 | + $this->calDavBackend->updateCalendarObject((int) $row['calendarid'], $row['uri'], $data); |
|
87 | 87 | $count++; |
88 | 88 | } |
89 | 89 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | ->where($query->expr()->like( |
105 | 105 | 'calendardata', |
106 | 106 | $query->createNamedParameter( |
107 | - '%' . $this->db->escapeLikeParameter($pattern) . '%', |
|
107 | + '%'.$this->db->escapeLikeParameter($pattern).'%', |
|
108 | 108 | IQueryBuilder::PARAM_STR |
109 | 109 | ), |
110 | 110 | IQueryBuilder::PARAM_STR |
@@ -338,72 +338,72 @@ |
||
338 | 338 | $policy .= "base-uri 'none';"; |
339 | 339 | $policy .= "manifest-src 'self';"; |
340 | 340 | |
341 | - if(!empty($this->allowedScriptDomains) || $this->inlineScriptAllowed || $this->evalScriptAllowed) { |
|
341 | + if (!empty($this->allowedScriptDomains) || $this->inlineScriptAllowed || $this->evalScriptAllowed) { |
|
342 | 342 | $policy .= 'script-src '; |
343 | - if(is_string($this->useJsNonce)) { |
|
343 | + if (is_string($this->useJsNonce)) { |
|
344 | 344 | $policy .= '\'nonce-'.base64_encode($this->useJsNonce).'\''; |
345 | 345 | $allowedScriptDomains = array_flip($this->allowedScriptDomains); |
346 | 346 | unset($allowedScriptDomains['\'self\'']); |
347 | 347 | $this->allowedScriptDomains = array_flip($allowedScriptDomains); |
348 | - if(count($allowedScriptDomains) !== 0) { |
|
348 | + if (count($allowedScriptDomains) !== 0) { |
|
349 | 349 | $policy .= ' '; |
350 | 350 | } |
351 | 351 | } |
352 | - if(is_array($this->allowedScriptDomains)) { |
|
352 | + if (is_array($this->allowedScriptDomains)) { |
|
353 | 353 | $policy .= implode(' ', $this->allowedScriptDomains); |
354 | 354 | } |
355 | - if($this->inlineScriptAllowed) { |
|
355 | + if ($this->inlineScriptAllowed) { |
|
356 | 356 | $policy .= ' \'unsafe-inline\''; |
357 | 357 | } |
358 | - if($this->evalScriptAllowed) { |
|
358 | + if ($this->evalScriptAllowed) { |
|
359 | 359 | $policy .= ' \'unsafe-eval\''; |
360 | 360 | } |
361 | 361 | $policy .= ';'; |
362 | 362 | } |
363 | 363 | |
364 | - if(!empty($this->allowedStyleDomains) || $this->inlineStyleAllowed) { |
|
364 | + if (!empty($this->allowedStyleDomains) || $this->inlineStyleAllowed) { |
|
365 | 365 | $policy .= 'style-src '; |
366 | - if(is_array($this->allowedStyleDomains)) { |
|
366 | + if (is_array($this->allowedStyleDomains)) { |
|
367 | 367 | $policy .= implode(' ', $this->allowedStyleDomains); |
368 | 368 | } |
369 | - if($this->inlineStyleAllowed) { |
|
369 | + if ($this->inlineStyleAllowed) { |
|
370 | 370 | $policy .= ' \'unsafe-inline\''; |
371 | 371 | } |
372 | 372 | $policy .= ';'; |
373 | 373 | } |
374 | 374 | |
375 | - if(!empty($this->allowedImageDomains)) { |
|
376 | - $policy .= 'img-src ' . implode(' ', $this->allowedImageDomains); |
|
375 | + if (!empty($this->allowedImageDomains)) { |
|
376 | + $policy .= 'img-src '.implode(' ', $this->allowedImageDomains); |
|
377 | 377 | $policy .= ';'; |
378 | 378 | } |
379 | 379 | |
380 | - if(!empty($this->allowedFontDomains)) { |
|
381 | - $policy .= 'font-src ' . implode(' ', $this->allowedFontDomains); |
|
380 | + if (!empty($this->allowedFontDomains)) { |
|
381 | + $policy .= 'font-src '.implode(' ', $this->allowedFontDomains); |
|
382 | 382 | $policy .= ';'; |
383 | 383 | } |
384 | 384 | |
385 | - if(!empty($this->allowedConnectDomains)) { |
|
386 | - $policy .= 'connect-src ' . implode(' ', $this->allowedConnectDomains); |
|
385 | + if (!empty($this->allowedConnectDomains)) { |
|
386 | + $policy .= 'connect-src '.implode(' ', $this->allowedConnectDomains); |
|
387 | 387 | $policy .= ';'; |
388 | 388 | } |
389 | 389 | |
390 | - if(!empty($this->allowedMediaDomains)) { |
|
391 | - $policy .= 'media-src ' . implode(' ', $this->allowedMediaDomains); |
|
390 | + if (!empty($this->allowedMediaDomains)) { |
|
391 | + $policy .= 'media-src '.implode(' ', $this->allowedMediaDomains); |
|
392 | 392 | $policy .= ';'; |
393 | 393 | } |
394 | 394 | |
395 | - if(!empty($this->allowedObjectDomains)) { |
|
396 | - $policy .= 'object-src ' . implode(' ', $this->allowedObjectDomains); |
|
395 | + if (!empty($this->allowedObjectDomains)) { |
|
396 | + $policy .= 'object-src '.implode(' ', $this->allowedObjectDomains); |
|
397 | 397 | $policy .= ';'; |
398 | 398 | } |
399 | 399 | |
400 | - if(!empty($this->allowedFrameDomains)) { |
|
401 | - $policy .= 'frame-src ' . implode(' ', $this->allowedFrameDomains); |
|
400 | + if (!empty($this->allowedFrameDomains)) { |
|
401 | + $policy .= 'frame-src '.implode(' ', $this->allowedFrameDomains); |
|
402 | 402 | $policy .= ';'; |
403 | 403 | } |
404 | 404 | |
405 | - if(!empty($this->allowedChildSrcDomains)) { |
|
406 | - $policy .= 'child-src ' . implode(' ', $this->allowedChildSrcDomains); |
|
405 | + if (!empty($this->allowedChildSrcDomains)) { |
|
406 | + $policy .= 'child-src '.implode(' ', $this->allowedChildSrcDomains); |
|
407 | 407 | $policy .= ';'; |
408 | 408 | } |
409 | 409 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $reader->parseInnerTree(); |
40 | 40 | |
41 | 41 | if (!is_string($componentName)) { |
42 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}comp-filter requires a valid name attribute'); |
|
42 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}comp-filter requires a valid name attribute'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | return $componentName; |
@@ -35,7 +35,7 @@ |
||
35 | 35 | static function xmlDeserialize(Reader $reader) { |
36 | 36 | $value = $reader->parseInnerTree(); |
37 | 37 | if (!is_int($value) && !is_string($value)) { |
38 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}limit has illegal value'); |
|
38 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}limit has illegal value'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | return intval($value); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | static function xmlDeserialize(Reader $reader) { |
36 | 36 | $value = $reader->parseInnerTree(); |
37 | 37 | if (!is_string($value)) { |
38 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}search-term has illegal value'); |
|
38 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}search-term has illegal value'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | return $value; |
@@ -35,7 +35,7 @@ |
||
35 | 35 | static function xmlDeserialize(Reader $reader) { |
36 | 36 | $value = $reader->parseInnerTree(); |
37 | 37 | if (!is_int($value) && !is_string($value)) { |
38 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}offset has illegal value'); |
|
38 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}offset has illegal value'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | return intval($value); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $reader->parseInnerTree(); |
40 | 40 | |
41 | 41 | if (!is_string($componentName)) { |
42 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}prop-filter requires a valid name attribute'); |
|
42 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}prop-filter requires a valid name attribute'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | return $componentName; |
@@ -40,11 +40,11 @@ |
||
40 | 40 | $reader->parseInnerTree(); |
41 | 41 | |
42 | 42 | if (!is_string($property)) { |
43 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid property attribute'); |
|
43 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}param-filter requires a valid property attribute'); |
|
44 | 44 | |
45 | 45 | } |
46 | 46 | if (!is_string($parameter)) { |
47 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid parameter attribute'); |
|
47 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}param-filter requires a valid parameter attribute'); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | return [ |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | } |
111 | 111 | |
112 | - throw new NotFound('Node with name \'' . $name . '\' could not be found'); |
|
112 | + throw new NotFound('Node with name \''.$name.'\' could not be found'); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @param integer|null $limit |
118 | 118 | * @param integer|null $offset |
119 | 119 | */ |
120 | - function calendarSearch(array $filters, $limit=null, $offset=null) { |
|
120 | + function calendarSearch(array $filters, $limit = null, $offset = null) { |
|
121 | 121 | $principalUri = $this->principalInfo['uri']; |
122 | 122 | return $this->caldavBackend->calendarSearch($principalUri, $filters, $limit, $offset); |
123 | 123 | } |