@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * balloon |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | 'id' => (string) $message['_id'], |
103 | 103 | 'message' => (string) $message['body'], |
104 | 104 | 'subject' => (string) $message['subject'], |
105 | - 'sender' => function ($message) use ($server, $role_decorator) { |
|
105 | + 'sender' => function($message) use ($server, $role_decorator) { |
|
106 | 106 | try { |
107 | 107 | return $role_decorator->decorate($server->getUserById($message['sender']), ['_links', 'id', 'username']); |
108 | 108 | } catch (\Exception $e) { |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * balloon |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * balloon |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * balloon |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * balloon |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | { |
228 | 228 | $decorator = $this->decorator; |
229 | 229 | |
230 | - return preg_replace_callback('/(\{node\.(([a-z]\.*)+)\})/', function ($match) use ($node, $decorator) { |
|
230 | + return preg_replace_callback('/(\{node\.(([a-z]\.*)+)\})/', function($match) use ($node, $decorator) { |
|
231 | 231 | $key = explode('.', $match[2]); |
232 | 232 | $key = array_shift($key); |
233 | 233 | $attrs = $decorator->decorate($node, [$key]); |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | { |
247 | 247 | $role_decorator = $this->role_decorator; |
248 | 248 | |
249 | - return preg_replace_callback('/(\{user\.(([a-z]\.*)+)\})/', function ($match) use ($user, $role_decorator) { |
|
249 | + return preg_replace_callback('/(\{user\.(([a-z]\.*)+)\})/', function($match) use ($user, $role_decorator) { |
|
250 | 250 | $key = explode('.', $match[2]); |
251 | 251 | $key = array_shift($key); |
252 | 252 | $attrs = $role_decorator->decorate($user, [$key]); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * balloon |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | ->prependRoute(new Route('/api/v2/nodes|files|collections/subscription(/|\z)', v2\Subscription::class)) |
36 | 36 | ->prependRoute(new Route('/api/v2/nodes|files|collections/{id:#([0-9a-z]{24})#}/subscription(/|\z)', v2\Subscription::class)); |
37 | 37 | |
38 | - $decorator->addDecorator('subscription', function ($node) use ($server) { |
|
38 | + $decorator->addDecorator('subscription', function($node) use ($server) { |
|
39 | 39 | $subscription = $node->getAppAttribute('Balloon\\App\\Notification', 'subscription'); |
40 | 40 | |
41 | 41 | if (is_array($subscription)) { |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | return false; |
46 | 46 | }); |
47 | 47 | |
48 | - $decorator->addDecorator('subscription_exclude_me', function ($node) use ($server) { |
|
48 | + $decorator->addDecorator('subscription_exclude_me', function($node) use ($server) { |
|
49 | 49 | $subscription = $node->getAppAttribute('Balloon\\App\\Notification', 'subscription'); |
50 | 50 | |
51 | 51 | if (is_array($subscription) && isset($subscription[(string) $server->getIdentity()->getId()]['exclude_me'])) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | return false; |
56 | 56 | }); |
57 | 57 | |
58 | - $decorator->addDecorator('subscription_recursive', function ($node) use ($server) { |
|
58 | + $decorator->addDecorator('subscription_recursive', function($node) use ($server) { |
|
59 | 59 | if (!($node instanceof Collection)) { |
60 | 60 | return null; |
61 | 61 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * balloon |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * balloon |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * balloon |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | $content = base64_encode(stream_get_contents($node->get())); |
354 | 354 | |
355 | 355 | $metadata = $meta['metadata']; |
356 | - array_walk_recursive($metadata, function (&$value) { $value = (string) $value; }); |
|
356 | + array_walk_recursive($metadata, function(&$value) { $value = (string) $value; }); |
|
357 | 357 | |
358 | 358 | $params = [ |
359 | 359 | 'index' => $this->es->getIndex(), |