@@ -35,7 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | return $response |
| 37 | 37 | ->setOutputFormat(null) |
| 38 | - ->setBody(function () use ($file) { |
|
| 38 | + ->setBody(function() use ($file) { |
|
| 39 | 39 | $stream = $file->get(); |
| 40 | 40 | $name = $file->getName(); |
| 41 | 41 | |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | $this->storage = $this->_parent->getStorage()->deleteCollection($this); |
| 363 | 363 | |
| 364 | 364 | if (!$this->isReference() && !$this->isMounted() && !$this->isFiltered()) { |
| 365 | - $this->doRecursiveAction(function ($node) use ($recursion) { |
|
| 365 | + $this->doRecursiveAction(function($node) use ($recursion) { |
|
| 366 | 366 | $node->delete(false, $recursion, false); |
| 367 | 367 | }, NodeInterface::DELETED_EXCLUDE); |
| 368 | 368 | } |
@@ -917,7 +917,7 @@ discard block |
||
| 917 | 917 | protected function _forceDelete(?string $recursion = null, bool $recursion_first = true): bool |
| 918 | 918 | { |
| 919 | 919 | if (!$this->isReference() && !$this->isMounted() && !$this->isFiltered()) { |
| 920 | - $this->doRecursiveAction(function ($node) use ($recursion) { |
|
| 920 | + $this->doRecursiveAction(function($node) use ($recursion) { |
|
| 921 | 921 | $node->delete(true, $recursion, false); |
| 922 | 922 | }, NodeInterface::DELETED_INCLUDE); |
| 923 | 923 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | |
| 97 | 97 | if ($index === $chunks) { |
| 98 | 98 | $attributes = compact('changed', 'created', 'readonly', 'meta', 'acl'); |
| 99 | - $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); }); |
|
| 99 | + $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); }); |
|
| 100 | 100 | $attributes = $this->_verifyAttributes($attributes); |
| 101 | 101 | |
| 102 | 102 | return $this->_put($session, $id, $collection, $name, $attributes, $conflict); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $storage = $this->getStorage($id, $collection); |
| 129 | 129 | $session = $storage->storeTemporaryFile($input, $this->server->getIdentity()); |
| 130 | 130 | $attributes = compact('changed', 'created', 'readonly', 'meta', 'acl'); |
| 131 | - $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); }); |
|
| 131 | + $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); }); |
|
| 132 | 132 | $attributes = $this->_verifyAttributes($attributes); |
| 133 | 133 | |
| 134 | 134 | return $this->_put($session, $id, $collection, $name, $attributes, $conflict); |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | $attributes = compact('password', 'soft_quota', 'hard_quota', 'avatar', 'mail', 'admin', 'namespace', 'locale'); |
| 164 | - $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); }); |
|
| 164 | + $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); }); |
|
| 165 | 165 | |
| 166 | 166 | if (isset($attributes['avatar'])) { |
| 167 | 167 | $attributes['avatar'] = new Binary(base64_decode($attributes['avatar']), Binary::TYPE_GENERIC); |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | public function patch(string $id, ?string $username = null, ?string $password = null, ?int $soft_quota = null, ?int $hard_quota = null, ?string $avatar = null, ?string $mail = null, ?bool $admin = null, ?string $namespace = null, ?string $locale = null, ?bool $multi_factor_auth = null): Response |
| 180 | 180 | { |
| 181 | 181 | $attributes = compact('username', 'password', 'soft_quota', 'hard_quota', 'avatar', 'mail', 'admin', 'namespace', 'locale', 'multi_factor_auth'); |
| 182 | - $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); }); |
|
| 182 | + $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); }); |
|
| 183 | 183 | |
| 184 | 184 | if (isset($attributes['avatar'])) { |
| 185 | 185 | $attributes['avatar'] = new Binary(base64_decode($attributes['avatar']), Binary::TYPE_GENERIC); |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | $node_decorator = $this->node_decorator; |
| 59 | 59 | $notifier = $this->notifier; |
| 60 | 60 | |
| 61 | - return $this->bulk($id, function ($node) use ($node_decorator, $notifier, $subscribe, $exclude_me, $recursive) { |
|
| 61 | + return $this->bulk($id, function($node) use ($node_decorator, $notifier, $subscribe, $exclude_me, $recursive) { |
|
| 62 | 62 | $notifier->subscribeNode($node, $subscribe, $exclude_me, $recursive); |
| 63 | 63 | |
| 64 | 64 | return [ |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | $attributes = compact('namespace'); |
| 124 | - $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); }); |
|
| 124 | + $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); }); |
|
| 125 | 125 | |
| 126 | 126 | $id = $this->server->addGroup($name, $member, $attributes); |
| 127 | 127 | $result = $this->decorator->decorate($this->server->getGroupById($id)); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | public function patch(string $id, ?string $name = null, ?array $member = null, ?string $namespace = null): Response |
| 136 | 136 | { |
| 137 | 137 | $attributes = compact('namespace', 'name', 'member'); |
| 138 | - $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); }); |
|
| 138 | + $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); }); |
|
| 139 | 139 | |
| 140 | 140 | $group = $this->_getGroup($id, true); |
| 141 | 141 | $group->setAttributes($attributes); |
@@ -161,7 +161,7 @@ |
||
| 161 | 161 | $tpl = new Template($type); |
| 162 | 162 | |
| 163 | 163 | $attributes = compact('readonly', 'meta'); |
| 164 | - $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); }); |
|
| 164 | + $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); }); |
|
| 165 | 165 | |
| 166 | 166 | $stream = $tpl->get(); |
| 167 | 167 | $storage = $parent->getStorage(); |
@@ -263,7 +263,7 @@ |
||
| 263 | 263 | $response = (new Response()) |
| 264 | 264 | ->setCode(200) |
| 265 | 265 | ->setHeader('X-WOPI-ItemVersion', (string) $file->getVersion()) |
| 266 | - ->setBody(function () use ($stream) { |
|
| 266 | + ->setBody(function() use ($stream) { |
|
| 267 | 267 | if ($stream === null) { |
| 268 | 268 | echo ''; |
| 269 | 269 | |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | ->prependRoute(new Route('/api/v2/files/preview(/|\z)', v2\Preview::class)) |
| 32 | 32 | ->prependRoute(new Route('/api/v2/files/{id:#([0-9a-z]{24})#}/preview(/|\z)', v2\Preview::class)); |
| 33 | 33 | |
| 34 | - $decorator->addDecorator('preview', function ($node) { |
|
| 34 | + $decorator->addDecorator('preview', function($node) { |
|
| 35 | 35 | if ($node instanceof Collection) { |
| 36 | 36 | return null; |
| 37 | 37 | } |