@@ -164,24 +164,24 @@ discard block |
||
164 | 164 | $stmt = $query->execute(); |
165 | 165 | |
166 | 166 | $calendars = []; |
167 | - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
167 | + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
168 | 168 | |
169 | 169 | $components = []; |
170 | 170 | if ($row['components']) { |
171 | - $components = explode(',',$row['components']); |
|
171 | + $components = explode(',', $row['components']); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | $calendar = [ |
175 | 175 | 'id' => $row['id'], |
176 | 176 | 'uri' => $row['uri'], |
177 | 177 | 'principaluri' => $this->convertPrincipal($row['principaluri'], false), |
178 | - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), |
|
179 | - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', |
|
180 | - '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
181 | - '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), |
|
178 | + '{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'), |
|
179 | + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0', |
|
180 | + '{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
181 | + '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'), |
|
182 | 182 | ]; |
183 | 183 | |
184 | - foreach($this->propertyMap as $xmlName=>$dbName) { |
|
184 | + foreach ($this->propertyMap as $xmlName=>$dbName) { |
|
185 | 185 | $calendar[$xmlName] = $row[$dbName]; |
186 | 186 | } |
187 | 187 | |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | |
195 | 195 | // query for shared calendars |
196 | 196 | $principals = $this->principalBackend->getGroupMembership($principalUriOriginal, true); |
197 | - $principals[]= $principalUri; |
|
197 | + $principals[] = $principalUri; |
|
198 | 198 | |
199 | 199 | $fields = array_values($this->propertyMap); |
200 | 200 | $fields[] = 'a.id'; |
@@ -214,27 +214,27 @@ discard block |
||
214 | 214 | ->setParameter('principaluri', $principals, \Doctrine\DBAL\Connection::PARAM_STR_ARRAY) |
215 | 215 | ->execute(); |
216 | 216 | |
217 | - while($row = $result->fetch()) { |
|
217 | + while ($row = $result->fetch()) { |
|
218 | 218 | list(, $name) = URLUtil::splitPath($row['principaluri']); |
219 | - $uri = $row['uri'] . '_shared_by_' . $name; |
|
220 | - $row['displayname'] = $row['displayname'] . "($name)"; |
|
219 | + $uri = $row['uri'].'_shared_by_'.$name; |
|
220 | + $row['displayname'] = $row['displayname']."($name)"; |
|
221 | 221 | $components = []; |
222 | 222 | if ($row['components']) { |
223 | - $components = explode(',',$row['components']); |
|
223 | + $components = explode(',', $row['components']); |
|
224 | 224 | } |
225 | 225 | $calendar = [ |
226 | 226 | 'id' => $row['id'], |
227 | 227 | 'uri' => $uri, |
228 | 228 | 'principaluri' => $principalUri, |
229 | - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), |
|
230 | - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', |
|
231 | - '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
232 | - '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), |
|
233 | - '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $row['principaluri'], |
|
234 | - '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only' => (int)$row['access'] === Backend::ACCESS_READ, |
|
229 | + '{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'), |
|
230 | + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0', |
|
231 | + '{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
232 | + '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'), |
|
233 | + '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal' => $row['principaluri'], |
|
234 | + '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only' => (int) $row['access'] === Backend::ACCESS_READ, |
|
235 | 235 | ]; |
236 | 236 | |
237 | - foreach($this->propertyMap as $xmlName=>$dbName) { |
|
237 | + foreach ($this->propertyMap as $xmlName=>$dbName) { |
|
238 | 238 | $calendar[$xmlName] = $row[$dbName]; |
239 | 239 | } |
240 | 240 | |
@@ -277,20 +277,20 @@ discard block |
||
277 | 277 | |
278 | 278 | $components = []; |
279 | 279 | if ($row['components']) { |
280 | - $components = explode(',',$row['components']); |
|
280 | + $components = explode(',', $row['components']); |
|
281 | 281 | } |
282 | 282 | |
283 | 283 | $calendar = [ |
284 | 284 | 'id' => $row['id'], |
285 | 285 | 'uri' => $row['uri'], |
286 | 286 | 'principaluri' => $row['principaluri'], |
287 | - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), |
|
288 | - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', |
|
289 | - '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
290 | - '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), |
|
287 | + '{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'), |
|
288 | + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0', |
|
289 | + '{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
290 | + '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'), |
|
291 | 291 | ]; |
292 | 292 | |
293 | - foreach($this->propertyMap as $xmlName=>$dbName) { |
|
293 | + foreach ($this->propertyMap as $xmlName=>$dbName) { |
|
294 | 294 | $calendar[$xmlName] = $row[$dbName]; |
295 | 295 | } |
296 | 296 | |
@@ -321,20 +321,20 @@ discard block |
||
321 | 321 | |
322 | 322 | $components = []; |
323 | 323 | if ($row['components']) { |
324 | - $components = explode(',',$row['components']); |
|
324 | + $components = explode(',', $row['components']); |
|
325 | 325 | } |
326 | 326 | |
327 | 327 | $calendar = [ |
328 | 328 | 'id' => $row['id'], |
329 | 329 | 'uri' => $row['uri'], |
330 | 330 | 'principaluri' => $row['principaluri'], |
331 | - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), |
|
332 | - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', |
|
333 | - '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
334 | - '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), |
|
331 | + '{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'), |
|
332 | + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0', |
|
333 | + '{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
334 | + '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'), |
|
335 | 335 | ]; |
336 | 336 | |
337 | - foreach($this->propertyMap as $xmlName=>$dbName) { |
|
337 | + foreach ($this->propertyMap as $xmlName=>$dbName) { |
|
338 | 338 | $calendar[$xmlName] = $row[$dbName]; |
339 | 339 | } |
340 | 340 | |
@@ -366,16 +366,16 @@ discard block |
||
366 | 366 | $sccs = '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set'; |
367 | 367 | if (isset($properties[$sccs])) { |
368 | 368 | if (!($properties[$sccs] instanceof SupportedCalendarComponentSet)) { |
369 | - throw new DAV\Exception('The ' . $sccs . ' property must be of type: \Sabre\CalDAV\Property\SupportedCalendarComponentSet'); |
|
369 | + throw new DAV\Exception('The '.$sccs.' property must be of type: \Sabre\CalDAV\Property\SupportedCalendarComponentSet'); |
|
370 | 370 | } |
371 | - $values['components'] = implode(',',$properties[$sccs]->getValue()); |
|
371 | + $values['components'] = implode(',', $properties[$sccs]->getValue()); |
|
372 | 372 | } |
373 | - $transp = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp'; |
|
373 | + $transp = '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp'; |
|
374 | 374 | if (isset($properties[$transp])) { |
375 | 375 | $values['transparent'] = (int) ($properties[$transp]->getValue() === 'transparent'); |
376 | 376 | } |
377 | 377 | |
378 | - foreach($this->propertyMap as $xmlName=>$dbName) { |
|
378 | + foreach ($this->propertyMap as $xmlName=>$dbName) { |
|
379 | 379 | if (isset($properties[$xmlName])) { |
380 | 380 | $values[$dbName] = $properties[$xmlName]; |
381 | 381 | } |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | |
384 | 384 | $query = $this->db->getQueryBuilder(); |
385 | 385 | $query->insert('calendars'); |
386 | - foreach($values as $column => $value) { |
|
386 | + foreach ($values as $column => $value) { |
|
387 | 387 | $query->setValue($column, $query->createNamedParameter($value)); |
388 | 388 | } |
389 | 389 | $query->execute(); |
@@ -407,14 +407,14 @@ discard block |
||
407 | 407 | */ |
408 | 408 | function updateCalendar($calendarId, PropPatch $propPatch) { |
409 | 409 | $supportedProperties = array_keys($this->propertyMap); |
410 | - $supportedProperties[] = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp'; |
|
410 | + $supportedProperties[] = '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp'; |
|
411 | 411 | |
412 | 412 | $propPatch->handle($supportedProperties, function($mutations) use ($calendarId) { |
413 | 413 | $newValues = []; |
414 | 414 | foreach ($mutations as $propertyName => $propertyValue) { |
415 | 415 | |
416 | 416 | switch ($propertyName) { |
417 | - case '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' : |
|
417 | + case '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' : |
|
418 | 418 | $fieldName = 'transparent'; |
419 | 419 | $newValues[$fieldName] = (int) ($propertyValue->getValue() === 'transparent'); |
420 | 420 | break; |
@@ -497,16 +497,16 @@ discard block |
||
497 | 497 | $stmt = $query->execute(); |
498 | 498 | |
499 | 499 | $result = []; |
500 | - foreach($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) { |
|
500 | + foreach ($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) { |
|
501 | 501 | $result[] = [ |
502 | 502 | 'id' => $row['id'], |
503 | 503 | 'uri' => $row['uri'], |
504 | 504 | 'lastmodified' => $row['lastmodified'], |
505 | - 'etag' => '"' . $row['etag'] . '"', |
|
505 | + 'etag' => '"'.$row['etag'].'"', |
|
506 | 506 | 'calendarid' => $row['calendarid'], |
507 | - 'size' => (int)$row['size'], |
|
507 | + 'size' => (int) $row['size'], |
|
508 | 508 | 'component' => strtolower($row['componenttype']), |
509 | - 'classification'=> (int)$row['classification'] |
|
509 | + 'classification'=> (int) $row['classification'] |
|
510 | 510 | ]; |
511 | 511 | } |
512 | 512 | |
@@ -539,18 +539,18 @@ discard block |
||
539 | 539 | $stmt = $query->execute(); |
540 | 540 | $row = $stmt->fetch(\PDO::FETCH_ASSOC); |
541 | 541 | |
542 | - if(!$row) return null; |
|
542 | + if (!$row) return null; |
|
543 | 543 | |
544 | 544 | return [ |
545 | 545 | 'id' => $row['id'], |
546 | 546 | 'uri' => $row['uri'], |
547 | 547 | 'lastmodified' => $row['lastmodified'], |
548 | - 'etag' => '"' . $row['etag'] . '"', |
|
548 | + 'etag' => '"'.$row['etag'].'"', |
|
549 | 549 | 'calendarid' => $row['calendarid'], |
550 | - 'size' => (int)$row['size'], |
|
550 | + 'size' => (int) $row['size'], |
|
551 | 551 | 'calendardata' => $this->readBlob($row['calendardata']), |
552 | 552 | 'component' => strtolower($row['componenttype']), |
553 | - 'classification'=> (int)$row['classification'] |
|
553 | + 'classification'=> (int) $row['classification'] |
|
554 | 554 | ]; |
555 | 555 | } |
556 | 556 | |
@@ -589,12 +589,12 @@ discard block |
||
589 | 589 | 'id' => $row['id'], |
590 | 590 | 'uri' => $row['uri'], |
591 | 591 | 'lastmodified' => $row['lastmodified'], |
592 | - 'etag' => '"' . $row['etag'] . '"', |
|
592 | + 'etag' => '"'.$row['etag'].'"', |
|
593 | 593 | 'calendarid' => $row['calendarid'], |
594 | - 'size' => (int)$row['size'], |
|
594 | + 'size' => (int) $row['size'], |
|
595 | 595 | 'calendardata' => $this->readBlob($row['calendardata']), |
596 | 596 | 'component' => strtolower($row['componenttype']), |
597 | - 'classification' => (int)$row['classification'] |
|
597 | + 'classification' => (int) $row['classification'] |
|
598 | 598 | ]; |
599 | 599 | } |
600 | 600 | $result->closeCursor(); |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | |
643 | 643 | $this->addChange($calendarId, $objectUri, 1); |
644 | 644 | |
645 | - return '"' . $extraData['etag'] . '"'; |
|
645 | + return '"'.$extraData['etag'].'"'; |
|
646 | 646 | } |
647 | 647 | |
648 | 648 | /** |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | |
684 | 684 | $this->addChange($calendarId, $objectUri, 2); |
685 | 685 | |
686 | - return '"' . $extraData['etag'] . '"'; |
|
686 | + return '"'.$extraData['etag'].'"'; |
|
687 | 687 | } |
688 | 688 | |
689 | 689 | /** |
@@ -821,7 +821,7 @@ discard block |
||
821 | 821 | $stmt = $query->execute(); |
822 | 822 | |
823 | 823 | $result = []; |
824 | - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
824 | + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
825 | 825 | if ($requirePostFilter) { |
826 | 826 | if (!$this->validateFilterForObject($row, $filters)) { |
827 | 827 | continue; |
@@ -864,7 +864,7 @@ discard block |
||
864 | 864 | $stmt = $query->execute(); |
865 | 865 | |
866 | 866 | if ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
867 | - return $row['calendaruri'] . '/' . $row['objecturi']; |
|
867 | + return $row['calendaruri'].'/'.$row['objecturi']; |
|
868 | 868 | } |
869 | 869 | |
870 | 870 | return null; |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null) { |
930 | 930 | // Current synctoken |
931 | 931 | $stmt = $this->db->prepare('SELECT `synctoken` FROM `*PREFIX*calendars` WHERE `id` = ?'); |
932 | - $stmt->execute([ $calendarId ]); |
|
932 | + $stmt->execute([$calendarId]); |
|
933 | 933 | $currentToken = $stmt->fetchColumn(0); |
934 | 934 | |
935 | 935 | if (is_null($currentToken)) { |
@@ -946,8 +946,8 @@ discard block |
||
946 | 946 | if ($syncToken) { |
947 | 947 | |
948 | 948 | $query = "SELECT `uri`, `operation` FROM `*PREFIX*calendarchanges` WHERE `synctoken` >= ? AND `synctoken` < ? AND `calendarid` = ? ORDER BY `synctoken`"; |
949 | - if ($limit>0) { |
|
950 | - $query.= " `LIMIT` " . (int)$limit; |
|
949 | + if ($limit > 0) { |
|
950 | + $query .= " `LIMIT` ".(int) $limit; |
|
951 | 951 | } |
952 | 952 | |
953 | 953 | // Fetching all changes |
@@ -958,15 +958,15 @@ discard block |
||
958 | 958 | |
959 | 959 | // This loop ensures that any duplicates are overwritten, only the |
960 | 960 | // last change on a node is relevant. |
961 | - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
961 | + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
962 | 962 | |
963 | 963 | $changes[$row['uri']] = $row['operation']; |
964 | 964 | |
965 | 965 | } |
966 | 966 | |
967 | - foreach($changes as $uri => $operation) { |
|
967 | + foreach ($changes as $uri => $operation) { |
|
968 | 968 | |
969 | - switch($operation) { |
|
969 | + switch ($operation) { |
|
970 | 970 | case 1 : |
971 | 971 | $result['added'][] = $uri; |
972 | 972 | break; |
@@ -1036,10 +1036,10 @@ discard block |
||
1036 | 1036 | ->from('calendarsubscriptions') |
1037 | 1037 | ->where($query->expr()->eq('principaluri', $query->createNamedParameter($principalUri))) |
1038 | 1038 | ->orderBy('calendarorder', 'asc'); |
1039 | - $stmt =$query->execute(); |
|
1039 | + $stmt = $query->execute(); |
|
1040 | 1040 | |
1041 | 1041 | $subscriptions = []; |
1042 | - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
1042 | + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
1043 | 1043 | |
1044 | 1044 | $subscription = [ |
1045 | 1045 | 'id' => $row['id'], |
@@ -1048,10 +1048,10 @@ discard block |
||
1048 | 1048 | 'source' => $row['source'], |
1049 | 1049 | 'lastmodified' => $row['lastmodified'], |
1050 | 1050 | |
1051 | - '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']), |
|
1051 | + '{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']), |
|
1052 | 1052 | ]; |
1053 | 1053 | |
1054 | - foreach($this->subscriptionPropertyMap as $xmlName=>$dbName) { |
|
1054 | + foreach ($this->subscriptionPropertyMap as $xmlName=>$dbName) { |
|
1055 | 1055 | if (!is_null($row[$dbName])) { |
1056 | 1056 | $subscription[$xmlName] = $row[$dbName]; |
1057 | 1057 | } |
@@ -1090,7 +1090,7 @@ discard block |
||
1090 | 1090 | |
1091 | 1091 | $propertiesBoolean = ['striptodos', 'stripalarms', 'stripattachments']; |
1092 | 1092 | |
1093 | - foreach($this->subscriptionPropertyMap as $xmlName=>$dbName) { |
|
1093 | + foreach ($this->subscriptionPropertyMap as $xmlName=>$dbName) { |
|
1094 | 1094 | if (array_key_exists($xmlName, $properties)) { |
1095 | 1095 | $values[$dbName] = $properties[$xmlName]; |
1096 | 1096 | if (in_array($dbName, $propertiesBoolean)) { |
@@ -1138,7 +1138,7 @@ discard block |
||
1138 | 1138 | |
1139 | 1139 | $newValues = []; |
1140 | 1140 | |
1141 | - foreach($mutations as $propertyName=>$propertyValue) { |
|
1141 | + foreach ($mutations as $propertyName=>$propertyValue) { |
|
1142 | 1142 | if ($propertyName === '{http://calendarserver.org/ns/}source') { |
1143 | 1143 | $newValues['source'] = $propertyValue->getHref(); |
1144 | 1144 | } else { |
@@ -1150,7 +1150,7 @@ discard block |
||
1150 | 1150 | $query = $this->db->getQueryBuilder(); |
1151 | 1151 | $query->update('calendarsubscriptions') |
1152 | 1152 | ->set('lastmodified', $query->createNamedParameter(time())); |
1153 | - foreach($newValues as $fieldName=>$value) { |
|
1153 | + foreach ($newValues as $fieldName=>$value) { |
|
1154 | 1154 | $query->set($fieldName, $query->createNamedParameter($value)); |
1155 | 1155 | } |
1156 | 1156 | $query->where($query->expr()->eq('id', $query->createNamedParameter($subscriptionId))) |
@@ -1200,7 +1200,7 @@ discard block |
||
1200 | 1200 | |
1201 | 1201 | $row = $stmt->fetch(\PDO::FETCH_ASSOC); |
1202 | 1202 | |
1203 | - if(!$row) { |
|
1203 | + if (!$row) { |
|
1204 | 1204 | return null; |
1205 | 1205 | } |
1206 | 1206 | |
@@ -1208,8 +1208,8 @@ discard block |
||
1208 | 1208 | 'uri' => $row['uri'], |
1209 | 1209 | 'calendardata' => $row['calendardata'], |
1210 | 1210 | 'lastmodified' => $row['lastmodified'], |
1211 | - 'etag' => '"' . $row['etag'] . '"', |
|
1212 | - 'size' => (int)$row['size'], |
|
1211 | + 'etag' => '"'.$row['etag'].'"', |
|
1212 | + 'size' => (int) $row['size'], |
|
1213 | 1213 | ]; |
1214 | 1214 | } |
1215 | 1215 | |
@@ -1232,13 +1232,13 @@ discard block |
||
1232 | 1232 | ->execute(); |
1233 | 1233 | |
1234 | 1234 | $result = []; |
1235 | - foreach($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) { |
|
1235 | + foreach ($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) { |
|
1236 | 1236 | $result[] = [ |
1237 | 1237 | 'calendardata' => $row['calendardata'], |
1238 | 1238 | 'uri' => $row['uri'], |
1239 | 1239 | 'lastmodified' => $row['lastmodified'], |
1240 | - 'etag' => '"' . $row['etag'] . '"', |
|
1241 | - 'size' => (int)$row['size'], |
|
1240 | + 'etag' => '"'.$row['etag'].'"', |
|
1241 | + 'size' => (int) $row['size'], |
|
1242 | 1242 | ]; |
1243 | 1243 | } |
1244 | 1244 | |
@@ -1330,10 +1330,10 @@ discard block |
||
1330 | 1330 | $lastOccurrence = null; |
1331 | 1331 | $uid = null; |
1332 | 1332 | $classification = self::CLASSIFICATION_PUBLIC; |
1333 | - foreach($vObject->getComponents() as $component) { |
|
1334 | - if ($component->name!=='VTIMEZONE') { |
|
1333 | + foreach ($vObject->getComponents() as $component) { |
|
1334 | + if ($component->name !== 'VTIMEZONE') { |
|
1335 | 1335 | $componentType = $component->name; |
1336 | - $uid = (string)$component->UID; |
|
1336 | + $uid = (string) $component->UID; |
|
1337 | 1337 | break; |
1338 | 1338 | } |
1339 | 1339 | } |
@@ -1358,13 +1358,13 @@ discard block |
||
1358 | 1358 | $lastOccurrence = $firstOccurrence; |
1359 | 1359 | } |
1360 | 1360 | } else { |
1361 | - $it = new EventIterator($vObject, (string)$component->UID); |
|
1361 | + $it = new EventIterator($vObject, (string) $component->UID); |
|
1362 | 1362 | $maxDate = new \DateTime(self::MAX_DATE); |
1363 | 1363 | if ($it->isInfinite()) { |
1364 | 1364 | $lastOccurrence = $maxDate->getTimeStamp(); |
1365 | 1365 | } else { |
1366 | 1366 | $end = $it->getDtEnd(); |
1367 | - while($it->valid() && $end < $maxDate) { |
|
1367 | + while ($it->valid() && $end < $maxDate) { |
|
1368 | 1368 | $end = $it->getDtEnd(); |
1369 | 1369 | $it->next(); |
1370 | 1370 |