Test Failed
Push — master ( 9d4a91...b97427 )
by Raffael
01:34 queued 11s
created
src/lib/Migration/Delta/SetPointerId.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
             $this->db->storage->updateOne(
50 50
                 ['_id' => $object['_id']],
51 51
                 [
52
-                   '$set' => ['pointer' => $pointer],
52
+                    '$set' => ['pointer' => $pointer],
53 53
                 ]
54 54
             );
55 55
         }
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/Collection.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
 use Balloon\Filesystem\Exception;
18 18
 use Balloon\Filesystem\Storage\Adapter\AdapterInterface as StorageAdapterInterface;
19 19
 use Balloon\Hook;
20
-use Balloon\Server\User;
21 20
 use Generator;
22 21
 use MimeType\MimeType;
23 22
 use function MongoDB\BSON\fromJSON;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v2/Nodes.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -970,9 +970,9 @@
 block discarded – undo
970 970
                 //json_decode($stored, true),
971 971
             } catch (\Exception $e) {
972 972
                 $this->logger->debug('failed zip node in multi node request ['.$node->getId().']', [
973
-                   'category' => get_class($this),
974
-                   'exception' => $e,
975
-               ]);
973
+                    'category' => get_class($this),
974
+                    'exception' => $e,
975
+                ]);
976 976
             }
977 977
         }
978 978
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             }
103 103
         }
104 104
 
105
-        return $this->bulk($id, function ($node) use ($parent, $conflict, $move) {
105
+        return $this->bulk($id, function($node) use ($parent, $conflict, $move) {
106 106
             if (true === $move) {
107 107
                 $node = $node->setParent($parent, $conflict);
108 108
             }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             return (new Response())->setCode(200)->setBody($result);
177 177
         }
178 178
 
179
-        return $this->bulk($id, function ($node) use ($attributes) {
179
+        return $this->bulk($id, function($node) use ($attributes) {
180 180
             return [
181 181
                 'code' => 200,
182 182
                 'data' => $this->node_decorator->decorate($node, $attributes),
@@ -210,9 +210,9 @@  discard block
 block discarded – undo
210 210
     public function patch(string $id, ?string $name = null, ?array $meta = null, ?bool $readonly = null, ?array $filter = null, ?array $acl = null): Response
211 211
     {
212 212
         $attributes = compact('name', 'meta', 'readonly', 'filter', 'acl');
213
-        $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); });
213
+        $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); });
214 214
 
215
-        return $this->bulk($id, function ($node) use ($attributes) {
215
+        return $this->bulk($id, function($node) use ($attributes) {
216 216
             foreach ($attributes as $attribute => $value) {
217 217
                 switch ($attribute) {
218 218
                     case 'name':
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
             );
265 265
         }
266 266
 
267
-        return $this->bulk($id, function ($node) use ($parent, $conflict) {
267
+        return $this->bulk($id, function($node) use ($parent, $conflict) {
268 268
             $result = $node->copyTo($parent, $conflict);
269 269
 
270 270
             return [
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
             );
292 292
         }
293 293
 
294
-        return $this->bulk($id, function ($node) use ($parent, $conflict) {
294
+        return $this->bulk($id, function($node) use ($parent, $conflict) {
295 295
             $result = $node->setParent($parent, $conflict);
296 296
 
297 297
             return [
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
             $at = $this->_verifyAttributes(['destroy' => $at])['destroy'];
317 317
         }
318 318
 
319
-        return $this->bulk($id, function ($node) use ($force, $ignore_flag, $at) {
319
+        return $this->bulk($id, function($node) use ($force, $ignore_flag, $at) {
320 320
             if (null === $at) {
321 321
                 $node->delete($force && $node->isDeleted() || $force && $ignore_flag);
322 322
             } else {
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v1/Controller.php 1 patch
Doc Comments   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -249,6 +249,8 @@  discard block
 block discarded – undo
249 249
      * Load nodes by id.
250 250
      *
251 251
      * @param null|mixed $class
252
+     * @param string $id
253
+     * @param string $path
252 254
      */
253 255
     public function getNodes(?array $id = null, ?array $path = null, $class = null, int $deleted = NodeInterface::DELETED_EXCLUDE): Generator
254 256
     {
@@ -277,9 +279,10 @@  discard block
 block discarded – undo
277 279
     /**
278 280
      * Load node.
279 281
      *
280
-     * @param null|mixed $id
281
-     * @param null|mixed $path
282
+     * @param string|null $id
283
+     * @param string|null $path
282 284
      * @param null|mixed $class
285
+     * @param integer $deleted
283 286
      */
284 287
     public function getNode($id = null, $path = null, $class = null, bool $multiple = false, bool $allow_root = false, ?int $deleted = null): NodeInterface
285 288
     {
@@ -359,7 +362,7 @@  discard block
 block discarded – undo
359 362
      * @param string $class      Force set node type
360 363
      * @param bool   $multiple   Allow $id to be an array
361 364
      * @param bool   $allow_root Allow instance of root collection
362
-     * @param bool   $deleted    How to handle deleted node
365
+     * @param integer   $deleted    How to handle deleted node
363 366
      */
364 367
     protected function _getNode(
365 368
         ?string $id = null,
@@ -391,7 +394,7 @@  discard block
 block discarded – undo
391 394
      * @param string $id
392 395
      * @param string $path
393 396
      * @param string $class   Force set node type
394
-     * @param bool   $deleted How to handle deleted node
397
+     * @param integer   $deleted How to handle deleted node
395 398
      */
396 399
     protected function _getNodes(
397 400
         $id = null,
Please login to merge, or discard this patch.
src/app/Balloon.App.Idp/Api/v2/Tokens.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         $params = $response->getParameters();
44 44
 
45 45
         return (new Response())
46
-             ->setCode($response->getStatusCode())
47
-             ->setBody($params);
46
+                ->setCode($response->getStatusCode())
47
+                ->setBody($params);
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v2/Files.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
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): 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);
Please login to merge, or discard this patch.
src/app/Balloon.App.Notification/Api/v2/Subscription.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
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 [
Please login to merge, or discard this patch.
src/lib/Server/AttributeDecorator.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
         }
98 98
 
99 99
         return [
100
-            'created' => function ($role) use ($attributes) {
100
+            'created' => function($role) use ($attributes) {
101 101
                 return $attributes['created']->toDateTime()->format('c');
102 102
             },
103
-            'changed' => function ($role) use ($attributes) {
103
+            'changed' => function($role) use ($attributes) {
104 104
                 return $attributes['changed']->toDateTime()->format('c');
105 105
             },
106
-            'deleted' => function ($role) use ($attributes) {
106
+            'deleted' => function($role) use ($attributes) {
107 107
                 if (false === $attributes['deleted']) {
108 108
                     return null;
109 109
                 }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             'id' => (string) $attributes['_id'],
127 127
             'name' => $attributes['name'],
128 128
             'namespace' => isset($attributes['namespace']) ? (string) $attributes['namespace'] : null,
129
-            'member' => array_map(function ($member) { return (string) $member; }, $attributes['member']),
129
+            'member' => array_map(function($member) { return (string) $member; }, $attributes['member']),
130 130
         ];
131 131
     }
132 132
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             'name' => (string) $attributes['username'],
149 149
             'admin' => (bool) $attributes['admin'],
150 150
             'namespace' => isset($attributes['namespace']) ? (string) $attributes['namespace'] : null,
151
-            'mail' => function ($role) use ($attributes, $user) {
151
+            'mail' => function($role) use ($attributes, $user) {
152 152
                 if (!isset($attributes['mail'])) {
153 153
                     return null;
154 154
                 }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             'locale' => isset($attributes['locale']) ? (string) $attributes['locale'] : null,
163 163
             'hard_quota' => isset($attributes['hard_quota']) ? (int) $attributes['hard_quota'] : null,
164 164
             'soft_quota' => isset($attributes['soft_quota']) ? (int) $attributes['soft_quota'] : null,
165
-            'available' => function ($role) use (&$quota, $attributes, $user) {
165
+            'available' => function($role) use (&$quota, $attributes, $user) {
166 166
                 $quota === null ? $quota = $role->getQuotaUsage() : null;
167 167
                 if ($attributes['_id'] == $user->getId() || $user->isAdmin()) {
168 168
                     return $quota['available'];
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
                 return null;
172 172
             },
173
-            'used' => function ($role) use (&$quota, $attributes, $user) {
173
+            'used' => function($role) use (&$quota, $attributes, $user) {
174 174
                 $quota === null ? $quota = $role->getQuotaUsage() : null;
175 175
                 if ($attributes['_id'] == $user->getId() || $user->isAdmin()) {
176 176
                     return $quota['used'];
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
                 return null;
180 180
             },
181
-            'auth' => function () use ($user) {
181
+            'auth' => function() use ($user) {
182 182
                 $identity = $user->getIdentity();
183 183
                 if ($identity === null) {
184 184
                     return null;
Please login to merge, or discard this patch.