Completed
Push — master ( 1cb6dc...94c80a )
by
unknown
27:27
created
lib/private/Calendar/Manager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -173,12 +173,12 @@  discard block
 block discarded – undo
173 173
 		}
174 174
 
175 175
 		return array_merge(
176
-			...array_map(function ($registration) use ($principalUri, $calendarUris) {
176
+			...array_map(function($registration) use ($principalUri, $calendarUris) {
177 177
 				try {
178 178
 					/** @var ICalendarProvider $provider */
179 179
 					$provider = $this->container->get($registration->getService());
180 180
 				} catch (Throwable $e) {
181
-					$this->logger->error('Could not load calendar provider ' . $registration->getService() . ': ' . $e->getMessage(), [
181
+					$this->logger->error('Could not load calendar provider '.$registration->getService().': '.$e->getMessage(), [
182 182
 						'exception' => $e,
183 183
 					]);
184 184
 					return [];
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 		string $message,
230 230
 	): bool {
231 231
 
232
-		$userUri = 'principals/users/' . $userId;
232
+		$userUri = 'principals/users/'.$userId;
233 233
 
234 234
 		$userCalendars = $this->getCalendarsForPrincipal($userUri);
235 235
 		if (empty($userCalendars)) {
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 		IUser $organizer,
362 362
 		array $attendees,
363 363
 	): array {
364
-		$organizerMailto = 'mailto:' . $organizer->getEMailAddress();
364
+		$organizerMailto = 'mailto:'.$organizer->getEMailAddress();
365 365
 		$request = new VCalendar();
366 366
 		$request->METHOD = 'REQUEST';
367 367
 		$request->add('VFREEBUSY', [
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/CalendarImpl.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 * @since 13.0.0
50 50
 	 */
51 51
 	public function getKey(): string {
52
-		return (string)$this->calendarInfo['id'];
52
+		return (string) $this->calendarInfo['id'];
53 53
 	}
54 54
 
55 55
 	/**
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 	}
85 85
 
86 86
 	public function getSchedulingTransparency(): ?ScheduleCalendarTransp {
87
-		return $this->calendarInfo['{' . \OCA\DAV\CalDAV\Schedule\Plugin::NS_CALDAV . '}schedule-calendar-transp'];
87
+		return $this->calendarInfo['{'.\OCA\DAV\CalDAV\Schedule\Plugin::NS_CALDAV.'}schedule-calendar-transp'];
88 88
 	}
89 89
 
90 90
 	public function getSchedulingTimezone(): ?VTimeZone {
91
-		$tzProp = '{' . \OCA\DAV\CalDAV\Schedule\Plugin::NS_CALDAV . '}calendar-timezone';
91
+		$tzProp = '{'.\OCA\DAV\CalDAV\Schedule\Plugin::NS_CALDAV.'}calendar-timezone';
92 92
 		if (!isset($this->calendarInfo[$tzProp])) {
93 93
 			return null;
94 94
 		}
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 		try {
203 203
 			$server->createFile($fullCalendarFilename, $stream);
204 204
 		} catch (Conflict $e) {
205
-			throw new CalendarException('Could not create new calendar event: ' . $e->getMessage(), 0, $e);
205
+			throw new CalendarException('Could not create new calendar event: '.$e->getMessage(), 0, $e);
206 206
 		} finally {
207 207
 			fclose($stream);
208 208
 		}
@@ -257,8 +257,8 @@  discard block
 block discarded – undo
257 257
 		// so set the custom principal here
258 258
 		$authPlugin->setCurrentPrincipal($this->calendar->getPrincipalURI());
259 259
 		// retrieve all users addresses
260
-		$userProperties = $server->getServer()->getProperties($this->calendar->getPrincipalURI(), [ self::DAV_PROPERTY_USER_ADDRESS, self::DAV_PROPERTY_USER_ADDRESSES ]);
261
-		$userAddress = 'mailto:' . ($userProperties[self::DAV_PROPERTY_USER_ADDRESS] ?? null);
260
+		$userProperties = $server->getServer()->getProperties($this->calendar->getPrincipalURI(), [self::DAV_PROPERTY_USER_ADDRESS, self::DAV_PROPERTY_USER_ADDRESSES]);
261
+		$userAddress = 'mailto:'.($userProperties[self::DAV_PROPERTY_USER_ADDRESS] ?? null);
262 262
 		$userAddresses = $userProperties[self::DAV_PROPERTY_USER_ADDRESSES]->getHrefs() ?? [];
263 263
 		$userAddresses = array_map('strtolower', array_map('urldecode', $userAddresses));
264 264
 		// validate the method, recipient and sender
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 				$recipient = $userAddress;
297 297
 			}
298 298
 		} else {
299
-			throw new CalendarException('iMip message contains a method that is not supported: ' . $imipMethod);
299
+			throw new CalendarException('iMip message contains a method that is not supported: '.$imipMethod);
300 300
 		}
301 301
 		// generate the iTip message
302 302
 		$iTip = new Message();
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 		$iTip->recipient = $recipient;
306 306
 		$iTip->component = 'VEVENT';
307 307
 		$iTip->uid = $vObject->VEVENT->UID->getValue();
308
-		$iTip->sequence = isset($vObject->VEVENT->SEQUENCE) ? (int)$vObject->VEVENT->SEQUENCE->getValue() : 1;
308
+		$iTip->sequence = isset($vObject->VEVENT->SEQUENCE) ? (int) $vObject->VEVENT->SEQUENCE->getValue() : 1;
309 309
 		$iTip->message = $vObject;
310 310
 
311 311
 		$server->server->emit('schedule', [$iTip]);
Please login to merge, or discard this patch.
apps/dav/tests/unit/CalDAV/CalendarImplTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 use Sabre\VObject\ITip\Message;
21 21
 
22 22
 class CalendarImplTest extends \Test\TestCase {
23
-	private CalDavBackend|MockObject $backend;
24
-	private Calendar|MockObject $calendar;
25
-	private CalendarImpl|MockObject $calendarImpl;
23
+	private CalDavBackend | MockObject $backend;
24
+	private Calendar | MockObject $calendar;
25
+	private CalendarImpl | MockObject $calendarImpl;
26 26
 	private array $calendarInfo;
27 27
 	private VCalendar $vCalendar1a;
28 28
 	private array $mockExportCollection;
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 	}
199 199
 
200 200
 	public function testHandleImipRequest(): void {
201
-		$userAddressSet = new class([ 'mailto:[email protected]', '/remote.php/dav/principals/users/attendee1/', ]) {
201
+		$userAddressSet = new class(['mailto:[email protected]', '/remote.php/dav/principals/users/attendee1/', ]) {
202 202
 			public function __construct(
203 203
 				private array $hrefs,
204 204
 			) {
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 		$iTip->recipient = $vObject->VEVENT->ATTENDEE->getValue();
218 218
 		$iTip->component = 'VEVENT';
219 219
 		$iTip->uid = $vObject->VEVENT->UID->getValue();
220
-		$iTip->sequence = (int)$vObject->VEVENT->SEQUENCE->getValue() ?? 0;
220
+		$iTip->sequence = (int) $vObject->VEVENT->SEQUENCE->getValue() ?? 0;
221 221
 		$iTip->message = $vObject;
222 222
 
223 223
 		/** @var CustomPrincipalPlugin|MockObject $authPlugin */
Please login to merge, or discard this patch.