@@ -84,7 +84,7 @@ |
||
| 84 | 84 | */ |
| 85 | 85 | private function isRequestPublic(RequestInterface $request) { |
| 86 | 86 | $url = $request->getPath(); |
| 87 | - $matchingUrls = array_filter($this->publicURLs, function ($publicUrl) use ($url) { |
|
| 87 | + $matchingUrls = array_filter($this->publicURLs, function($publicUrl) use ($url) { |
|
| 88 | 88 | return strpos($url, $publicUrl, 0) === 0; |
| 89 | 89 | }); |
| 90 | 90 | return !empty($matchingUrls); |
@@ -49,17 +49,17 @@ |
||
| 49 | 49 | * @param \DOMElement $errorNode |
| 50 | 50 | * @return void |
| 51 | 51 | */ |
| 52 | - public function serialize(\Sabre\DAV\Server $server,\DOMElement $errorNode) { |
|
| 52 | + public function serialize(\Sabre\DAV\Server $server, \DOMElement $errorNode) { |
|
| 53 | 53 | |
| 54 | 54 | // set ownCloud namespace |
| 55 | 55 | $errorNode->setAttribute('xmlns:o', self::NS_OWNCLOUD); |
| 56 | 56 | |
| 57 | 57 | // adding the retry node |
| 58 | - $error = $errorNode->ownerDocument->createElementNS('o:','o:retry', var_export($this->retry, true)); |
|
| 58 | + $error = $errorNode->ownerDocument->createElementNS('o:', 'o:retry', var_export($this->retry, true)); |
|
| 59 | 59 | $errorNode->appendChild($error); |
| 60 | 60 | |
| 61 | 61 | // adding the message node |
| 62 | - $error = $errorNode->ownerDocument->createElementNS('o:','o:reason', $this->getMessage()); |
|
| 62 | + $error = $errorNode->ownerDocument->createElementNS('o:', 'o:reason', $this->getMessage()); |
|
| 63 | 63 | $errorNode->appendChild($error); |
| 64 | 64 | } |
| 65 | 65 | } |
@@ -60,9 +60,9 @@ |
||
| 60 | 60 | |
| 61 | 61 | public function propFind(PropFind $propFind, INode $node) { |
| 62 | 62 | /* Overload current-user-principal */ |
| 63 | - $propFind->handle('{DAV:}current-user-principal', function () { |
|
| 63 | + $propFind->handle('{DAV:}current-user-principal', function() { |
|
| 64 | 64 | if ($url = parent::getCurrentUserPrincipal()) { |
| 65 | - return new Principal(Principal::HREF, $url . '/'); |
|
| 65 | + return new Principal(Principal::HREF, $url.'/'); |
|
| 66 | 66 | } else { |
| 67 | 67 | return new Principal(Principal::UNAUTHENTICATED); |
| 68 | 68 | } |
@@ -120,10 +120,10 @@ discard block |
||
| 120 | 120 | public function update($name, $userVisible, $userAssignable) { |
| 121 | 121 | try { |
| 122 | 122 | if (!$this->tagManager->canUserSeeTag($this->tag, $this->user)) { |
| 123 | - throw new NotFound('Tag with id ' . $this->tag->getId() . ' does not exist'); |
|
| 123 | + throw new NotFound('Tag with id '.$this->tag->getId().' does not exist'); |
|
| 124 | 124 | } |
| 125 | 125 | if (!$this->tagManager->canUserAssignTag($this->tag, $this->user)) { |
| 126 | - throw new Forbidden('No permission to update tag ' . $this->tag->getId()); |
|
| 126 | + throw new Forbidden('No permission to update tag '.$this->tag->getId()); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | // only admin is able to change permissions, regular users can only rename |
@@ -132,17 +132,17 @@ discard block |
||
| 132 | 132 | if ($userVisible !== $this->tag->isUserVisible() |
| 133 | 133 | || $userAssignable !== $this->tag->isUserAssignable() |
| 134 | 134 | ) { |
| 135 | - throw new Forbidden('No permission to update permissions for tag ' . $this->tag->getId()); |
|
| 135 | + throw new Forbidden('No permission to update permissions for tag '.$this->tag->getId()); |
|
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | $this->tagManager->updateTag($this->tag->getId(), $name, $userVisible, $userAssignable); |
| 140 | 140 | } catch (TagNotFoundException $e) { |
| 141 | - throw new NotFound('Tag with id ' . $this->tag->getId() . ' does not exist'); |
|
| 141 | + throw new NotFound('Tag with id '.$this->tag->getId().' does not exist'); |
|
| 142 | 142 | } catch (TagAlreadyExistsException $e) { |
| 143 | 143 | throw new Conflict( |
| 144 | - 'Tag with the properties "' . $name . '", ' . |
|
| 145 | - $userVisible . ', ' . $userAssignable . ' already exists' |
|
| 144 | + 'Tag with the properties "'.$name.'", '. |
|
| 145 | + $userVisible.', '.$userAssignable.' already exists' |
|
| 146 | 146 | ); |
| 147 | 147 | } |
| 148 | 148 | } |
@@ -158,17 +158,17 @@ discard block |
||
| 158 | 158 | public function delete() { |
| 159 | 159 | try { |
| 160 | 160 | if (!$this->isAdmin) { |
| 161 | - throw new Forbidden('No permission to delete tag ' . $this->tag->getId()); |
|
| 161 | + throw new Forbidden('No permission to delete tag '.$this->tag->getId()); |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | if (!$this->tagManager->canUserSeeTag($this->tag, $this->user)) { |
| 165 | - throw new NotFound('Tag with id ' . $this->tag->getId() . ' not found'); |
|
| 165 | + throw new NotFound('Tag with id '.$this->tag->getId().' not found'); |
|
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | $this->tagManager->deleteTags($this->tag->getId()); |
| 169 | 169 | } catch (TagNotFoundException $e) { |
| 170 | 170 | // can happen if concurrent deletion occurred |
| 171 | - throw new NotFound('Tag with id ' . $this->tag->getId() . ' not found', 0, $e); |
|
| 171 | + throw new NotFound('Tag with id '.$this->tag->getId().' not found', 0, $e); |
|
| 172 | 172 | } |
| 173 | 173 | } |
| 174 | 174 | } |
@@ -156,15 +156,15 @@ |
||
| 156 | 156 | public function delete() { |
| 157 | 157 | try { |
| 158 | 158 | if (!$this->tagManager->canUserSeeTag($this->tag, $this->user)) { |
| 159 | - throw new NotFound('Tag with id ' . $this->tag->getId() . ' not found'); |
|
| 159 | + throw new NotFound('Tag with id '.$this->tag->getId().' not found'); |
|
| 160 | 160 | } |
| 161 | 161 | if (!$this->tagManager->canUserAssignTag($this->tag, $this->user)) { |
| 162 | - throw new Forbidden('No permission to unassign tag ' . $this->tag->getId()); |
|
| 162 | + throw new Forbidden('No permission to unassign tag '.$this->tag->getId()); |
|
| 163 | 163 | } |
| 164 | 164 | $this->tagMapper->unassignTags($this->objectId, $this->objectType, $this->tag->getId()); |
| 165 | 165 | } catch (TagNotFoundException $e) { |
| 166 | 166 | // can happen if concurrent deletion occurred |
| 167 | - throw new NotFound('Tag with id ' . $this->tag->getId() . ' not found', 0, $e); |
|
| 167 | + throw new NotFound('Tag with id '.$this->tag->getId().' not found', 0, $e); |
|
| 168 | 168 | } |
| 169 | 169 | } |
| 170 | 170 | } |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | * remove all user backends |
| 69 | 69 | * @since 8.0.0 |
| 70 | 70 | */ |
| 71 | - public function clearBackends() ; |
|
| 71 | + public function clearBackends(); |
|
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | 74 | * get a user by user id |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | */ |
| 62 | 62 | public function addEntityCollection($name, \Closure $entityExistsFunction) { |
| 63 | 63 | if (isset($this->collections[$name])) { |
| 64 | - throw new \OutOfBoundsException('Duplicate entity name "' . $name . '"'); |
|
| 64 | + throw new \OutOfBoundsException('Duplicate entity name "'.$name.'"'); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | $this->collections[$name] = $entityExistsFunction; |
@@ -57,6 +57,6 @@ |
||
| 57 | 57 | * @since 7.0.0 |
| 58 | 58 | */ |
| 59 | 59 | public function __toString() { |
| 60 | - return __CLASS__ . ": [{$this->code}]: {$this->message}\n"; |
|
| 60 | + return __CLASS__.": [{$this->code}]: {$this->message}\n"; |
|
| 61 | 61 | } |
| 62 | 62 | } |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | * @since 9.0.0 |
| 85 | 85 | */ |
| 86 | 86 | public function getGroups() { |
| 87 | - return array_map(function ($group) { |
|
| 87 | + return array_map(function($group) { |
|
| 88 | 88 | /** @var \OCP\IGroup $group */ |
| 89 | 89 | return $group->getGID(); |
| 90 | 90 | }, $this->groups); |