Test Failed
Push — master ( 9d4a91...b97427 )
by Raffael
01:34 queued 11s
created
src/lib/Migration/Delta/Md5BlobIgnoreNull.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 Md5BlobIgnoreNull implements DeltaInterface
Please login to merge, or discard this patch.
src/app/Balloon.App.Notification/Notifier.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 
349 349
             if ($node instanceof Collection && $recursive === true) {
350 350
                 $db = $this->db;
351
-                $node->doRecursiveAction(function ($child) use ($db, $subscription) {
351
+                $node->doRecursiveAction(function($child) use ($db, $subscription) {
352 352
                     $subscription['node'] = $child->getId();
353 353
                     $db->subscription->replaceOne(
354 354
                         [
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 
375 375
             if ($node instanceof Collection && $recursive === true) {
376 376
                 $db = $this->db;
377
-                $node->doRecursiveAction(function ($child) use ($db, $node_id, $user_id) {
377
+                $node->doRecursiveAction(function($child) use ($db, $node_id, $user_id) {
378 378
                     $db->subscription->deleteOne([
379 379
                         'user' => $user_id,
380 380
                         'node' => $node_id,
Please login to merge, or discard this patch.
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -93,6 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
     /**
95 95
      * Send notification.
96
+     * @param User $sender
96 97
      */
97 98
     public function notify(iterable $receiver, ?User $sender, MessageInterface $message): bool
98 99
     {
@@ -180,6 +181,7 @@  discard block
 block discarded – undo
180 181
 
181 182
     /**
182 183
      * Add notification.
184
+     * @param User $sender
183 185
      */
184 186
     public function postNotification(User $receiver, ?User $sender, MessageInterface $message): ObjectId
185 187
     {
@@ -206,6 +208,8 @@  discard block
 block discarded – undo
206 208
 
207 209
     /**
208 210
      * Get notifications.
211
+     * @param integer $offset
212
+     * @param integer $limit
209 213
      */
210 214
     public function getNotifications(User $user, ?int $offset = null, ?int $limit = null, ?int &$total = null): iterable
211 215
     {
@@ -278,6 +282,7 @@  discard block
 block discarded – undo
278 282
 
279 283
     /**
280 284
      * Get subscription.
285
+     * @return NodeInterface
281 286
      */
282 287
     public function getSubscription(NodeInterface $node, User $user): ?array
283 288
     {
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v1/File.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      *
118 118
      * @param string $id
119 119
      * @param string $p
120
-     * @param string $version
120
+     * @param integer $version
121 121
      */
122 122
     public function postRestore(int $version, ?string $id = null, ?string $p = null): Response
123 123
     {
@@ -406,6 +406,9 @@  discard block
 block discarded – undo
406 406
 
407 407
     /**
408 408
      * Get storage.
409
+     * @param string|null $id
410
+     * @param string|null $p
411
+     * @param string|null $collection
409 412
      */
410 413
     protected function getStorage($id, $p, $collection): StorageAdapterInterface
411 414
     {
Please login to merge, or discard this patch.
src/app/Balloon.App.Notification/AttributeDecorator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             'message' => (string) $message['body'],
99 99
             'subject' => (string) $message['subject'],
100 100
             'locale' => (string) $message['locale'],
101
-            'sender' => function ($message) use ($server, $role_decorator) {
101
+            'sender' => function($message) use ($server, $role_decorator) {
102 102
                 if (!isset($message['sender'])) {
103 103
                     return null;
104 104
                 }
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
                     return null;
110 110
                 }
111 111
             },
112
-            'created' => function ($message) {
112
+            'created' => function($message) {
113 113
                 return (new DateTime())->setTimestamp($message['_id']->getTimestamp())->format('c');
114 114
             },
115
-            'node' => function ($message) use ($node_decorator, $fs) {
115
+            'node' => function($message) use ($node_decorator, $fs) {
116 116
                 if (isset($message['node'])) {
117 117
                     try {
118 118
                         return $node_decorator->decorate($fs->findNodeById($message['node']), ['id', 'name', '_links']);
Please login to merge, or discard this patch.
src/app/Balloon.App.Office/Api/v2/Documents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
         $tpl = new Template($type);
162 162
 
163 163
         $attributes = compact('readonly', 'meta');
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
         $stream = $tpl->get();
167 167
         $storage = $parent->getStorage();
Please login to merge, or discard this patch.
src/lib/Async/WorkerFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
      */
55 55
     protected function setErrorHandler(LoggerInterface $logger): self
56 56
     {
57
-        set_error_handler(function ($severity, $message, $file, $line) use ($logger) {
57
+        set_error_handler(function($severity, $message, $file, $line) use ($logger) {
58 58
             $log = $message.' in '.$file.':'.$line;
59 59
 
60 60
             switch ($severity) {
Please login to merge, or discard this patch.
src/lib/Async/SmbScanner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
     protected function deleteNode(NodeInterface $node, Blackhole $dummy): bool
145 145
     {
146 146
         if ($node instanceof Collection) {
147
-            $node->doRecursiveAction(function (NodeInterface $node) use ($dummy) {
147
+            $node->doRecursiveAction(function(NodeInterface $node) use ($dummy) {
148 148
                 if ($node instanceof Collection) {
149 149
                     $node->setStorage($dummy);
150 150
                 }
Please login to merge, or discard this patch.
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,17 +135,17 @@  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
-            'acl' => function ($node) use ($attributes) {
141
+            'acl' => function($node) use ($attributes) {
142 142
                 if ($node->isShareMember() && count($attributes['acl']) > 0) {
143 143
                     return $node->getAcl();
144 144
                 }
145 145
 
146 146
                 return null;
147 147
             },
148
-            'share' => function ($node) use ($fs) {
148
+            'share' => function($node) use ($fs) {
149 149
                 if ($node->isShared() || !$node->isSpecial()) {
150 150
                     return null;
151 151
                 }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
                     return null;
157 157
                 }
158 158
             },
159
-            'sharename' => function ($node) {
159
+            'sharename' => function($node) {
160 160
                 if (!$node->isShared()) {
161 161
                     return null;
162 162
                 }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                     return null;
168 168
                 }
169 169
             },
170
-            'shareowner' => function ($node) use ($server, $fs, $decorator) {
170
+            'shareowner' => function($node) use ($server, $fs, $decorator) {
171 171
                 if (!$node->isSpecial()) {
172 172
                     return null;
173 173
                 }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                     return null;
182 182
                 }
183 183
             },
184
-            'owner' => function ($node) use ($server, $decorator) {
184
+            'owner' => function($node) use ($server, $decorator) {
185 185
                 try {
186 186
                     return $decorator->decorate(
187 187
                         $server->getUserById($node->getOwner()),
@@ -202,20 +202,20 @@  discard block
 block discarded – undo
202 202
     protected function getTimeAttributes(NodeInterface $node, array $attributes): array
203 203
     {
204 204
         return [
205
-            'created' => function ($node) use ($attributes) {
205
+            'created' => function($node) use ($attributes) {
206 206
                 return $attributes['created']->toDateTime()->format('c');
207 207
             },
208
-            'changed' => function ($node) use ($attributes) {
208
+            'changed' => function($node) use ($attributes) {
209 209
                 return $attributes['changed']->toDateTime()->format('c');
210 210
             },
211
-            'deleted' => function ($node) use ($attributes) {
211
+            'deleted' => function($node) use ($attributes) {
212 212
                 if (false === $attributes['deleted']) {
213 213
                     return null;
214 214
                 }
215 215
 
216 216
                 return $attributes['deleted']->toDateTime()->format('c');
217 217
             },
218
-            'destroy' => function ($node) use ($attributes) {
218
+            'destroy' => function($node) use ($attributes) {
219 219
                 if (null === $attributes['destroy']) {
220 220
                     return null;
221 221
                 }
@@ -243,14 +243,14 @@  discard block
 block discarded – undo
243 243
         return [
244 244
             'shared' => $node->isShared(),
245 245
             'reference' => $node->isReference(),
246
-            'filter' => function ($node) use ($attributes) {
246
+            'filter' => function($node) use ($attributes) {
247 247
                 if (null === $attributes['filter']) {
248 248
                     return null;
249 249
                 }
250 250
 
251 251
                 return json_decode($attributes['filter'], true);
252 252
             },
253
-            'mount' => function ($node) use ($fs, $attributes) {
253
+            'mount' => function($node) use ($fs, $attributes) {
254 254
                 $mount = $node->getAttributes()['mount'];
255 255
 
256 256
                 if (!$node->isMounted() && !$node->isReference()) {
Please login to merge, or discard this patch.
src/lib/Filesystem/Delta.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -246,7 +246,7 @@
 block discarded – undo
246 246
                         $delta[$share_member->getPath()] = $share_member;
247 247
                     }
248 248
                 } elseif ('undeleteCollection' === $log['operation'] || 'undeleteCollectionShare' === $log['operation']) {
249
-                    $log_node->doRecursiveAction(function ($sub_node) use (&$delta) {
249
+                    $log_node->doRecursiveAction(function($sub_node) use (&$delta) {
250 250
                         $delta[$sub_node->getPath()] = $sub_node;
251 251
                     });
252 252
                 }
Please login to merge, or discard this patch.
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -98,6 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
     /**
100 100
      * Build a single dimension array with all nodes.
101
+     * @param integer[] $cursor
101 102
      */
102 103
     public function buildFeedFromCurrentState(?array $cursor = null, int $limit = 100, ?NodeInterface $node = null): array
103 104
     {
@@ -220,6 +221,7 @@  discard block
 block discarded – undo
220 221
 
221 222
     /**
222 223
      * Get delta feed with changes and cursor.
224
+     * @param NodeInterface $node
223 225
      */
224 226
     public function getDeltaFeed(?string $cursor = null, int $limit = 250, ?NodeInterface $node = null): array
225 227
     {
@@ -327,6 +329,7 @@  discard block
 block discarded – undo
327 329
 
328 330
     /**
329 331
      * Get event log.
332
+     * @param NodeInterface $node
330 333
      */
331 334
     public function getEventLog(int $limit = 100, int $skip = 0, ?NodeInterface $node = null, ?int &$total = null): iterable
332 335
     {
@@ -575,6 +578,7 @@  discard block
 block discarded – undo
575 578
 
576 579
     /**
577 580
      * Get children with custom filter.
581
+     * @param integer $limit
578 582
      */
579 583
     protected function findNodeAttributesWithCustomFilter(
580 584
         ?array $filter = null,
Please login to merge, or discard this patch.