Completed
Push — master ( 37faaa...541bbf )
by Raffael
10:18 queued 06:30
created
src/app/Balloon.App.Api/v1/File.php 1 patch
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      *
117 117
      * @param string $id
118 118
      * @param string $p
119
-     * @param string $version
119
+     * @param integer $version
120 120
      */
121 121
     public function postRestore(int $version, ?string $id = null, ?string $p = null): Response
122 122
     {
@@ -406,6 +406,9 @@  discard block
 block discarded – undo
406 406
 
407 407
     /**
408 408
      * Get Parent.
409
+     * @param string|null $id
410
+     * @param string|null $p
411
+     * @param string|null $collection
409 412
      */
410 413
     protected function getParent($id, $p, $collection): Collection
411 414
     {
@@ -427,7 +430,7 @@  discard block
 block discarded – undo
427 430
     /**
428 431
      * Add or update file.
429 432
      *
430
-     * @param ObjecId $session
433
+     * @param SessionInterface $session
431 434
      * @param string  $id
432 435
      * @param string  $p
433 436
      * @param string  $collection
Please login to merge, or discard this patch.
src/app/Balloon.App.Notification/Notifier.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -129,6 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
     /**
131 131
      * Send notification.
132
+     * @param User $sender
132 133
      */
133 134
     public function notify(iterable $receiver, ?User $sender, MessageInterface $message): bool
134 135
     {
@@ -212,6 +213,7 @@  discard block
 block discarded – undo
212 213
 
213 214
     /**
214 215
      * Add notification.
216
+     * @param User $sender
215 217
      */
216 218
     public function postNotification(User $receiver, ?User $sender, MessageInterface $message): ObjectId
217 219
     {
@@ -238,6 +240,8 @@  discard block
 block discarded – undo
238 240
 
239 241
     /**
240 242
      * Get notifications.
243
+     * @param integer $offset
244
+     * @param integer $limit
241 245
      */
242 246
     public function getNotifications(User $user, array $query = [], ?int $offset = null, ?int $limit = null, ?int &$total = null): iterable
243 247
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -420,7 +420,7 @@
 block discarded – undo
420 420
 
421 421
             if ($node instanceof Collection && $recursive === true) {
422 422
                 $db = $this->db;
423
-                $node->doRecursiveAction(function ($child) use ($db, $node_id, $user_id) {
423
+                $node->doRecursiveAction(function($child) use ($db, $node_id, $user_id) {
424 424
                     $db->subscription->deleteOne([
425 425
                         'user' => $user_id,
426 426
                         'node' => $node_id,
Please login to merge, or discard this patch.
src/app/Balloon.App.Preview/Preview.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -65,6 +65,7 @@
 block discarded – undo
65 65
 
66 66
     /**
67 67
      * Set preview.
68
+     * @param resource $stream
68 69
      */
69 70
     public function setPreview(File $file, $stream): ObjectId
70 71
     {
Please login to merge, or discard this patch.
src/app/Balloon.App.Wopi/HostManager.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 namespace Balloon\App\Wopi;
13 13
 
14 14
 use GuzzleHttp\ClientInterface as GuzzleHttpClientInterface;
15
-use InvalidArgumentException;
16 15
 use phpseclib\Crypt\RSA;
17 16
 use phpseclib\Math\BigInteger;
18 17
 use Psr\Log\LoggerInterface;
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/Collection.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -590,6 +590,7 @@
 block discarded – undo
590 590
 
591 591
     /**
592 592
      * Create new file as a child from this collection.
593
+     * @param string $name
593 594
      */
594 595
     public function addFile($name, ?SessionInterface $session = null, array $attributes = [], int $conflict = NodeInterface::CONFLICT_NOACTION, bool $clone = false): File
595 596
     {
Please login to merge, or discard this patch.
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 Balloon\Session\Factory as SessionFactory;
22 21
 use Balloon\Session\SessionInterface;
23 22
 use Generator;
Please login to merge, or discard this patch.
src/lib/Migration/Delta/CreateUniqueUserMailIndexAllowNull.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 namespace Balloon\Migration\Delta;
13 13
 
14 14
 use MongoDB\Database;
15
-use MongoDB\Driver\Exception\CommandException;
16 15
 use MongoDB\Driver\Exception\RuntimeException;
17 16
 
18 17
 class CreateUniqueUserMailIndexAllowNull implements DeltaInterface
Please login to merge, or discard this patch.
src/lib/Session/Factory.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -89,6 +89,7 @@
 block discarded – undo
89 89
 
90 90
     /**
91 91
      * Update.
92
+     * @param resource $stream
92 93
      */
93 94
     public function update(User $user, SessionInterface $resource, Collection $parent, $stream): bool
94 95
     {
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
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
         if ($index === $chunks) {
99 99
             $attributes = compact('changed', 'created', 'readonly', 'meta', 'acl');
100
-            $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); });
100
+            $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); });
101 101
             $attributes = $this->_verifyAttributes($attributes);
102 102
 
103 103
             return $this->_put($session, $id, $collection, $name, $attributes, $conflict);
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $parent = $this->getParent($id, $collection);
130 130
         $session = $this->session_factory->add($this->server->getIdentity(), $parent, $input);
131 131
         $attributes = compact('changed', 'created', 'readonly', 'meta', 'acl');
132
-        $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); });
132
+        $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); });
133 133
         $attributes = $this->_verifyAttributes($attributes);
134 134
 
135 135
         return $this->_put($session, $id, $collection, $name, $attributes, $conflict);
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v2/Nodes.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             }
109 109
         }
110 110
 
111
-        return $this->bulk($id, function ($node) use ($parent, $conflict, $move) {
111
+        return $this->bulk($id, function($node) use ($parent, $conflict, $move) {
112 112
             if (true === $move) {
113 113
                 $node = $node->setParent($parent, $conflict);
114 114
             }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             return (new Response())->setCode(200)->setBody($result);
176 176
         }
177 177
 
178
-        return $this->bulk($id, function ($node) use ($attributes) {
178
+        return $this->bulk($id, function($node) use ($attributes) {
179 179
             return [
180 180
                 'code' => 200,
181 181
                 'data' => $this->node_decorator->decorate($node, $attributes),
@@ -211,11 +211,11 @@  discard block
 block discarded – undo
211 211
     public function patch(string $id, ?string $name = null, ?array $meta = null, ?bool $readonly = null, ?array $filter = null, $lock = null): Response
212 212
     {
213 213
         $attributes = compact('name', 'meta', 'readonly', 'filter', 'lock');
214
-        $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); });
214
+        $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); });
215 215
 
216 216
         $lock = $_SERVER['HTTP_LOCK_TOKEN'] ?? null;
217 217
 
218
-        return $this->bulk($id, function ($node) use ($attributes, $lock) {
218
+        return $this->bulk($id, function($node) use ($attributes, $lock) {
219 219
             foreach ($attributes as $attribute => $value) {
220 220
                 switch ($attribute) {
221 221
                     case 'name':
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
             throw new Exception\NotFound('destination collection was not found or is not a collection', Exception\NotFound::DESTINATION_NOT_FOUND);
269 269
         }
270 270
 
271
-        return $this->bulk($id, function ($node) use ($parent, $conflict) {
271
+        return $this->bulk($id, function($node) use ($parent, $conflict) {
272 272
             $result = $node->copyTo($parent, $conflict);
273 273
 
274 274
             return [
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
             throw new Exception\NotFound('destination collection was not found or is not a collection', Exception\NotFound::DESTINATION_NOT_FOUND);
293 293
         }
294 294
 
295
-        return $this->bulk($id, function ($node) use ($parent, $conflict) {
295
+        return $this->bulk($id, function($node) use ($parent, $conflict) {
296 296
             $result = $node->setParent($parent, $conflict);
297 297
 
298 298
             return [
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
             $at = $this->_verifyAttributes(['destroy' => $at])['destroy'];
318 318
         }
319 319
 
320
-        return $this->bulk($id, function ($node) use ($force, $ignore_flag, $at) {
320
+        return $this->bulk($id, function($node) use ($force, $ignore_flag, $at) {
321 321
             if (null === $at) {
322 322
                 $node->delete($force && $node->isDeleted() || $force && $ignore_flag);
323 323
             } else {
Please login to merge, or discard this patch.