@@ -49,7 +49,7 @@ |
||
49 | 49 | 'foreignField' => '_id', |
50 | 50 | 'localField' => 'history.storage._id', |
51 | 51 | 'as' => 'blob', |
52 | - ]], |
|
52 | + ]], |
|
53 | 53 | ]); |
54 | 54 | |
55 | 55 | foreach ($cursor as $object) { |
@@ -113,10 +113,10 @@ |
||
113 | 113 | $body->addPart($html); |
114 | 114 | |
115 | 115 | $mail = (new Message()) |
116 | - ->setSubject($message->getSubject($receiver)) |
|
117 | - ->setBody($body) |
|
118 | - ->setTo($address) |
|
119 | - ->setEncoding('UTF-8'); |
|
116 | + ->setSubject($message->getSubject($receiver)) |
|
117 | + ->setBody($body) |
|
118 | + ->setTo($address) |
|
119 | + ->setEncoding('UTF-8'); |
|
120 | 120 | |
121 | 121 | if (null === $sender) { |
122 | 122 | $mail->setFrom($this->sender_address, $this->sender_name); |
@@ -102,13 +102,13 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | return [ |
105 | - 'created' => function ($role) use ($attributes) { |
|
105 | + 'created' => function($role) use ($attributes) { |
|
106 | 106 | return $attributes['created']->toDateTime()->format('c'); |
107 | 107 | }, |
108 | - 'changed' => function ($role) use ($attributes) { |
|
108 | + 'changed' => function($role) use ($attributes) { |
|
109 | 109 | return $attributes['changed']->toDateTime()->format('c'); |
110 | 110 | }, |
111 | - 'deleted' => function ($role) use ($attributes) { |
|
111 | + 'deleted' => function($role) use ($attributes) { |
|
112 | 112 | if (false === $attributes['deleted']) { |
113 | 113 | return null; |
114 | 114 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | 'namespace' => (string) $attributes['namespace'], |
163 | 163 | 'mail' => (string) $attributes['mail'], |
164 | 164 | 'locale' => (string) $attributes['locale'], |
165 | - 'quota' => function ($role) use ($attributes, $user) { |
|
165 | + 'quota' => function($role) use ($attributes, $user) { |
|
166 | 166 | if ($attributes['_id'] == $user->getId() || $user->isAdmin()) { |
167 | 167 | return $role->getQuotaUsage(); |
168 | 168 | } |
@@ -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 | { |
@@ -171,7 +171,7 @@ |
||
171 | 171 | */ |
172 | 172 | protected function setExceptionHandler(): self |
173 | 173 | { |
174 | - set_exception_handler(function ($e) { |
|
174 | + set_exception_handler(function($e) { |
|
175 | 175 | $this->logger->emergency('uncaught exception: '.$e->getMessage(), [ |
176 | 176 | 'category' => get_class($this), |
177 | 177 | 'exception' => $e, |
@@ -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 | } |