@@ -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, ?string $multi_factor_validate = null): Response |
180 | 180 | { |
181 | 181 | $attributes = compact('username', 'password', 'soft_quota', 'hard_quota', 'avatar', 'mail', 'admin', 'namespace', 'locale', 'multi_factor_auth', 'multi_factor_validate'); |
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); |
@@ -134,7 +134,7 @@ |
||
134 | 134 | /** |
135 | 135 | * {@inheritdoc} |
136 | 136 | */ |
137 | - public function preServerIdentity(Identity $identity, ?User &$user): void |
|
137 | + public function preServerIdentity(Identity $identity, ?User & $user): void |
|
138 | 138 | { |
139 | 139 | if (null === $user || (preg_match('#^/index.php/api/v2/tokens#', $_SERVER['ORIG_SCRIPT_NAME']) && isset($_POST['grant_type']) && (preg_match('#_mfa$#', $_POST['grant_type']) || $_POST['grant_type'] === 'refresh_token'))) { |
140 | 140 | return; |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | ->setCode(200) |
191 | 191 | ->setHeader('X-WOPI-Lock', '') |
192 | 192 | ->setBody($e); |
193 | - } catch (Exception\Locked|Exception\LockIdMissmatch|Exception\Forbidden $e) { |
|
193 | + } catch (Exception\Locked | Exception\LockIdMissmatch | Exception\Forbidden $e) { |
|
194 | 194 | $lock = $file->getLock(); |
195 | 195 | |
196 | 196 | return (new Response()) |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | ->setCode(200) |
243 | 243 | ->setHeader('X-WOPI-ItemVersion', (string) ($version == $result ? $result : $result)) |
244 | 244 | ->setBody($result); |
245 | - } catch (Exception\Locked|Exception\LockIdMissmatch $e) { |
|
245 | + } catch (Exception\Locked | Exception\LockIdMissmatch $e) { |
|
246 | 246 | $lock = $file->getLock(); |
247 | 247 | |
248 | 248 | return $response |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | $response = (new Response()) |
268 | 268 | ->setCode(200) |
269 | 269 | ->setHeader('X-WOPI-ItemVersion', (string) $file->getVersion()) |
270 | - ->setBody(function () use ($stream) { |
|
270 | + ->setBody(function() use ($stream) { |
|
271 | 271 | if ($stream === null) { |
272 | 272 | echo ''; |
273 | 273 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | { |
40 | 40 | try { |
41 | 41 | $this->createIndex(); |
42 | - } catch (CommandException|RuntimeException $e) { |
|
42 | + } catch (CommandException | RuntimeException $e) { |
|
43 | 43 | if ($e->getCode() === 85) { |
44 | 44 | $this->db->selectCollection('fs.files')->dropIndex('md5_1'); |
45 | 45 | $this->createIndex(); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | { |
40 | 40 | try { |
41 | 41 | $this->createIndex(); |
42 | - } catch (CommandException|RuntimeException $e) { |
|
42 | + } catch (CommandException | RuntimeException $e) { |
|
43 | 43 | if ($e->getCode() === 85) { |
44 | 44 | $this->db->selectCollection('user')->dropIndex('mail_1'); |
45 | 45 | $this->createIndex(); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | { |
40 | 40 | try { |
41 | 41 | $this->createIndex(); |
42 | - } catch (CommandException|RuntimeException $e) { |
|
42 | + } catch (CommandException | RuntimeException $e) { |
|
43 | 43 | if ($e->getCode() === 85) { |
44 | 44 | $this->db->selectCollection('user')->dropIndex('mail_1'); |
45 | 45 | $this->createIndex(); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | if ( |
83 | 83 | !($this->auth->getIdentity()->getAdapter() instanceof AuthNone)) { |
84 | - $this->auth->getIdentity()->getAttributeMap()->addMapper('binary', function ($value) { |
|
84 | + $this->auth->getIdentity()->getAttributeMap()->addMapper('binary', function($value) { |
|
85 | 85 | return new Binary($value, Binary::TYPE_GENERIC); |
86 | 86 | }); |
87 | 87 | |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | protected function setExceptionHandler(): self |
140 | 140 | { |
141 | - set_exception_handler(function ($e) { |
|
141 | + set_exception_handler(function($e) { |
|
142 | 142 | $this->logger->emergency('uncaught exception: '.$e->getMessage(), [ |
143 | 143 | 'category' => static::class, |
144 | 144 | 'exception' => $e, |
@@ -163,7 +163,7 @@ |
||
163 | 163 | */ |
164 | 164 | protected function setExceptionHandler(): self |
165 | 165 | { |
166 | - set_exception_handler(function ($e) { |
|
166 | + set_exception_handler(function($e) { |
|
167 | 167 | $this->logger->emergency('uncaught exception: '.$e->getMessage(), [ |
168 | 168 | 'category' => static::class, |
169 | 169 | 'exception' => $e, |
@@ -67,7 +67,7 @@ |
||
67 | 67 | /** |
68 | 68 | * {@inheritdoc} |
69 | 69 | */ |
70 | - public function preServerIdentity(Identity $identity, ?User &$user): void |
|
70 | + public function preServerIdentity(Identity $identity, ?User & $user): void |
|
71 | 71 | { |
72 | 72 | } |
73 | 73 |