@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | $principals = []; |
34 | 34 | |
35 | 35 | if ($prefixPath === self::PRINCIPAL_PREFIX) { |
36 | - foreach(\OCA\Circles\Api\v1\Circles::joinedCircles() as $circle) |
|
36 | + foreach (\OCA\Circles\Api\v1\Circles::joinedCircles() as $circle) |
|
37 | 37 | { |
38 | - \OC::$server->getLogger()->log(2, 'CIRCLE: ' . $circle->getName()); |
|
38 | + \OC::$server->getLogger()->log(2, 'CIRCLE: '.$circle->getName()); |
|
39 | 39 | } |
40 | 40 | } |
41 | 41 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function getPrincipalByPath($path) { |
54 | 54 | |
55 | - $elements = explode('/', $path, 3); |
|
55 | + $elements = explode('/', $path, 3); |
|
56 | 56 | if ($elements[0] !== 'principals') { |
57 | 57 | return null; |
58 | 58 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | protected function circleToPrincipal($circle) { |
157 | 157 | |
158 | 158 | $principal = [ |
159 | - 'uri' => 'principals/circles/' . $circle->getId(), |
|
159 | + 'uri' => 'principals/circles/'.$circle->getId(), |
|
160 | 160 | '{DAV:}displayname' => $circle->getName(), |
161 | 161 | ]; |
162 | 162 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | protected function userToPrincipal($user) { |
171 | 171 | |
172 | 172 | $principal = [ |
173 | - 'uri' => 'principals/users/' . $user->getUID(), |
|
173 | + 'uri' => 'principals/users/'.$user->getUID(), |
|
174 | 174 | '{DAV:}displayname' => $user->getDisplayName(), |
175 | 175 | ]; |
176 | 176 |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $principals = []; |
84 | 84 | |
85 | 85 | if ($prefixPath === $this->principalPrefix) { |
86 | - foreach($this->userManager->search('') as $user) { |
|
86 | + foreach ($this->userManager->search('') as $user) { |
|
87 | 87 | $principals[] = $this->userToPrincipal($user); |
88 | 88 | } |
89 | 89 | } |
@@ -151,14 +151,14 @@ discard block |
||
151 | 151 | $groups = $this->groupManager->getUserGroups($user); |
152 | 152 | $groups = array_map(function($group) { |
153 | 153 | /** @var IGroup $group */ |
154 | - return 'principals/groups/' . urlencode($group->getGID()); |
|
154 | + return 'principals/groups/'.urlencode($group->getGID()); |
|
155 | 155 | }, $groups); |
156 | 156 | |
157 | 157 | // We also add circles to the group list. |
158 | 158 | // TODO: will generate conflict if the circle has the same name than a group |
159 | 159 | $circles = \OCA\Circles\Api\v1\Circles::joinedCircles(); |
160 | 160 | foreach ($circles as $circle) { |
161 | - $groups['_circle_' . $circle->getId()] = 'principals/circles/' . $circle->getId(); |
|
161 | + $groups['_circle_'.$circle->getId()] = 'principals/circles/'.$circle->getId(); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | return $groups; |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $email = substr($uri, 7); |
210 | 210 | $users = $this->userManager->getByEmail($email); |
211 | 211 | if (count($users) === 1) { |
212 | - return $this->principalPrefix . '/' . $users[0]->getUID(); |
|
212 | + return $this->principalPrefix.'/'.$users[0]->getUID(); |
|
213 | 213 | } |
214 | 214 | } |
215 | 215 | |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $userId = $user->getUID(); |
225 | 225 | $displayName = $user->getDisplayName(); |
226 | 226 | $principal = [ |
227 | - 'uri' => $this->principalPrefix . '/' . $userId, |
|
227 | + 'uri' => $this->principalPrefix.'/'.$userId, |
|
228 | 228 | '{DAV:}displayname' => is_null($displayName) ? $userId : $displayName, |
229 | 229 | ]; |
230 | 230 |