Completed
Push — master ( 44e430...fa5669 )
by Raffael
11:31
created
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   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 
405 405
             if ($node instanceof Collection && $recursive === true) {
406 406
                 $db = $this->db;
407
-                $node->doRecursiveAction(function ($child) use ($db, $subscription) {
407
+                $node->doRecursiveAction(function($child) use ($db, $subscription) {
408 408
                     $subscription['node_id'] = $child->getId();
409 409
                     $db->subscription->replaceOne(
410 410
                         [
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 
431 431
             if ($node instanceof Collection && $recursive === true) {
432 432
                 $db = $this->db;
433
-                $node->doRecursiveAction(function ($child) use ($db, $node_id, $user_id) {
433
+                $node->doRecursiveAction(function($child) use ($db, $node_id, $user_id) {
434 434
                     $db->subscription->deleteOne([
435 435
                         'user' => $user_id,
436 436
                         'node' => $node_id,
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/AbstractNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -629,7 +629,7 @@
 block discarded – undo
629 629
             return true;
630 630
         }
631 631
 
632
-        return $this->doRecursiveAction(function ($node) use ($conflict, $recursion) {
632
+        return $this->doRecursiveAction(function($node) use ($conflict, $recursion) {
633 633
             $node->undelete($conflict, $recursion, false);
634 634
         }, NodeInterface::DELETED_ONLY);
635 635
     }
Please login to merge, or discard this patch.
src/app/Balloon.App.Notification/Constructor/Http.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             ->prependRoute(new Route('/api/v2/nodes|files|collections/subscription(/|\z)', v2\Subscription::class))
33 33
             ->prependRoute(new Route('/api/v2/nodes|files|collections/{id:#([0-9a-z]{24})#}/subscription(/|\z)', v2\Subscription::class));
34 34
 
35
-        $decorator->addDecorator('subscription', function ($node) use ($notifier, $server) {
35
+        $decorator->addDecorator('subscription', function($node) use ($notifier, $server) {
36 36
             $subscription = $notifier->getSubscription($node, $server->getIdentity());
37 37
             if ($subscription === null) {
38 38
                 return false;
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             return true;
42 42
         });
43 43
 
44
-        $decorator->addDecorator('subscription_exclude_me', function ($node) use ($notifier, $server) {
44
+        $decorator->addDecorator('subscription_exclude_me', function($node) use ($notifier, $server) {
45 45
             $subscription = $notifier->getSubscription($node, $server->getIdentity());
46 46
             if ($subscription === null) {
47 47
                 return false;
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             return $subscription['exclude_me'];
51 51
         });
52 52
 
53
-        $decorator->addDecorator('subscription_recursive', function ($node) use ($notifier, $server) {
53
+        $decorator->addDecorator('subscription_recursive', function($node) use ($notifier, $server) {
54 54
             if (!($node instanceof Collection)) {
55 55
                 return null;
56 56
             }
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v1/AttributeDecorator/NodeDecorator.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -141,20 +141,20 @@  discard block
 block discarded – undo
141 141
             'mime' => (string) $attributes['mime'],
142 142
             'readonly' => (bool) $attributes['readonly'],
143 143
             'directory' => $node instanceof Collection,
144
-            'meta' => function ($node) {
144
+            'meta' => function($node) {
145 145
                 return (object) $node->getMetaAttributes();
146 146
             },
147
-            'size' => function ($node) {
147
+            'size' => function($node) {
148 148
                 return $node->getSize();
149 149
             },
150
-            'path' => function ($node) {
150
+            'path' => function($node) {
151 151
                 try {
152 152
                     return $node->getPath();
153 153
                 } catch (\Exception $e) {
154 154
                     return null;
155 155
                 }
156 156
             },
157
-            'parent' => function ($node) {
157
+            'parent' => function($node) {
158 158
                 $id = $node->getAttributes()['parent'];
159 159
 
160 160
                 if (null === $id) {
@@ -163,10 +163,10 @@  discard block
 block discarded – undo
163 163
 
164 164
                 return (string) $id;
165 165
             },
166
-            'access' => function ($node) use ($acl) {
166
+            'access' => function($node) use ($acl) {
167 167
                 return $acl->getAclPrivilege($node);
168 168
             },
169
-            'share' => function ($node) {
169
+            'share' => function($node) {
170 170
                 if ($node->isShared() || !$node->isSpecial()) {
171 171
                     return null;
172 172
                 }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                     return null;
178 178
                 }
179 179
             },
180
-            'shareowner' => function ($node) use ($server, $fs) {
180
+            'shareowner' => function($node) use ($server, $fs) {
181 181
                 if (!$node->isSpecial()) {
182 182
                     return null;
183 183
                 }
@@ -223,20 +223,20 @@  discard block
 block discarded – undo
223 223
     protected function getTimeAttributes(NodeInterface $node, array $attributes): array
224 224
     {
225 225
         return [
226
-            'created' => function ($node) use ($attributes) {
226
+            'created' => function($node) use ($attributes) {
227 227
                 return $this->dateTimeToUnix($attributes['created']);
228 228
             },
229
-            'changed' => function ($node) use ($attributes) {
229
+            'changed' => function($node) use ($attributes) {
230 230
                 return $this->dateTimeToUnix($attributes['changed']);
231 231
             },
232
-            'deleted' => function ($node) use ($attributes) {
232
+            'deleted' => function($node) use ($attributes) {
233 233
                 if (false === $attributes['deleted']) {
234 234
                     return false;
235 235
                 }
236 236
 
237 237
                 return $this->dateTimeToUnix($attributes['deleted']);
238 238
             },
239
-            'destroy' => function ($node) use ($attributes) {
239
+            'destroy' => function($node) use ($attributes) {
240 240
                 if (null === $attributes['destroy']) {
241 241
                     return null;
242 242
                 }
Please login to merge, or discard this patch.