@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | |
160 | 160 | if ($user !== null) { |
161 | 161 | return [ |
162 | - 'uri' => 'principals/users/' . $user->getUID() . '/' . $name, |
|
162 | + 'uri' => 'principals/users/'.$user->getUID().'/'.$name, |
|
163 | 163 | ]; |
164 | 164 | } |
165 | 165 | return null; |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | ?: $this->groupManager->get($name); |
191 | 191 | if ($group instanceof IGroup) { |
192 | 192 | return [ |
193 | - 'uri' => 'principals/groups/' . $name, |
|
193 | + 'uri' => 'principals/groups/'.$name, |
|
194 | 194 | '{DAV:}displayname' => $group->getDisplayName(), |
195 | 195 | ]; |
196 | 196 | } |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | if ($this->hasGroups || $needGroups) { |
224 | 224 | $userGroups = $this->groupManager->getUserGroups($user); |
225 | 225 | foreach ($userGroups as $userGroup) { |
226 | - $groups[] = 'principals/groups/' . urlencode($userGroup->getGID()); |
|
226 | + $groups[] = 'principals/groups/'.urlencode($userGroup->getGID()); |
|
227 | 227 | } |
228 | 228 | } |
229 | 229 | |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | if (!$allowEnumeration) { |
295 | 295 | if ($allowEnumerationFullMatch) { |
296 | 296 | $users = $this->userManager->getByEmail($value); |
297 | - $users = \array_filter($users, static function (IUser $user) use ($value) { |
|
297 | + $users = \array_filter($users, static function(IUser $user) use ($value) { |
|
298 | 298 | return $user->getEMailAddress() === $value; |
299 | 299 | }); |
300 | 300 | } else { |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | } |
303 | 303 | } else { |
304 | 304 | $users = $this->userManager->getByEmail($value); |
305 | - $users = \array_filter($users, function (IUser $user) use ($currentUser, $value, $limitEnumerationPhone, $limitEnumerationGroup, $allowEnumerationFullMatch, $currentUserGroups) { |
|
305 | + $users = \array_filter($users, function(IUser $user) use ($currentUser, $value, $limitEnumerationPhone, $limitEnumerationGroup, $allowEnumerationFullMatch, $currentUserGroups) { |
|
306 | 306 | if ($allowEnumerationFullMatch && $user->getEMailAddress() === $value) { |
307 | 307 | return true; |
308 | 308 | } |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | }); |
327 | 327 | } |
328 | 328 | |
329 | - $results[] = array_reduce($users, function (array $carry, IUser $user) use ($restrictGroups) { |
|
329 | + $results[] = array_reduce($users, function(array $carry, IUser $user) use ($restrictGroups) { |
|
330 | 330 | // is sharing restricted to groups only? |
331 | 331 | if ($restrictGroups !== false) { |
332 | 332 | $userGroups = $this->groupManager->getUserGroupIds($user); |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | } |
336 | 336 | } |
337 | 337 | |
338 | - $carry[] = $this->principalPrefix . '/' . $user->getUID(); |
|
338 | + $carry[] = $this->principalPrefix.'/'.$user->getUID(); |
|
339 | 339 | return $carry; |
340 | 340 | }, []); |
341 | 341 | break; |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | if (!$allowEnumeration) { |
346 | 346 | if ($allowEnumerationFullMatch) { |
347 | 347 | $users = $this->userManager->searchDisplayName($value, $searchLimit); |
348 | - $users = \array_filter($users, static function (IUser $user) use ($value) { |
|
348 | + $users = \array_filter($users, static function(IUser $user) use ($value) { |
|
349 | 349 | return $user->getDisplayName() === $value; |
350 | 350 | }); |
351 | 351 | } else { |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | } |
354 | 354 | } else { |
355 | 355 | $users = $this->userManager->searchDisplayName($value, $searchLimit); |
356 | - $users = \array_filter($users, function (IUser $user) use ($currentUser, $value, $limitEnumerationPhone, $limitEnumerationGroup, $allowEnumerationFullMatch, $currentUserGroups) { |
|
356 | + $users = \array_filter($users, function(IUser $user) use ($currentUser, $value, $limitEnumerationPhone, $limitEnumerationGroup, $allowEnumerationFullMatch, $currentUserGroups) { |
|
357 | 357 | if ($allowEnumerationFullMatch && $user->getDisplayName() === $value) { |
358 | 358 | return true; |
359 | 359 | } |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | }); |
378 | 378 | } |
379 | 379 | |
380 | - $results[] = array_reduce($users, function (array $carry, IUser $user) use ($restrictGroups) { |
|
380 | + $results[] = array_reduce($users, function(array $carry, IUser $user) use ($restrictGroups) { |
|
381 | 381 | // is sharing restricted to groups only? |
382 | 382 | if ($restrictGroups !== false) { |
383 | 383 | $userGroups = $this->groupManager->getUserGroupIds($user); |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | } |
387 | 387 | } |
388 | 388 | |
389 | - $carry[] = $this->principalPrefix . '/' . $user->getUID(); |
|
389 | + $carry[] = $this->principalPrefix.'/'.$user->getUID(); |
|
390 | 390 | return $carry; |
391 | 391 | }, []); |
392 | 392 | break; |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | } |
483 | 483 | } |
484 | 484 | |
485 | - return $this->principalPrefix . '/' . $user->getUID(); |
|
485 | + return $this->principalPrefix.'/'.$user->getUID(); |
|
486 | 486 | } |
487 | 487 | } |
488 | 488 | if (substr($uri, 0, 10) === 'principal:') { |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | $userId = $user->getUID(); |
505 | 505 | $displayName = $user->getDisplayName(); |
506 | 506 | $principal = [ |
507 | - 'uri' => $this->principalPrefix . '/' . $userId, |
|
507 | + 'uri' => $this->principalPrefix.'/'.$userId, |
|
508 | 508 | '{DAV:}displayname' => is_null($displayName) ? $userId : $displayName, |
509 | 509 | '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => 'INDIVIDUAL', |
510 | 510 | ]; |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | } |
544 | 544 | |
545 | 545 | $principal = [ |
546 | - 'uri' => 'principals/circles/' . $circleUniqueId, |
|
546 | + 'uri' => 'principals/circles/'.$circleUniqueId, |
|
547 | 547 | '{DAV:}displayname' => $circle->getDisplayName(), |
548 | 548 | ]; |
549 | 549 | |
@@ -573,9 +573,9 @@ discard block |
||
573 | 573 | |
574 | 574 | $circles = \OCA\Circles\Api\v1\Circles::joinedCircles($name, true); |
575 | 575 | |
576 | - $circles = array_map(function ($circle) { |
|
576 | + $circles = array_map(function($circle) { |
|
577 | 577 | /** @var \OCA\Circles\Model\Circle $circle */ |
578 | - return 'principals/circles/' . urlencode($circle->getSingleId()); |
|
578 | + return 'principals/circles/'.urlencode($circle->getSingleId()); |
|
579 | 579 | }, $circles); |
580 | 580 | |
581 | 581 | return $circles; |