@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | if ($user !== null) { |
| 167 | 167 | return [ |
| 168 | - 'uri' => 'principals/users/' . $user->getUID() . '/' . $name, |
|
| 168 | + 'uri' => 'principals/users/'.$user->getUID().'/'.$name, |
|
| 169 | 169 | ]; |
| 170 | 170 | } |
| 171 | 171 | return null; |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | ?: $this->groupManager->get($name); |
| 197 | 197 | if ($group instanceof IGroup) { |
| 198 | 198 | return [ |
| 199 | - 'uri' => 'principals/groups/' . $name, |
|
| 199 | + 'uri' => 'principals/groups/'.$name, |
|
| 200 | 200 | '{DAV:}displayname' => $group->getDisplayName(), |
| 201 | 201 | ]; |
| 202 | 202 | } |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | if ($this->hasGroups || $needGroups) { |
| 230 | 230 | $userGroups = $this->groupManager->getUserGroups($user); |
| 231 | 231 | foreach ($userGroups as $userGroup) { |
| 232 | - $groups[] = 'principals/groups/' . urlencode($userGroup->getGID()); |
|
| 232 | + $groups[] = 'principals/groups/'.urlencode($userGroup->getGID()); |
|
| 233 | 233 | } |
| 234 | 234 | } |
| 235 | 235 | |
@@ -299,13 +299,13 @@ discard block |
||
| 299 | 299 | $users = $this->userManager->getByEmail($value); |
| 300 | 300 | |
| 301 | 301 | if (!$allowEnumeration) { |
| 302 | - $users = \array_filter($users, static function (IUser $user) use ($value) { |
|
| 302 | + $users = \array_filter($users, static function(IUser $user) use ($value) { |
|
| 303 | 303 | return $user->getEMailAddress() === $value; |
| 304 | 304 | }); |
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | if ($limitEnumeration) { |
| 308 | - $users = \array_filter($users, function (IUser $user) use ($currentUserGroups, $value) { |
|
| 308 | + $users = \array_filter($users, function(IUser $user) use ($currentUserGroups, $value) { |
|
| 309 | 309 | return !empty(array_intersect( |
| 310 | 310 | $this->groupManager->getUserGroupIds($user), |
| 311 | 311 | $currentUserGroups |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | }); |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | - $results[] = array_reduce($users, function (array $carry, IUser $user) use ($restrictGroups) { |
|
| 316 | + $results[] = array_reduce($users, function(array $carry, IUser $user) use ($restrictGroups) { |
|
| 317 | 317 | // is sharing restricted to groups only? |
| 318 | 318 | if ($restrictGroups !== false) { |
| 319 | 319 | $userGroups = $this->groupManager->getUserGroupIds($user); |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | } |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | - $carry[] = $this->principalPrefix . '/' . $user->getUID(); |
|
| 325 | + $carry[] = $this->principalPrefix.'/'.$user->getUID(); |
|
| 326 | 326 | return $carry; |
| 327 | 327 | }, []); |
| 328 | 328 | break; |
@@ -331,13 +331,13 @@ discard block |
||
| 331 | 331 | $users = $this->userManager->searchDisplayName($value, $searchLimit); |
| 332 | 332 | |
| 333 | 333 | if (!$allowEnumeration) { |
| 334 | - $users = \array_filter($users, static function (IUser $user) use ($value) { |
|
| 334 | + $users = \array_filter($users, static function(IUser $user) use ($value) { |
|
| 335 | 335 | return $user->getDisplayName() === $value; |
| 336 | 336 | }); |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | 339 | if ($limitEnumeration) { |
| 340 | - $users = \array_filter($users, function (IUser $user) use ($currentUserGroups, $value) { |
|
| 340 | + $users = \array_filter($users, function(IUser $user) use ($currentUserGroups, $value) { |
|
| 341 | 341 | return !empty(array_intersect( |
| 342 | 342 | $this->groupManager->getUserGroupIds($user), |
| 343 | 343 | $currentUserGroups |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | }); |
| 346 | 346 | } |
| 347 | 347 | |
| 348 | - $results[] = array_reduce($users, function (array $carry, IUser $user) use ($restrictGroups) { |
|
| 348 | + $results[] = array_reduce($users, function(array $carry, IUser $user) use ($restrictGroups) { |
|
| 349 | 349 | // is sharing restricted to groups only? |
| 350 | 350 | if ($restrictGroups !== false) { |
| 351 | 351 | $userGroups = $this->groupManager->getUserGroupIds($user); |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | } |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | - $carry[] = $this->principalPrefix . '/' . $user->getUID(); |
|
| 357 | + $carry[] = $this->principalPrefix.'/'.$user->getUID(); |
|
| 358 | 358 | return $carry; |
| 359 | 359 | }, []); |
| 360 | 360 | break; |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | } |
| 451 | 451 | } |
| 452 | 452 | |
| 453 | - return $this->principalPrefix . '/' . $user->getUID(); |
|
| 453 | + return $this->principalPrefix.'/'.$user->getUID(); |
|
| 454 | 454 | } |
| 455 | 455 | } |
| 456 | 456 | if (substr($uri, 0, 10) === 'principal:') { |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | $userId = $user->getUID(); |
| 473 | 473 | $displayName = $user->getDisplayName(); |
| 474 | 474 | $principal = [ |
| 475 | - 'uri' => $this->principalPrefix . '/' . $userId, |
|
| 475 | + 'uri' => $this->principalPrefix.'/'.$userId, |
|
| 476 | 476 | '{DAV:}displayname' => is_null($displayName) ? $userId : $displayName, |
| 477 | 477 | '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => 'INDIVIDUAL', |
| 478 | 478 | ]; |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | } |
| 512 | 512 | |
| 513 | 513 | $principal = [ |
| 514 | - 'uri' => 'principals/circles/' . $circleUniqueId, |
|
| 514 | + 'uri' => 'principals/circles/'.$circleUniqueId, |
|
| 515 | 515 | '{DAV:}displayname' => $circle->getName(), |
| 516 | 516 | ]; |
| 517 | 517 | |
@@ -541,9 +541,9 @@ discard block |
||
| 541 | 541 | |
| 542 | 542 | $circles = \OCA\Circles\Api\v1\Circles::joinedCircles($name, true); |
| 543 | 543 | |
| 544 | - $circles = array_map(function ($circle) { |
|
| 544 | + $circles = array_map(function($circle) { |
|
| 545 | 545 | /** @var \OCA\Circles\Model\Circle $circle */ |
| 546 | - return 'principals/circles/' . urlencode($circle->getUniqueId()); |
|
| 546 | + return 'principals/circles/'.urlencode($circle->getUniqueId()); |
|
| 547 | 547 | }, $circles); |
| 548 | 548 | |
| 549 | 549 | return $circles; |