@@ -257,7 +257,7 @@ |
||
257 | 257 | $iTipMessage->sender = $attendee; |
258 | 258 | $iTipMessage->uid = isset($vEvent->{'UID'}) ? $vEvent->{'UID'}->getValue() : ''; |
259 | 259 | $iTipMessage->component = 'VEVENT'; |
260 | - $iTipMessage->sequence = isset($vEvent->{'SEQUENCE'}) ? (int)$vEvent->{'SEQUENCE'}->getValue() : 0; |
|
260 | + $iTipMessage->sequence = isset($vEvent->{'SEQUENCE'}) ? (int) $vEvent->{'SEQUENCE'}->getValue() : 0; |
|
261 | 261 | $iTipMessage->message = $vObject; |
262 | 262 | return $iTipMessage; |
263 | 263 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | ]; |
150 | 150 | $backend->expects($this->exactly(2)) |
151 | 151 | ->method('getCalendarObject') |
152 | - ->willReturnCallback(function () use (&$calls) { |
|
152 | + ->willReturnCallback(function() use (&$calls) { |
|
153 | 153 | $expected = array_shift($calls); |
154 | 154 | $return = array_pop($expected); |
155 | 155 | $this->assertEquals($expected, func_get_args()); |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | ]; |
262 | 262 | $backend->expects($this->exactly(2)) |
263 | 263 | ->method('getCalendarObject') |
264 | - ->willReturnCallback(function () use (&$calls) { |
|
264 | + ->willReturnCallback(function() use (&$calls) { |
|
265 | 265 | $expected = array_shift($calls); |
266 | 266 | $return = array_pop($expected); |
267 | 267 | $this->assertEquals($expected, func_get_args()); |
@@ -157,7 +157,7 @@ |
||
157 | 157 | $this->config |
158 | 158 | ->method('getValueInt') |
159 | 159 | ->with('dav') |
160 | - ->willReturnCallback(function ($app, $key, $default) { |
|
160 | + ->willReturnCallback(function($app, $key, $default) { |
|
161 | 161 | switch ($key) { |
162 | 162 | case 'maximumCalendarsSubscriptions': |
163 | 163 | return -1; |
@@ -155,12 +155,12 @@ |
||
155 | 155 | $this->assertEquals(self::UNIT_TEST_USER, $calendars[0]['principaluri']); |
156 | 156 | /** @var SupportedCalendarComponentSet $components */ |
157 | 157 | $components = $calendars[0]['{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set']; |
158 | - $this->assertEquals(['VEVENT','VTODO','VJOURNAL'], $components->getValue()); |
|
158 | + $this->assertEquals(['VEVENT', 'VTODO', 'VJOURNAL'], $components->getValue()); |
|
159 | 159 | $color = $calendars[0]['{http://apple.com/ns/ical/}calendar-color']; |
160 | 160 | $this->assertEquals('#1C4587FF', $color); |
161 | 161 | $this->assertEquals('Example', $calendars[0]['uri']); |
162 | 162 | $this->assertEquals('Example', $calendars[0]['{DAV:}displayname']); |
163 | - return (int)$calendars[0]['id']; |
|
163 | + return (int) $calendars[0]['id']; |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | protected function createTestSubscription() { |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | */ |
206 | 206 | public function testRunCreateCalendarNoException(string $body, string $contentType, string $result): void { |
207 | 207 | $refreshWebcalService = $this->getMockBuilder(RefreshWebcalService::class) |
208 | - ->onlyMethods(['getRandomCalendarObjectUri', 'getSubscription',]) |
|
208 | + ->onlyMethods(['getRandomCalendarObjectUri', 'getSubscription', ]) |
|
209 | 209 | ->setConstructorArgs([$this->caldavBackend, $this->logger, $this->connection, $this->time]) |
210 | 210 | ->getMock(); |
211 | 211 | |
@@ -316,17 +316,17 @@ discard block |
||
316 | 316 | [ |
317 | 317 | "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nUID:12345\r\nDTSTAMP:20160218T133704Z\r\nDTSTART;VALUE=DATE:19000101\r\nDTEND;VALUE=DATE:19000102\r\nRRULE:FREQ=YEARLY\r\nSUMMARY:12345's Birthday (1900)\r\nTRANSP:TRANSPARENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n", |
318 | 318 | 'text/calendar;charset=utf8', |
319 | - "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject " . VObject\Version::VERSION . "//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nUID:12345\r\nDTSTAMP:20160218T133704Z\r\nDTSTART;VALUE=DATE:19000101\r\nDTEND;VALUE=DATE:19000102\r\nRRULE:FREQ=YEARLY\r\nSUMMARY:12345's Birthday (1900)\r\nTRANSP:TRANSPARENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n", |
|
319 | + "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject ".VObject\Version::VERSION."//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nUID:12345\r\nDTSTAMP:20160218T133704Z\r\nDTSTART;VALUE=DATE:19000101\r\nDTEND;VALUE=DATE:19000102\r\nRRULE:FREQ=YEARLY\r\nSUMMARY:12345's Birthday (1900)\r\nTRANSP:TRANSPARENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n", |
|
320 | 320 | ], |
321 | 321 | [ |
322 | 322 | '["vcalendar",[["prodid",{},"text","-//Example Corp.//Example Client//EN"],["version",{},"text","2.0"]],[["vtimezone",[["last-modified",{},"date-time","2004-01-10T03:28:45Z"],["tzid",{},"text","US/Eastern"]],[["daylight",[["dtstart",{},"date-time","2000-04-04T02:00:00"],["rrule",{},"recur",{"freq":"YEARLY","byday":"1SU","bymonth":4}],["tzname",{},"text","EDT"],["tzoffsetfrom",{},"utc-offset","-05:00"],["tzoffsetto",{},"utc-offset","-04:00"]],[]],["standard",[["dtstart",{},"date-time","2000-10-26T02:00:00"],["rrule",{},"recur",{"freq":"YEARLY","byday":"1SU","bymonth":10}],["tzname",{},"text","EST"],["tzoffsetfrom",{},"utc-offset","-04:00"],["tzoffsetto",{},"utc-offset","-05:00"]],[]]]],["vevent",[["dtstamp",{},"date-time","2006-02-06T00:11:21Z"],["dtstart",{"tzid":"US/Eastern"},"date-time","2006-01-02T14:00:00"],["duration",{},"duration","PT1H"],["recurrence-id",{"tzid":"US/Eastern"},"date-time","2006-01-04T12:00:00"],["summary",{},"text","Event #2"],["uid",{},"text","12345"]],[]]]]', |
323 | 323 | 'application/calendar+json', |
324 | - "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject " . VObject\Version::VERSION . "//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VTIMEZONE\r\nLAST-MODIFIED:20040110T032845Z\r\nTZID:US/Eastern\r\nBEGIN:DAYLIGHT\r\nDTSTART:20000404T020000\r\nRRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4\r\nTZNAME:EDT\r\nTZOFFSETFROM:-0500\r\nTZOFFSETTO:-0400\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nDTSTART:20001026T020000\r\nRRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=10\r\nTZNAME:EST\r\nTZOFFSETFROM:-0400\r\nTZOFFSETTO:-0500\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTAMP:20060206T001121Z\r\nDTSTART;TZID=US/Eastern:20060102T140000\r\nDURATION:PT1H\r\nRECURRENCE-ID;TZID=US/Eastern:20060104T120000\r\nSUMMARY:Event #2\r\nUID:12345\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n" |
|
324 | + "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject ".VObject\Version::VERSION."//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VTIMEZONE\r\nLAST-MODIFIED:20040110T032845Z\r\nTZID:US/Eastern\r\nBEGIN:DAYLIGHT\r\nDTSTART:20000404T020000\r\nRRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4\r\nTZNAME:EDT\r\nTZOFFSETFROM:-0500\r\nTZOFFSETTO:-0400\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nDTSTART:20001026T020000\r\nRRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=10\r\nTZNAME:EST\r\nTZOFFSETFROM:-0400\r\nTZOFFSETTO:-0500\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTAMP:20060206T001121Z\r\nDTSTART;TZID=US/Eastern:20060102T140000\r\nDURATION:PT1H\r\nRECURRENCE-ID;TZID=US/Eastern:20060104T120000\r\nSUMMARY:Event #2\r\nUID:12345\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n" |
|
325 | 325 | ], |
326 | 326 | [ |
327 | 327 | '<?xml version="1.0" encoding="utf-8" ?><icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"><vcalendar><properties><prodid><text>-//Example Inc.//Example Client//EN</text></prodid><version><text>2.0</text></version></properties><components><vevent><properties><dtstamp><date-time>2006-02-06T00:11:21Z</date-time></dtstamp><dtstart><parameters><tzid><text>US/Eastern</text></tzid></parameters><date-time>2006-01-04T14:00:00</date-time></dtstart><duration><duration>PT1H</duration></duration><recurrence-id><parameters><tzid><text>US/Eastern</text></tzid></parameters><date-time>2006-01-04T12:00:00</date-time></recurrence-id><summary><text>Event #2 bis</text></summary><uid><text>12345</text></uid></properties></vevent></components></vcalendar></icalendar>', |
328 | 328 | 'application/calendar+xml', |
329 | - "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject " . VObject\Version::VERSION . "//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nDTSTAMP:20060206T001121Z\r\nDTSTART;TZID=US/Eastern:20060104T140000\r\nDURATION:PT1H\r\nRECURRENCE-ID;TZID=US/Eastern:20060104T120000\r\nSUMMARY:Event #2 bis\r\nUID:12345\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n" |
|
329 | + "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject ".VObject\Version::VERSION."//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nDTSTAMP:20060206T001121Z\r\nDTSTART;TZID=US/Eastern:20060104T140000\r\nDURATION:PT1H\r\nRECURRENCE-ID;TZID=US/Eastern:20060104T120000\r\nSUMMARY:Event #2 bis\r\nUID:12345\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n" |
|
330 | 330 | ] |
331 | 331 | ]; |
332 | 332 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | 'view' => 'dayGridMonth', |
79 | 79 | 'timeRange' => 'now', |
80 | 80 | 'mode' => 'sidebar', |
81 | - 'objectId' => base64_encode('/remote.php/dav/calendars/' . $link['owner'] . '/' . $link['calendar_uri'] . '/' . $link['object_uri']), |
|
81 | + 'objectId' => base64_encode('/remote.php/dav/calendars/'.$link['owner'].'/'.$link['calendar_uri'].'/'.$link['object_uri']), |
|
82 | 82 | 'recurrenceId' => 'next' |
83 | 83 | ]; |
84 | 84 | $this->appManager->expects($this->once()) |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | public static function generateObjectParameterLinkEncodingDataProvider(): array { |
113 | 113 | return [ |
114 | - [ // Shared calendar |
|
114 | + [// Shared calendar |
|
115 | 115 | [ |
116 | 116 | 'object_uri' => 'someuuid.ics', |
117 | 117 | 'calendar_uri' => 'personal', |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | ], |
120 | 120 | base64_encode('/remote.php/dav/calendars/sharee/personal_shared_by_sharer/someuuid.ics'), |
121 | 121 | ], |
122 | - [ // Shared calendar with umlauts |
|
122 | + [// Shared calendar with umlauts |
|
123 | 123 | [ |
124 | 124 | 'object_uri' => 'someuuid.ics', |
125 | 125 | 'calendar_uri' => 'umlaut_äüöß', |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | ], |
128 | 128 | base64_encode('/remote.php/dav/calendars/sharee/umlaut_%c3%a4%c3%bc%c3%b6%c3%9f_shared_by_sharer/someuuid.ics'), |
129 | 129 | ], |
130 | - [ // Shared calendar with umlauts and mixed casing |
|
130 | + [// Shared calendar with umlauts and mixed casing |
|
131 | 131 | [ |
132 | 132 | 'object_uri' => 'someuuid.ics', |
133 | 133 | 'calendar_uri' => 'Umlaut_äüöß', |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | ], |
136 | 136 | base64_encode('/remote.php/dav/calendars/sharee/Umlaut_%c3%a4%c3%bc%c3%b6%c3%9f_shared_by_sharer/someuuid.ics'), |
137 | 137 | ], |
138 | - [ // Owned calendar with umlauts |
|
138 | + [// Owned calendar with umlauts |
|
139 | 139 | [ |
140 | 140 | 'object_uri' => 'someuuid.ics', |
141 | 141 | 'calendar_uri' => 'umlaut_äüöß', |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | ], |
144 | 144 | base64_encode('/remote.php/dav/calendars/sharee/umlaut_%c3%a4%c3%bc%c3%b6%c3%9f/someuuid.ics'), |
145 | 145 | ], |
146 | - [ // Owned calendar with umlauts and mixed casing |
|
146 | + [// Owned calendar with umlauts and mixed casing |
|
147 | 147 | [ |
148 | 148 | 'object_uri' => 'someuuid.ics', |
149 | 149 | 'calendar_uri' => 'Umlaut_äüöß', |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | /** |
197 | 197 | * @dataProvider dataGenerateObjectParameterThrows |
198 | 198 | */ |
199 | - public function testGenerateObjectParameterThrows(string|array $eventData, string $exception = InvalidArgumentException::class): void { |
|
199 | + public function testGenerateObjectParameterThrows(string | array $eventData, string $exception = InvalidArgumentException::class): void { |
|
200 | 200 | $this->expectException($exception); |
201 | 201 | |
202 | 202 | $this->invokePrivate($this->provider, 'generateObjectParameter', [$eventData, 'no_user']); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | ]; |
62 | 62 | $this->writeableCalendar->expects($this->exactly(3)) |
63 | 63 | ->method('createFromString') |
64 | - ->willReturnCallback(function () use (&$calls) { |
|
64 | + ->willReturnCallback(function() use (&$calls) { |
|
65 | 65 | $expected = array_shift($calls); |
66 | 66 | $this->assertEquals($expected, func_get_args()); |
67 | 67 | }); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | $this->vobject->expects($this->once()) |
102 | 102 | ->method('getBaseComponent') |
103 | - ->willReturn((object)['UID' => 'someid']); |
|
103 | + ->willReturn((object) ['UID' => 'someid']); |
|
104 | 104 | $this->calendar->expects($this->once()) |
105 | 105 | ->method('getPermissions') |
106 | 106 | ->willReturn(Constants::PERMISSION_ALL); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | public function testGetName(): void { |
158 | 158 | $this->vobject->expects($this->exactly(2)) |
159 | 159 | ->method('getBaseComponent') |
160 | - ->willReturnOnConsecutiveCalls((object)['UID' => 'someid'], (object)['UID' => 'someid', 'X-FILENAME' => 'real-filename.ics']); |
|
160 | + ->willReturnOnConsecutiveCalls((object) ['UID' => 'someid'], (object) ['UID' => 'someid', 'X-FILENAME' => 'real-filename.ics']); |
|
161 | 161 | |
162 | 162 | $this->assertEquals($this->calendarObject->getName(), 'someid.ics'); |
163 | 163 | $this->assertEquals($this->calendarObject->getName(), 'real-filename.ics'); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | ]; |
75 | 75 | $this->server->expects($this->exactly(count($calls))) |
76 | 76 | ->method('on') |
77 | - ->willReturnCallback(function () use (&$calls) { |
|
77 | + ->willReturnCallback(function() use (&$calls) { |
|
78 | 78 | $expected = array_shift($calls); |
79 | 79 | $this->assertEquals($expected, func_get_args()); |
80 | 80 | }); |
@@ -368,12 +368,12 @@ discard block |
||
368 | 368 | $this->server->tree = $tree; |
369 | 369 | |
370 | 370 | $properties = $propertiesForPath ? [ |
371 | - ['href' => '/remote.php/dav/' . $calendarHome . '/' . $calendarUri] |
|
371 | + ['href' => '/remote.php/dav/'.$calendarHome.'/'.$calendarUri] |
|
372 | 372 | ] : []; |
373 | 373 | |
374 | 374 | $this->server->expects($this->once()) |
375 | 375 | ->method('getPropertiesForPath') |
376 | - ->with($calendarHome . '/' . $calendarUri, [], 1) |
|
376 | + ->with($calendarHome.'/'.$calendarUri, [], 1) |
|
377 | 377 | ->willReturn($properties); |
378 | 378 | |
379 | 379 | $this->plugin->propFindDefaultCalendarUrl($propFind, $node); |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | |
386 | 386 | /** @var LocalHref $result */ |
387 | 387 | $result = $propFind->get(Plugin::SCHEDULE_DEFAULT_CALENDAR_URL); |
388 | - $this->assertEquals('/remote.php/dav/' . $calendarHome . '/' . $calendarUri, $result->getHref()); |
|
388 | + $this->assertEquals('/remote.php/dav/'.$calendarHome.'/'.$calendarUri, $result->getHref()); |
|
389 | 389 | } |
390 | 390 | |
391 | 391 | /** |
@@ -433,12 +433,12 @@ discard block |
||
433 | 433 | 'principals/users/user1', |
434 | 434 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set'], |
435 | 435 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set' => new LocalHref( |
436 | - ['mailto:[email protected]','/remote.php/dav/principals/users/user1/'] |
|
436 | + ['mailto:[email protected]', '/remote.php/dav/principals/users/user1/'] |
|
437 | 437 | )] |
438 | 438 | ] |
439 | 439 | ]); |
440 | 440 | $this->server->expects($this->exactly(2))->method('emit')->willReturnCallback( |
441 | - function (string $eventName, array $arguments = [], ?callable $continueCallBack = null) use (&$iTipMessages) { |
|
441 | + function(string $eventName, array $arguments = [], ?callable $continueCallBack = null) use (&$iTipMessages) { |
|
442 | 442 | $this->assertEquals('schedule', $eventName); |
443 | 443 | $this->assertCount(1, $arguments); |
444 | 444 | $iTipMessages[] = $arguments[0]; |
@@ -538,12 +538,12 @@ discard block |
||
538 | 538 | 'principals/users/user1', |
539 | 539 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set'], |
540 | 540 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set' => new LocalHref( |
541 | - ['mailto:[email protected]','/remote.php/dav/principals/users/user1/'] |
|
541 | + ['mailto:[email protected]', '/remote.php/dav/principals/users/user1/'] |
|
542 | 542 | )] |
543 | 543 | ] |
544 | 544 | ]); |
545 | 545 | $this->server->expects($this->exactly(3))->method('emit')->willReturnCallback( |
546 | - function (string $eventName, array $arguments = [], ?callable $continueCallBack = null) use (&$iTipMessages) { |
|
546 | + function(string $eventName, array $arguments = [], ?callable $continueCallBack = null) use (&$iTipMessages) { |
|
547 | 547 | $this->assertEquals('schedule', $eventName); |
548 | 548 | $this->assertCount(1, $arguments); |
549 | 549 | $iTipMessages[] = $arguments[0]; |
@@ -654,19 +654,19 @@ discard block |
||
654 | 654 | 'principals/users/user1', |
655 | 655 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set'], |
656 | 656 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set' => new LocalHref( |
657 | - ['mailto:[email protected]','/remote.php/dav/principals/users/user1/'] |
|
657 | + ['mailto:[email protected]', '/remote.php/dav/principals/users/user1/'] |
|
658 | 658 | )] |
659 | 659 | ], |
660 | 660 | [ |
661 | 661 | 'principals/users/user2', |
662 | 662 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set'], |
663 | 663 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set' => new LocalHref( |
664 | - ['mailto:[email protected]','/remote.php/dav/principals/users/user2/'] |
|
664 | + ['mailto:[email protected]', '/remote.php/dav/principals/users/user2/'] |
|
665 | 665 | )] |
666 | 666 | ] |
667 | 667 | ]); |
668 | 668 | $this->server->expects($this->exactly(3))->method('emit')->willReturnCallback( |
669 | - function (string $eventName, array $arguments = [], ?callable $continueCallBack = null) use (&$iTipMessages) { |
|
669 | + function(string $eventName, array $arguments = [], ?callable $continueCallBack = null) use (&$iTipMessages) { |
|
670 | 670 | $this->assertEquals('schedule', $eventName); |
671 | 671 | $this->assertCount(1, $arguments); |
672 | 672 | $iTipMessages[] = $arguments[0]; |