@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | public function getACL() { |
102 | - $acl = [ |
|
102 | + $acl = [ |
|
103 | 103 | [ |
104 | 104 | 'privilege' => '{DAV:}read', |
105 | 105 | 'principal' => $this->getOwner(), |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | 'protected' => true, |
112 | 112 | ]; |
113 | 113 | if ($this->getOwner() !== parent::getOwner()) { |
114 | - $acl[] = [ |
|
114 | + $acl[] = [ |
|
115 | 115 | 'privilege' => '{DAV:}read', |
116 | 116 | 'principal' => parent::getOwner(), |
117 | 117 | 'protected' => true, |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | public function delete() { |
172 | 172 | if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) { |
173 | - $principal = 'principal:' . parent::getOwner(); |
|
173 | + $principal = 'principal:'.parent::getOwner(); |
|
174 | 174 | $shares = $this->carddavBackend->getShares($this->getResourceId()); |
175 | 175 | $shares = array_filter($shares, function($share) use ($principal){ |
176 | 176 | return $share['href'] === $principal; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | ], |
55 | 55 | ]; |
56 | 56 | |
57 | - if($this->appManager->isEnabledForUser('files_sharing')) { |
|
57 | + if ($this->appManager->isEnabledForUser('files_sharing')) { |
|
58 | 58 | $services['SHARING'] = [ |
59 | 59 | 'version' => 1, |
60 | 60 | 'endpoints' => [ |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | } |
87 | 87 | |
88 | - if($this->appManager->isEnabledForUser('activity')) { |
|
88 | + if ($this->appManager->isEnabledForUser('activity')) { |
|
89 | 89 | $services['ACTIVITY'] = [ |
90 | 90 | 'version' => 1, |
91 | 91 | 'endpoints' => [ |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | ]; |
95 | 95 | } |
96 | 96 | |
97 | - if($this->appManager->isEnabledForUser('provisioning_api')) { |
|
97 | + if ($this->appManager->isEnabledForUser('provisioning_api')) { |
|
98 | 98 | $services['PROVISIONING'] = [ |
99 | 99 | 'version' => 1, |
100 | 100 | 'endpoints' => [ |
@@ -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 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $groups = $this->groupManager->getUserGroups($user); |
151 | 151 | $groups = array_map(function($group) { |
152 | 152 | /** @var IGroup $group */ |
153 | - return 'principals/groups/' . urlencode($group->getGID()); |
|
153 | + return 'principals/groups/'.urlencode($group->getGID()); |
|
154 | 154 | }, $groups); |
155 | 155 | |
156 | 156 | return $groups; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $email = substr($uri, 7); |
202 | 202 | $users = $this->userManager->getByEmail($email); |
203 | 203 | if (count($users) === 1) { |
204 | - return $this->principalPrefix . '/' . $users[0]->getUID(); |
|
204 | + return $this->principalPrefix.'/'.$users[0]->getUID(); |
|
205 | 205 | } |
206 | 206 | } |
207 | 207 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $userId = $user->getUID(); |
217 | 217 | $displayName = $user->getDisplayName(); |
218 | 218 | $principal = [ |
219 | - 'uri' => $this->principalPrefix . '/' . $userId, |
|
219 | + 'uri' => $this->principalPrefix.'/'.$userId, |
|
220 | 220 | '{DAV:}displayname' => is_null($displayName) ? $userId : $displayName, |
221 | 221 | ]; |
222 | 222 |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $principals = []; |
60 | 60 | |
61 | 61 | if ($prefixPath === self::PRINCIPAL_PREFIX) { |
62 | - foreach($this->groupManager->search('') as $user) { |
|
62 | + foreach ($this->groupManager->search('') as $user) { |
|
63 | 63 | $principals[] = $this->groupToPrincipal($user); |
64 | 64 | } |
65 | 65 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * @return array |
77 | 77 | */ |
78 | 78 | public function getPrincipalByPath($path) { |
79 | - $elements = explode('/', $path, 3); |
|
79 | + $elements = explode('/', $path, 3); |
|
80 | 80 | if ($elements[0] !== 'principals') { |
81 | 81 | return null; |
82 | 82 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | protected function groupToPrincipal($group) { |
180 | 180 | $groupId = $group->getGID(); |
181 | 181 | $principal = [ |
182 | - 'uri' => 'principals/groups/' . urlencode($groupId), |
|
182 | + 'uri' => 'principals/groups/'.urlencode($groupId), |
|
183 | 183 | '{DAV:}displayname' => $groupId, |
184 | 184 | ]; |
185 | 185 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | */ |
193 | 193 | protected function userToPrincipal($user) { |
194 | 194 | $principal = [ |
195 | - 'uri' => 'principals/users/' . $user->getUID(), |
|
195 | + 'uri' => 'principals/users/'.$user->getUID(), |
|
196 | 196 | '{DAV:}displayname' => $user->getDisplayName(), |
197 | 197 | ]; |
198 | 198 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * |
30 | 30 | */ |
31 | 31 | |
32 | -require_once __DIR__ . '/../lib/base.php'; |
|
32 | +require_once __DIR__.'/../lib/base.php'; |
|
33 | 33 | |
34 | 34 | if (\OCP\Util::needUpgrade() |
35 | 35 | || \OC::$server->getSystemConfig()->getValue('maintenance', false)) { |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * Try the appframework routes |
75 | 75 | */ |
76 | 76 | try { |
77 | - if(!\OC::$server->getUserSession()->isLoggedIn()) { |
|
77 | + if (!\OC::$server->getUserSession()->isLoggedIn()) { |
|
78 | 78 | OC::handleLogin(\OC::$server->getRequest()); |
79 | 79 | } |
80 | 80 | OC::$server->getRouter()->match('/ocsapp'.\OC::$server->getRequest()->getRawPathInfo()); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | OC_API::setContentType(); |
83 | 83 | |
84 | 84 | $format = \OC::$server->getRequest()->getParam('format', 'xml'); |
85 | - $txt='Invalid query, please check the syntax. API specifications are here:' |
|
85 | + $txt = 'Invalid query, please check the syntax. API specifications are here:' |
|
86 | 86 | .' http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. DEBUG OUTPUT:'."\n"; |
87 | 87 | OC_API::respond(new OC_OCS_Result(null, \OCP\API::RESPOND_NOT_FOUND, $txt), $format); |
88 | 88 | } catch (MethodNotAllowedException $e) { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | OC_API::setContentType(); |
98 | 98 | |
99 | 99 | $format = \OC::$server->getRequest()->getParam('format', 'xml'); |
100 | - $txt='Invalid query, please check the syntax. API specifications are here:' |
|
100 | + $txt = 'Invalid query, please check the syntax. API specifications are here:' |
|
101 | 101 | .' http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. DEBUG OUTPUT:'."\n"; |
102 | 102 | OC_API::respond(new OC_OCS_Result(null, \OCP\API::RESPOND_NOT_FOUND, $txt), $format); |
103 | 103 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | <div class="warning"> |
15 | 15 | <h2 class="two-factor-header"><?php p($provider->getDisplayName()); ?></h2> |
16 | 16 | <?php if ($error): ?> |
17 | - <?php if($error_message): ?> |
|
17 | + <?php if ($error_message): ?> |
|
18 | 18 | <p><strong><?php p($error_message); ?></strong></p> |
19 | 19 | <?php else: ?> |
20 | 20 | <p><strong><?php p($l->t('Error while validating your second factor')); ?></strong></p> |
@@ -88,7 +88,7 @@ |
||
88 | 88 | if (strpos($path, '/webdav/') === 0) { |
89 | 89 | $path = substr($path, strlen('/webdav')); |
90 | 90 | } |
91 | - $path = $this->path . $path; |
|
91 | + $path = $this->path.$path; |
|
92 | 92 | $this->mimeType[$this->storage->getId()][$path] = $this->mimeTypeDetector->detectPath($path); |
93 | 93 | return $this->mimeType[$this->storage->getId()][$path]; |
94 | 94 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $authPlugin->addBackend($authBackend); |
100 | 100 | |
101 | 101 | // debugging |
102 | - if(\OC::$server->getConfig()->getSystemValue('debug', false)) { |
|
102 | + if (\OC::$server->getConfig()->getSystemValue('debug', false)) { |
|
103 | 103 | $this->server->addPlugin(new \Sabre\DAV\Browser\Plugin()); |
104 | 104 | } else { |
105 | 105 | $this->server->addPlugin(new DummyGetResponsePlugin()); |
@@ -152,10 +152,10 @@ discard block |
||
152 | 152 | |
153 | 153 | // Some WebDAV clients do require Class 2 WebDAV support (locking), since |
154 | 154 | // we do not provide locking we emulate it using a fake locking plugin. |
155 | - if($request->isUserAgent([ |
|
155 | + if ($request->isUserAgent([ |
|
156 | 156 | '/WebDAVFS/', |
157 | 157 | '/Microsoft Office OneNote 2013/', |
158 | - '/^Microsoft-WebDAV/',// Microsoft-WebDAV-MiniRedir/6.1.7601 |
|
158 | + '/^Microsoft-WebDAV/', // Microsoft-WebDAV-MiniRedir/6.1.7601 |
|
159 | 159 | ])) { |
160 | 160 | $this->server->addPlugin(new FakeLockerPlugin()); |
161 | 161 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | // wait with registering these until auth is handled and the filesystem is setup |
168 | - $this->server->on('beforeMethod', function () { |
|
168 | + $this->server->on('beforeMethod', function() { |
|
169 | 169 | // custom properties plugin must be the last one |
170 | 170 | $userSession = \OC::$server->getUserSession(); |
171 | 171 | $user = $userSession->getUser(); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function shouldJoinTags(ISearchOperator $operator) { |
73 | 73 | if ($operator instanceof ISearchBinaryOperator) { |
74 | - return array_reduce($operator->getArguments(), function ($shouldJoin, ISearchOperator $operator) { |
|
74 | + return array_reduce($operator->getArguments(), function($shouldJoin, ISearchOperator $operator) { |
|
75 | 75 | return $shouldJoin || $this->shouldJoinTags($operator); |
76 | 76 | }, false); |
77 | 77 | } else if ($operator instanceof ISearchComparison) { |
@@ -96,12 +96,12 @@ discard block |
||
96 | 96 | case ISearchBinaryOperator::OPERATOR_OR: |
97 | 97 | return $expr->orX($this->searchOperatorToDBExpr($builder, $operator->getArguments()[0]), $this->searchOperatorToDBExpr($builder, $operator->getArguments()[1])); |
98 | 98 | default: |
99 | - throw new \InvalidArgumentException('Invalid operator type: ' . $operator->getType()); |
|
99 | + throw new \InvalidArgumentException('Invalid operator type: '.$operator->getType()); |
|
100 | 100 | } |
101 | 101 | } else if ($operator instanceof ISearchComparison) { |
102 | 102 | return $this->searchComparisonToDBExpr($builder, $operator, self::$searchOperatorMap); |
103 | 103 | } else { |
104 | - throw new \InvalidArgumentException('Invalid operator type: ' . get_class($operator)); |
|
104 | + throw new \InvalidArgumentException('Invalid operator type: '.get_class($operator)); |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $queryOperator = $operatorMap[$type]; |
114 | 114 | return $builder->expr()->$queryOperator($field, $this->getParameterForValue($builder, $value)); |
115 | 115 | } else { |
116 | - throw new \InvalidArgumentException('Invalid operator type: ' . $comparison->getType()); |
|
116 | + throw new \InvalidArgumentException('Invalid operator type: '.$comparison->getType()); |
|
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $type = ISearchComparison::COMPARE_EQUAL; |
133 | 133 | } |
134 | 134 | if (strpos($value, '%') !== false) { |
135 | - throw new \InvalidArgumentException('Unsupported query value for mimetype: ' . $value . ', only values in the format "mime/type" or "mime/%" are supported'); |
|
135 | + throw new \InvalidArgumentException('Unsupported query value for mimetype: '.$value.', only values in the format "mime/type" or "mime/%" are supported'); |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 | } else if ($field === 'favorite') { |
@@ -163,14 +163,14 @@ discard block |
||
163 | 163 | ]; |
164 | 164 | |
165 | 165 | if (!isset($types[$operator->getField()])) { |
166 | - throw new \InvalidArgumentException('Unsupported comparison field ' . $operator->getField()); |
|
166 | + throw new \InvalidArgumentException('Unsupported comparison field '.$operator->getField()); |
|
167 | 167 | } |
168 | 168 | $type = $types[$operator->getField()]; |
169 | 169 | if (gettype($operator->getValue()) !== $type) { |
170 | - throw new \InvalidArgumentException('Invalid type for field ' . $operator->getField()); |
|
170 | + throw new \InvalidArgumentException('Invalid type for field '.$operator->getField()); |
|
171 | 171 | } |
172 | 172 | if (!in_array($operator->getType(), $comparisons[$operator->getField()])) { |
173 | - throw new \InvalidArgumentException('Unsupported comparison for field ' . $operator->getField() . ': ' . $operator->getType()); |
|
173 | + throw new \InvalidArgumentException('Unsupported comparison for field '.$operator->getField().': '.$operator->getType()); |
|
174 | 174 | } |
175 | 175 | } |
176 | 176 |