Test Setup Failed
Branch master (b29bf8)
by Raffael
03:59
created
src/lib/Bootstrap/Http.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         if ($auth->requireOne()) {
43 43
             if (!($auth->getIdentity()->getAdapter() instanceof AuthNone)) {
44
-                $auth->getIdentity()->getAttributeMap()->addMapper('binary', function ($value) {
44
+                $auth->getIdentity()->getAttributeMap()->addMapper('binary', function($value) {
45 45
                     return new Binary($value, Binary::TYPE_GENERIC);
46 46
                 });
47 47
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     protected function setExceptionHandler(): self
88 88
     {
89
-        set_exception_handler(function ($e) {
89
+        set_exception_handler(function($e) {
90 90
             $this->container->get(LoggerInterface::class)->emergency('uncaught exception: '.$e->getMessage(), [
91 91
                 'category' => get_class($this),
92 92
                 'exception' => $e,
Please login to merge, or discard this patch.
src/lib/Bootstrap/Cli.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     protected function setExceptionHandler(): self
43 43
     {
44
-        set_exception_handler(function ($e) {
44
+        set_exception_handler(function($e) {
45 45
             $logger = $this->container->get(LoggerInterface::class);
46 46
             $logger->emergency('uncaught exception: '.$e->getMessage(), [
47 47
                 'category' => get_class($this),
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v2/Groups.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -302,7 +302,6 @@
 block discarded – undo
302 302
      * HTTP/1.1 200 OK
303 303
      *
304 304
      * @param string $id
305
-     * @param array  $attributes
306 305
      *
307 306
      * @return Response
308 307
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         }
271 271
 
272 272
         $attributes = compact('namespace', 'optional');
273
-        $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); });
273
+        $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); });
274 274
 
275 275
         $id = $this->server->addGroup($name, $member, $attributes);
276 276
         $result = $this->decorator->decorate($this->server->getGroupById($id));
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
     public function patch(string $id, ?array $member = null, ?string $namespace = null, ?array $optional = null): Response
310 310
     {
311 311
         $attributes = compact('namespace', 'optional', 'name', 'member');
312
-        $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); });
312
+        $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); });
313 313
 
314 314
         $group = $this->_getGroup($id, true);
315 315
         $group->setAttributes($attributes);
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v2/Users.php 2 patches
Doc Comments   -3 removed lines patch added patch discarded remove patch
@@ -158,8 +158,6 @@  discard block
 block discarded – undo
158 158
      *     "name": "peter.meier"
159 159
      * }
160 160
      *
161
-     * @param string $id
162
-     * @param string $uname
163 161
      *
164 162
      * @return Response
165 163
      */
@@ -429,7 +427,6 @@  discard block
 block discarded – undo
429 427
      *
430 428
      * @param string $uname
431 429
      * @param string $id
432
-     * @param array  $attributes
433 430
      *
434 431
      * @return Response
435 432
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
         }
389 389
 
390 390
         $attributes = compact('password', 'soft_quota', 'hard_quota', 'avatar', 'mail', 'admin', 'namespace', 'optional');
391
-        $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); });
391
+        $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); });
392 392
 
393 393
         if (isset($attributes['avatar'])) {
394 394
             $attributes['avatar'] = new Binary(base64_decode($attributes['avatar']), Binary::TYPE_GENERIC);
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     public function patch(?string $id = null, ?string $uname = null, ?string $username = null, ?string $password = null, ?int $soft_quota = null, ?int $hard_quota = null, ?string $avatar = null, ?string $mail = null, ?bool $admin = false, ?string $namespace = null, ?array $optional = null): Response
437 437
     {
438 438
         $attributes = compact('username', 'password', 'soft_quota', 'hard_quota', 'avatar', 'mail', 'admin', 'namespace', 'optional');
439
-        $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); });
439
+        $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); });
440 440
 
441 441
         if (isset($attributes['avatar'])) {
442 442
             $attributes['avatar'] = new Binary(base64_decode($attributes['avatar']), Binary::TYPE_GENERIC);
Please login to merge, or discard this patch.
src/app/Balloon.App.Notification/Notifier.php 2 patches
Doc Comments   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      *
72 72
      * @param Database       $db
73 73
      * @param Server         $server
74
-     * @param LoggerInterace $logger
74
+     * @param LoggerInterface $logger
75 75
      * @param iterable       $config
76 76
      */
77 77
     public function __construct(Database $db, Server $server, LoggerInterface $logger, ?Iterable $config = null)
@@ -116,9 +116,7 @@  discard block
 block discarded – undo
116 116
      *
117 117
      * @param iterable $receiver
118 118
      * @param User     $sender
119
-     * @param string   $subject
120
-     * @param string   $body
121
-     * @param array    $context
119
+     * @param string    $context
122 120
      *
123 121
      * @return bool
124 122
      */
@@ -226,10 +224,10 @@  discard block
 block discarded – undo
226 224
     /**
227 225
      * Add notification.
228 226
      *
229
-     * @param array            $receiver
230
-     * @param User             $user
227
+     * @param User            $receiver
231 228
      * @param MessageInterface $message
232 229
      * @param array            $context
230
+     * @param User $sender
233 231
      *
234 232
      * @return ObjectId
235 233
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
             $subs[$user_id] = $subscription;
348 348
             $node->setAppAttribute(__NAMESPACE__, 'subscription', $subs);
349 349
             if ($node instanceof Collection && $recursive === true) {
350
-                $node->doRecursiveAction(function ($child) use ($subscription, $user_id) {
350
+                $node->doRecursiveAction(function($child) use ($subscription, $user_id) {
351 351
                     $subs = $child->getAppAttribute(__NAMESPACE__, 'subscription');
352 352
                     $subs[$user_id] = $subscription;
353 353
                     $child->setAppAttribute(__NAMESPACE__, 'subscription', $subs);
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
             $node->setAppAttribute(__NAMESPACE__, 'subscription', $subs);
366 366
 
367 367
             if ($node instanceof Collection && $recursive === true) {
368
-                $node->doRecursiveAction(function ($child) use ($user_id) {
368
+                $node->doRecursiveAction(function($child) use ($user_id) {
369 369
                     $subs = $child->getAppAttribute(__NAMESPACE__, 'subscription');
370 370
 
371 371
                     if (isset($subs[$user_id])) {
Please login to merge, or discard this patch.
src/app/Balloon.App.Sharelink/Constructor/Http.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,6 @@
 block discarded – undo
50 50
      * @param Router             $router
51 51
      * @param Hook               $hook
52 52
      * @param Share              $sharelink
53
-     * @param AttributeDecorator $decorator
54 53
      * @param LoggerInterface    $logger
55 54
      */
56 55
     public function __construct(Router $router, Hook $hook, Share $sharelink, NodeAttributeDecorator $node_decorator_v2, NodeAttributeDecoratorv1 $node_decorator_v1, LoggerInterface $logger)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             }
73 73
         });
74 74
 
75
-        $node_decorator_v2->addDecorator('sharelink_token', function ($node) use ($sharelink) {
75
+        $node_decorator_v2->addDecorator('sharelink_token', function($node) use ($sharelink) {
76 76
             $attributes = $sharelink->getSharelink($node);
77 77
 
78 78
             if (isset($attributes['token'])) {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             }
81 81
         });
82 82
 
83
-        $node_decorator_v2->addDecorator('sharelink_expire', function ($node) use ($sharelink) {
83
+        $node_decorator_v2->addDecorator('sharelink_expire', function($node) use ($sharelink) {
84 84
             $attributes = $sharelink->getSharelink($node);
85 85
 
86 86
             if (isset($attributes['expiration'])) {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             }
91 91
         });
92 92
 
93
-        $node_decorator_v1->addDecorator('sharelink', function ($node) use ($sharelink) {
93
+        $node_decorator_v1->addDecorator('sharelink', function($node) use ($sharelink) {
94 94
             return isset($sharelink->getSharelink($node)['token']);
95 95
         });
96 96
 
Please login to merge, or discard this patch.
src/lib/Filesystem.php 2 patches
Doc Comments   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     /**
182 182
      * Find raw node.
183 183
      *
184
-     * @param ObjectId $id
184
+     * @param ObjectId|null $id
185 185
      *
186 186
      * @return array
187 187
      */
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
      *
303 303
      * @param array  $id
304 304
      * @param string $class   Force check node type
305
-     * @param bool   $deleted
305
+     * @param integer   $deleted
306 306
      *
307 307
      * @return Generator
308 308
      */
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
      * @param string $class      Force set node type
432 432
      * @param bool   $multiple   Allow $id to be an array
433 433
      * @param bool   $allow_root Allow instance of root collection
434
-     * @param bool   $deleted    How to handle deleted node
434
+     * @param integer   $deleted    How to handle deleted node
435 435
      *
436 436
      * @return NodeInterface
437 437
      */
@@ -493,7 +493,6 @@  discard block
 block discarded – undo
493 493
      * @param array $filter
494 494
      * @param int   $offset
495 495
      * @param int   $limit
496
-     * @param int   $total
497 496
      *
498 497
      * @return Generator
499 498
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/Collection.php 3 patches
Doc Comments   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
     /**
270 270
      * Get real id (reference).
271 271
      *
272
-     * @return ObjectId
272
+     * @return ObjectId|null
273 273
      */
274 274
     public function getRealId(): ?ObjectId
275 275
     {
@@ -298,7 +298,6 @@  discard block
 block discarded – undo
298 298
     /**
299 299
      * Fetch children items of this collection.
300 300
      *
301
-     * @param string $node
302 301
      * @param int    $deleted
303 302
      * @param array  $filter
304 303
      * @param mixed  $name
@@ -860,7 +859,7 @@  discard block
 block discarded – undo
860 859
      * @param string $name
861 860
      * @param string $data
862 861
      *
863
-     * @return File
862
+     * @return string
864 863
      */
865 864
     public function createFile($name, $data = null): String
866 865
     {
@@ -885,7 +884,6 @@  discard block
 block discarded – undo
885 884
      *
886 885
      * @param callable $callable
887 886
      * @param int      $deleted
888
-     * @param bool     $ignore_exception
889 887
      *
890 888
      * @return bool
891 889
      */
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
 use Balloon\Filesystem\Acl\Exception\Forbidden as ForbiddenException;
17 17
 use Balloon\Filesystem\Exception;
18 18
 use Balloon\Hook;
19
-use Balloon\Server\User;
20 19
 use Generator;
21 20
 use MongoDB\BSON\ObjectId;
22 21
 use MongoDB\BSON\Regex;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         $this->deleted = new UTCDateTime();
387 387
 
388 388
         if (!$this->isReference()) {
389
-            $this->doRecursiveAction(function ($node) use ($recursion) {
389
+            $this->doRecursiveAction(function($node) use ($recursion) {
390 390
                 $node->delete(false, $recursion, false);
391 391
             }, NodeInterface::DELETED_EXCLUDE);
392 392
         }
@@ -991,7 +991,7 @@  discard block
 block discarded – undo
991 991
     protected function _forceDelete(?string $recursion = null, bool $recursion_first = true): bool
992 992
     {
993 993
         if (!$this->isReference()) {
994
-            $this->doRecursiveAction(function ($node) use ($recursion) {
994
+            $this->doRecursiveAction(function($node) use ($recursion) {
995 995
                 $node->delete(true, $recursion, false);
996 996
             }, NodeInterface::DELETED_INCLUDE);
997 997
         }
Please login to merge, or discard this patch.
src/lib/Server.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -209,6 +209,7 @@
 block discarded – undo
209 209
     /**
210 210
      * Filesystem factory.
211 211
      *
212
+     * @param User $user
212 213
      * @return Filesystem
213 214
      */
214 215
     public function getFilesystem(?User $user = null): Filesystem
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 
532 532
         $this->identity = $user;
533 533
         $user->updateIdentity($identity)
534
-             ->updateShares();
534
+                ->updateShares();
535 535
         $this->hook->run('postServerIdentity', [$user]);
536 536
 
537 537
         return true;
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
     public function getGroupByName(string $name): Group
663 663
     {
664 664
         $group = $this->db->group->findOne([
665
-           'name' => $name,
665
+            'name' => $name,
666 666
         ]);
667 667
 
668 668
         if (null === $group) {
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
     public function getGroupById(ObjectId $id): Group
683 683
     {
684 684
         $group = $this->db->group->findOne([
685
-           '_id' => $id,
685
+            '_id' => $id,
686 686
         ]);
687 687
 
688 688
         if (null === $group) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
Please login to merge, or discard this patch.