@@ -666,6 +666,7 @@ discard block |
||
666 | 666 | |
667 | 667 | /** |
668 | 668 | * Create new file as a child from this collection. |
669 | + * @param string $name |
|
669 | 670 | */ |
670 | 671 | public function addFile($name, ?ObjectId $session = null, array $attributes = [], int $conflict = NodeInterface::CONFLICT_NOACTION, bool $clone = false): File |
671 | 672 | { |
@@ -898,6 +899,7 @@ discard block |
||
898 | 899 | |
899 | 900 | /** |
900 | 901 | * Completely remove node. |
902 | + * @param string $recursion |
|
901 | 903 | */ |
902 | 904 | protected function _forceDelete(?string $recursion = null, bool $recursion_first = true): bool |
903 | 905 | { |
@@ -113,20 +113,20 @@ discard block |
||
113 | 113 | 'mime' => (string) $attributes['mime'], |
114 | 114 | 'readonly' => (bool) $attributes['readonly'], |
115 | 115 | 'directory' => $node instanceof Collection, |
116 | - 'meta' => function ($node) { |
|
116 | + 'meta' => function($node) { |
|
117 | 117 | return (object) $node->getMetaAttributes(); |
118 | 118 | }, |
119 | - 'size' => function ($node) { |
|
119 | + 'size' => function($node) { |
|
120 | 120 | return $node->getSize(); |
121 | 121 | }, |
122 | - 'path' => function ($node) { |
|
122 | + 'path' => function($node) { |
|
123 | 123 | try { |
124 | 124 | return $node->getPath(); |
125 | 125 | } catch (\Exception $e) { |
126 | 126 | return null; |
127 | 127 | } |
128 | 128 | }, |
129 | - 'parent' => function ($node) { |
|
129 | + 'parent' => function($node) { |
|
130 | 130 | $parent = $node->getParent(); |
131 | 131 | |
132 | 132 | if (null === $parent || $parent->isRoot()) { |
@@ -135,17 +135,17 @@ discard block |
||
135 | 135 | |
136 | 136 | return $this->decorate($node->getParent(), ['id', 'name', '_links']); |
137 | 137 | }, |
138 | - 'access' => function ($node) use ($acl) { |
|
138 | + 'access' => function($node) use ($acl) { |
|
139 | 139 | return $acl->getAclPrivilege($node); |
140 | 140 | }, |
141 | - 'acl' => function ($node) use ($attributes) { |
|
141 | + 'acl' => function($node) use ($attributes) { |
|
142 | 142 | if ($node->isShareMember() && count($attributes['acl']) > 0) { |
143 | 143 | return $node->getAcl(); |
144 | 144 | } |
145 | 145 | |
146 | 146 | return null; |
147 | 147 | }, |
148 | - 'share' => function ($node) use ($fs) { |
|
148 | + 'share' => function($node) use ($fs) { |
|
149 | 149 | if ($node->isShared() || !$node->isSpecial()) { |
150 | 150 | return null; |
151 | 151 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | return null; |
157 | 157 | } |
158 | 158 | }, |
159 | - 'sharename' => function ($node) { |
|
159 | + 'sharename' => function($node) { |
|
160 | 160 | if (!$node->isShared()) { |
161 | 161 | return null; |
162 | 162 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | return null; |
168 | 168 | } |
169 | 169 | }, |
170 | - 'shareowner' => function ($node) use ($server, $fs, $decorator) { |
|
170 | + 'shareowner' => function($node) use ($server, $fs, $decorator) { |
|
171 | 171 | if (!$node->isSpecial()) { |
172 | 172 | return null; |
173 | 173 | } |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | return null; |
182 | 182 | } |
183 | 183 | }, |
184 | - 'owner' => function ($node) use ($server, $decorator) { |
|
184 | + 'owner' => function($node) use ($server, $decorator) { |
|
185 | 185 | try { |
186 | 186 | return $decorator->decorate( |
187 | 187 | $server->getUserById($node->getOwner()), |
@@ -202,20 +202,20 @@ discard block |
||
202 | 202 | protected function getTimeAttributes(NodeInterface $node, array $attributes): array |
203 | 203 | { |
204 | 204 | return [ |
205 | - 'created' => function ($node) use ($attributes) { |
|
205 | + 'created' => function($node) use ($attributes) { |
|
206 | 206 | return $attributes['created']->toDateTime()->format('c'); |
207 | 207 | }, |
208 | - 'changed' => function ($node) use ($attributes) { |
|
208 | + 'changed' => function($node) use ($attributes) { |
|
209 | 209 | return $attributes['changed']->toDateTime()->format('c'); |
210 | 210 | }, |
211 | - 'deleted' => function ($node) use ($attributes) { |
|
211 | + 'deleted' => function($node) use ($attributes) { |
|
212 | 212 | if (false === $attributes['deleted']) { |
213 | 213 | return null; |
214 | 214 | } |
215 | 215 | |
216 | 216 | return $attributes['deleted']->toDateTime()->format('c'); |
217 | 217 | }, |
218 | - 'destroy' => function ($node) use ($attributes) { |
|
218 | + 'destroy' => function($node) use ($attributes) { |
|
219 | 219 | if (null === $attributes['destroy']) { |
220 | 220 | return null; |
221 | 221 | } |
@@ -243,14 +243,14 @@ discard block |
||
243 | 243 | return [ |
244 | 244 | 'shared' => $node->isShared(), |
245 | 245 | 'reference' => $node->isReference(), |
246 | - 'filter' => function ($node) use ($attributes) { |
|
246 | + 'filter' => function($node) use ($attributes) { |
|
247 | 247 | if (null === $attributes['filter']) { |
248 | 248 | return null; |
249 | 249 | } |
250 | 250 | |
251 | 251 | return json_decode($attributes['filter'], true); |
252 | 252 | }, |
253 | - 'mount' => function ($node) use ($fs, $attributes) { |
|
253 | + 'mount' => function($node) use ($fs, $attributes) { |
|
254 | 254 | $mount = $node->getAttributes()['mount']; |
255 | 255 | |
256 | 256 | if (!$node->isMounted() && !$node->isReference()) { |
@@ -246,7 +246,7 @@ |
||
246 | 246 | $delta[$share_member->getPath()] = $share_member; |
247 | 247 | } |
248 | 248 | } elseif ('undeleteCollection' === $log['operation'] || 'undeleteCollectionShare' === $log['operation']) { |
249 | - $log_node->doRecursiveAction(function ($sub_node) use (&$delta) { |
|
249 | + $log_node->doRecursiveAction(function($sub_node) use (&$delta) { |
|
250 | 250 | $delta[$sub_node->getPath()] = $sub_node; |
251 | 251 | }); |
252 | 252 | } |