Test Setup Failed
Pull Request — master (#468)
by
unknown
02:01 queued 19s
created
src/lib/Filesystem/Node/AttributeDecorator.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -113,20 +113,20 @@  discard block
 block discarded – undo
113 113
             'mime' => (string) $attributes['mime'],
114 114
             'readonly' => (bool) $attributes['readonly'],
115 115
             'directory' => $node instanceof Collection,
116
-            'meta' => function ($node) {
116
+            'meta' => function($node) {
117 117
                 return (object) $node->getMetaAttributes();
118 118
             },
119
-            'size' => function ($node) {
119
+            'size' => function($node) {
120 120
                 return $node->getSize();
121 121
             },
122
-            'path' => function ($node) {
122
+            'path' => function($node) {
123 123
                 try {
124 124
                     return $node->getPath();
125 125
                 } catch (\Exception $e) {
126 126
                     return null;
127 127
                 }
128 128
             },
129
-            'parent' => function ($node) {
129
+            'parent' => function($node) {
130 130
                 $parent = $node->getParent();
131 131
 
132 132
                 if (null === $parent || $parent->isRoot()) {
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
 
136 136
                 return $this->decorate($node->getParent(), ['id', 'name', '_links']);
137 137
             },
138
-            'access' => function ($node) use ($acl) {
138
+            'access' => function($node) use ($acl) {
139 139
                 return $acl->getAclPrivilege($node);
140 140
             },
141
-            'lock' => function ($node) use ($server, $decorator, $attributes) {
141
+            'lock' => function($node) use ($server, $decorator, $attributes) {
142 142
                 if (!$node->isLocked()) {
143 143
                     return null;
144 144
                 }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                     'id' => $lock['id'],
164 164
                 ];
165 165
             },
166
-            'share' => function ($node) use ($fs) {
166
+            'share' => function($node) use ($fs) {
167 167
                 if ($node->isShared() || !$node->isSpecial()) {
168 168
                     return null;
169 169
                 }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
                     return null;
175 175
                 }
176 176
             },
177
-            'sharename' => function ($node) {
177
+            'sharename' => function($node) {
178 178
                 if (!$node->isShared()) {
179 179
                     return null;
180 180
                 }
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
                     return null;
186 186
                 }
187 187
             },
188
-            'shareowner' => function ($node) use ($server, $fs, $decorator) {
188
+            'shareowner' => function($node) use ($server, $fs, $decorator) {
189 189
                 if (!$node->isSpecial()) {
190 190
                     return null;
191 191
                 }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                     return null;
200 200
                 }
201 201
             },
202
-            'owner' => function ($node) use ($server, $decorator) {
202
+            'owner' => function($node) use ($server, $decorator) {
203 203
                 try {
204 204
                     return $decorator->decorate(
205 205
                         $server->getUserById($node->getOwner()),
@@ -220,20 +220,20 @@  discard block
 block discarded – undo
220 220
     protected function getTimeAttributes(NodeInterface $node, array $attributes): array
221 221
     {
222 222
         return [
223
-            'created' => function ($node) use ($attributes) {
223
+            'created' => function($node) use ($attributes) {
224 224
                 return $attributes['created']->toDateTime()->format('c');
225 225
             },
226
-            'changed' => function ($node) use ($attributes) {
226
+            'changed' => function($node) use ($attributes) {
227 227
                 return $attributes['changed']->toDateTime()->format('c');
228 228
             },
229
-            'deleted' => function ($node) use ($attributes) {
229
+            'deleted' => function($node) use ($attributes) {
230 230
                 if (false === $attributes['deleted']) {
231 231
                     return null;
232 232
                 }
233 233
 
234 234
                 return $attributes['deleted']->toDateTime()->format('c');
235 235
             },
236
-            'destroy' => function ($node) use ($attributes) {
236
+            'destroy' => function($node) use ($attributes) {
237 237
                 if (null === $attributes['destroy']) {
238 238
                     return null;
239 239
                 }
@@ -261,14 +261,14 @@  discard block
 block discarded – undo
261 261
         return [
262 262
             'shared' => $node->isShared(),
263 263
             'reference' => $node->isReference(),
264
-            'filter' => function ($node) use ($attributes) {
264
+            'filter' => function($node) use ($attributes) {
265 265
                 if (null === $attributes['filter']) {
266 266
                     return null;
267 267
                 }
268 268
 
269 269
                 return json_decode($attributes['filter'], true, 512, JSON_THROW_ON_ERROR);
270 270
             },
271
-            'mount' => function ($node) use ($fs, $attributes) {
271
+            'mount' => function($node) use ($fs, $attributes) {
272 272
                 $mount = $node->getAttributes()['mount'];
273 273
 
274 274
                 if (!$node->isMounted() && !$node->isReference()) {
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/File.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -44,16 +44,16 @@
 block discarded – undo
44 44
      * @param array
45 45
      **/
46 46
     protected $temp_files = [
47
-        '/^\._(.*)$/',     // OS/X resource forks
48
-        '/^.DS_Store$/',   // OS/X custom folder settings
47
+        '/^\._(.*)$/', // OS/X resource forks
48
+        '/^.DS_Store$/', // OS/X custom folder settings
49 49
         '/^desktop.ini$/', // Windows custom folder settings
50
-        '/^Thumbs.db$/',   // Windows thumbnail cache
51
-        '/^.(.*).swpx$/',  // ViM temporary files
52
-        '/^.(.*).swx$/',   // ViM temporary files
53
-        '/^.(.*).swp$/',   // ViM temporary files
54
-        '/^\.dat(.*)$/',   // Smultron seems to create these
50
+        '/^Thumbs.db$/', // Windows thumbnail cache
51
+        '/^.(.*).swpx$/', // ViM temporary files
52
+        '/^.(.*).swx$/', // ViM temporary files
53
+        '/^.(.*).swp$/', // ViM temporary files
54
+        '/^\.dat(.*)$/', // Smultron seems to create these
55 55
         '/^~lock.(.*)#$/', // Windows 7 lockfiles
56
-        '/^\~\$/',         // Temporary office files
56
+        '/^\~\$/', // Temporary office files
57 57
     ];
58 58
 
59 59
     /**
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v2/Users.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/app/Balloon.App.Idp/GrantType/UserCredentialsMultiFactor.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 
108 108
                 $this->server->getUserById($user['_id'])->setAttributes([
109 109
                 'multi_factor_recovery' => $codes,
110
-              ]);
110
+                ]);
111 111
 
112 112
                 $this->user = $user;
113 113
 
Please login to merge, or discard this patch.
src/app/Balloon.App.Idp/Hook/MultiFactorAuth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/app/Balloon.App.Wopi/Wopi/Files.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/lib/Migration/Delta/Md5BlobIgnoreNull.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/lib/Migration/Delta/CreateUniqueUserMailIndexAllowNull.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/lib/Migration/Delta/CreateUniqueUserMailIndex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.