@@ -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); |
@@ -129,7 +129,7 @@ |
||
| 129 | 129 | $data = $result->fetchAll(); |
| 130 | 130 | $result->closeCursor(); |
| 131 | 131 | |
| 132 | - $entities = array_map(function ($row) { |
|
| 132 | + $entities = array_map(function($row) { |
|
| 133 | 133 | return DefaultToken::fromRow($row); |
| 134 | 134 | }, $data); |
| 135 | 135 | |
@@ -103,6 +103,6 @@ |
||
| 103 | 103 | $time = new \DateTime('now', $timeZone); |
| 104 | 104 | $timestampInfo = $time->format($this->config->getSystemValue('logdateformat', \DateTime::ATOM)); |
| 105 | 105 | |
| 106 | - return $timestampInfo . ' ' . $this->formatter->format($message); |
|
| 106 | + return $timestampInfo.' '.$this->formatter->format($message); |
|
| 107 | 107 | } |
| 108 | 108 | } |
@@ -54,8 +54,7 @@ |
||
| 54 | 54 | */ |
| 55 | 55 | public function getBody() { |
| 56 | 56 | return $this->stream ? |
| 57 | - $this->response->getBody()->detach(): |
|
| 58 | - $this->response->getBody()->getContents(); |
|
| 57 | + $this->response->getBody()->detach() : $this->response->getBody()->getContents(); |
|
| 59 | 58 | } |
| 60 | 59 | |
| 61 | 60 | /** |