@@ -129,6 +129,7 @@ discard block |
||
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 |
||
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 |
||
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 | { |
@@ -420,7 +420,7 @@ |
||
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, |
@@ -65,6 +65,7 @@ |
||
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 | { |
@@ -12,7 +12,6 @@ |
||
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; |
@@ -12,7 +12,6 @@ |
||
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 |
@@ -89,6 +89,7 @@ |
||
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 | { |
@@ -97,7 +97,7 @@ discard block |
||
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 |
||
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); |
@@ -263,7 +263,7 @@ |
||
263 | 263 | $response = (new Response()) |
264 | 264 | ->setCode(200) |
265 | 265 | ->setHeader('X-WOPI-ItemVersion', (string) $file->getVersion()) |
266 | - ->setBody(function () use ($stream) { |
|
266 | + ->setBody(function() use ($stream) { |
|
267 | 267 | if ($stream === null) { |
268 | 268 | echo ''; |
269 | 269 |
@@ -69,7 +69,7 @@ |
||
69 | 69 | $tpl = new Template($type); |
70 | 70 | |
71 | 71 | $attributes = compact('readonly', 'meta'); |
72 | - $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); }); |
|
72 | + $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); }); |
|
73 | 73 | |
74 | 74 | $stream = $tpl->get(); |
75 | 75 | $session = $this->session_factory->add($this->server->getIdentity(), $parent, $stream); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | $subscription = null; |
36 | 36 | |
37 | - $decorator->addDecorator('subscription', function ($node) use ($notifier, $server, &$subscription) { |
|
37 | + $decorator->addDecorator('subscription', function($node) use ($notifier, $server, &$subscription) { |
|
38 | 38 | $subscription = $notifier->getSubscription($node, $server->getIdentity()); |
39 | 39 | if ($subscription === null) { |
40 | 40 | return false; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | return true; |
44 | 44 | }); |
45 | 45 | |
46 | - $decorator->addDecorator('subscription_exclude_me', function ($node) use (&$subscription) { |
|
46 | + $decorator->addDecorator('subscription_exclude_me', function($node) use (&$subscription) { |
|
47 | 47 | if ($subscription === null) { |
48 | 48 | return false; |
49 | 49 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | return $subscription['exclude_me']; |
52 | 52 | }); |
53 | 53 | |
54 | - $decorator->addDecorator('subscription_recursive', function ($node) use (&$subscription) { |
|
54 | + $decorator->addDecorator('subscription_recursive', function($node) use (&$subscription) { |
|
55 | 55 | if (!($node instanceof Collection)) { |
56 | 56 | return null; |
57 | 57 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | return $subscription['recursive']; |
64 | 64 | }); |
65 | 65 | |
66 | - $decorator->addDecorator('subscription_throttle', function ($node) use ($notifier, &$subscription) { |
|
66 | + $decorator->addDecorator('subscription_throttle', function($node) use ($notifier, &$subscription) { |
|
67 | 67 | if ($subscription === null) { |
68 | 68 | return $notifier->getThrottleTime(); |
69 | 69 | } |