@@ -629,7 +629,7 @@ |
||
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 | } |
@@ -816,7 +816,6 @@ discard block |
||
816 | 816 | /** |
817 | 817 | * Set app attributes. |
818 | 818 | * |
819 | - * @param AppInterface $app |
|
820 | 819 | * @param array $attributes |
821 | 820 | * |
822 | 821 | * @return NodeInterface |
@@ -832,7 +831,6 @@ discard block |
||
832 | 831 | /** |
833 | 832 | * Set app attribute. |
834 | 833 | * |
835 | - * @param AppInterface $app |
|
836 | 834 | * @param string $attribute |
837 | 835 | * @param mixed $value |
838 | 836 | * |
@@ -853,7 +851,6 @@ discard block |
||
853 | 851 | /** |
854 | 852 | * Remove app attribute. |
855 | 853 | * |
856 | - * @param AppInterface $app |
|
857 | 854 | * |
858 | 855 | * @return NodeInterface |
859 | 856 | */ |
@@ -870,7 +867,6 @@ discard block |
||
870 | 867 | /** |
871 | 868 | * Remove app attribute. |
872 | 869 | * |
873 | - * @param AppInterface $app |
|
874 | 870 | * @param string $attribute |
875 | 871 | * |
876 | 872 | * @return NodeInterface |
@@ -888,7 +884,6 @@ discard block |
||
888 | 884 | /** |
889 | 885 | * Get app attribute. |
890 | 886 | * |
891 | - * @param AppInterface $app |
|
892 | 887 | * @param string $attribute |
893 | 888 | * |
894 | 889 | * @return mixed |
@@ -905,7 +900,6 @@ discard block |
||
905 | 900 | /** |
906 | 901 | * Get app attributes. |
907 | 902 | * |
908 | - * @param AppInterface $app |
|
909 | 903 | * |
910 | 904 | * @return array |
911 | 905 | */ |
@@ -944,7 +938,7 @@ discard block |
||
944 | 938 | /** |
945 | 939 | * Get meta attributes as array. |
946 | 940 | * |
947 | - * @param array $attribute Specify attributes to return |
|
941 | + * @param array $attributes Specify attributes to return |
|
948 | 942 | * |
949 | 943 | * @return array |
950 | 944 | */ |
@@ -1115,9 +1109,9 @@ discard block |
||
1115 | 1109 | /** |
1116 | 1110 | * Get array value via string path. |
1117 | 1111 | * |
1118 | - * @param iterable $arr |
|
1112 | + * @param iterable $array |
|
1119 | 1113 | * @param string $path |
1120 | - * @param string $seperator |
|
1114 | + * @param string $separator |
|
1121 | 1115 | * |
1122 | 1116 | * @return mixed |
1123 | 1117 | */ |
@@ -1168,6 +1162,7 @@ discard block |
||
1168 | 1162 | |
1169 | 1163 | /** |
1170 | 1164 | * Duplicate name with a uniqid within name. |
1165 | + * @param string $name |
|
1171 | 1166 | */ |
1172 | 1167 | protected function getDuplicateName(?string $name = null, ?string $class = null): string |
1173 | 1168 | { |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | if ($this->auth->requireOne()) { |
87 | 87 | if (!($this->auth->getIdentity()->getAdapter() instanceof AuthNone)) { |
88 | - $this->auth->getIdentity()->getAttributeMap()->addMapper('binary', function ($value) { |
|
88 | + $this->auth->getIdentity()->getAttributeMap()->addMapper('binary', function($value) { |
|
89 | 89 | return new Binary($value, Binary::TYPE_GENERIC); |
90 | 90 | }); |
91 | 91 | |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | protected function setExceptionHandler(): self |
140 | 140 | { |
141 | - set_exception_handler(function ($e) { |
|
141 | + set_exception_handler(function($e) { |
|
142 | 142 | $this->logger->emergency('uncaught exception: '.$e->getMessage(), [ |
143 | 143 | 'category' => get_class($this), |
144 | 144 | 'exception' => $e, |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | protected function setErrorHandler(): self |
44 | 44 | { |
45 | - set_error_handler(function ($severity, $message, $file, $line) { |
|
45 | + set_error_handler(function($severity, $message, $file, $line) { |
|
46 | 46 | $log = $message.' in '.$file.':'.$line; |
47 | 47 | |
48 | 48 | switch ($severity) { |
@@ -77,7 +77,7 @@ |
||
77 | 77 | { |
78 | 78 | $role_decorator = $this->role_decorator; |
79 | 79 | |
80 | - $string = preg_replace_callback('/(\{user\.(([a-z]\.*)+)\})/', function ($match) use ($user, $role_decorator) { |
|
80 | + $string = preg_replace_callback('/(\{user\.(([a-z]\.*)+)\})/', function($match) use ($user, $role_decorator) { |
|
81 | 81 | return $role_decorator->decorate($user, [$match[2]])[$match[2]]; |
82 | 82 | }, $this->{$type}); |
83 | 83 |
@@ -32,7 +32,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -82,7 +82,7 @@ |
||
82 | 82 | $node_decorator = $this->node_decorator; |
83 | 83 | $notifier = $this->notifier; |
84 | 84 | |
85 | - return $this->bulk($id, $p, function ($node) use ($node_decorator, $notifier, $subscribe, $exclude_me, $recursive) { |
|
85 | + return $this->bulk($id, $p, function($node) use ($node_decorator, $notifier, $subscribe, $exclude_me, $recursive) { |
|
86 | 86 | $notifier->subscribeNode($node, $subscribe, $exclude_me, $recursive); |
87 | 87 | |
88 | 88 | return [ |
@@ -102,7 +102,7 @@ |
||
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 | if (!isset($message['sender'])) { |
107 | 107 | return null; |
108 | 108 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | ->setHeader('Content-Type', 'application/octet-stream') |
65 | 65 | ->setHeader('Content-Transfer-Encoding', 'binary') |
66 | 66 | ->setOutputFormat(null) |
67 | - ->setBody(function () use ($url) { |
|
67 | + ->setBody(function() use ($url) { |
|
68 | 68 | $stream = fopen($url, 'r'); |
69 | 69 | while (!feof($stream)) { |
70 | 70 | echo fread($stream, 8192); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | ->prependRoute(new Route('/api/v2/files/convert(/|\z)', Convert::class)) |
35 | 35 | ->prependRoute(new Route('/api/v2/files/{id:#([0-9a-z]{24})#}/convert(/|\z)', Convert::class)); |
36 | 36 | |
37 | - $node_decorator->addDecorator('master', function ($node) use ($convert_decorator, $converter) { |
|
37 | + $node_decorator->addDecorator('master', function($node) use ($convert_decorator, $converter) { |
|
38 | 38 | $master = $node->getAppAttribute('Balloon\\App\\Convert', 'master'); |
39 | 39 | if (null === $master) { |
40 | 40 | return null; |