@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
102 | - return $this->bulk($id, function ($node) use ($parent, $conflict, $move) { |
|
102 | + return $this->bulk($id, function($node) use ($parent, $conflict, $move) { |
|
103 | 103 | if (true === $move) { |
104 | 104 | $node = $node->setParent($parent, $conflict); |
105 | 105 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | return (new Response())->setCode(200)->setBody($result); |
167 | 167 | } |
168 | 168 | |
169 | - return $this->bulk($id, function ($node) use ($attributes) { |
|
169 | + return $this->bulk($id, function($node) use ($attributes) { |
|
170 | 170 | return [ |
171 | 171 | 'code' => 200, |
172 | 172 | 'data' => $this->node_decorator->decorate($node, $attributes), |
@@ -202,11 +202,11 @@ discard block |
||
202 | 202 | public function patch(string $id, ?string $name = null, ?array $meta = null, ?bool $readonly = null, ?array $filter = null, ?array $acl = null, $lock = null): Response |
203 | 203 | { |
204 | 204 | $attributes = compact('name', 'meta', 'readonly', 'filter', 'acl', 'lock'); |
205 | - $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); }); |
|
205 | + $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); }); |
|
206 | 206 | |
207 | 207 | $lock = $_SERVER['HTTP_LOCK_TOKEN'] ?? null; |
208 | 208 | |
209 | - return $this->bulk($id, function ($node) use ($attributes, $lock) { |
|
209 | + return $this->bulk($id, function($node) use ($attributes, $lock) { |
|
210 | 210 | foreach ($attributes as $attribute => $value) { |
211 | 211 | switch ($attribute) { |
212 | 212 | case 'name': |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | throw new Exception\NotFound('destination collection was not found or is not a collection', Exception\NotFound::DESTINATION_NOT_FOUND); |
264 | 264 | } |
265 | 265 | |
266 | - return $this->bulk($id, function ($node) use ($parent, $conflict) { |
|
266 | + return $this->bulk($id, function($node) use ($parent, $conflict) { |
|
267 | 267 | $result = $node->copyTo($parent, $conflict); |
268 | 268 | |
269 | 269 | return [ |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | throw new Exception\NotFound('destination collection was not found or is not a collection', Exception\NotFound::DESTINATION_NOT_FOUND); |
288 | 288 | } |
289 | 289 | |
290 | - return $this->bulk($id, function ($node) use ($parent, $conflict) { |
|
290 | + return $this->bulk($id, function($node) use ($parent, $conflict) { |
|
291 | 291 | $result = $node->setParent($parent, $conflict); |
292 | 292 | |
293 | 293 | return [ |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | $at = $this->_verifyAttributes(['destroy' => $at])['destroy']; |
313 | 313 | } |
314 | 314 | |
315 | - return $this->bulk($id, function ($node) use ($force, $ignore_flag, $at) { |
|
315 | + return $this->bulk($id, function($node) use ($force, $ignore_flag, $at) { |
|
316 | 316 | if (null === $at) { |
317 | 317 | $node->delete($force && $node->isDeleted() || $force && $ignore_flag); |
318 | 318 | } else { |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | } |
189 | 189 | } |
190 | 190 | |
191 | - return $this->bulk($id, $p, function ($node) use ($parent, $conflict, $move) { |
|
191 | + return $this->bulk($id, $p, function($node) use ($parent, $conflict, $move) { |
|
192 | 192 | if (true === $move) { |
193 | 193 | $node = $node->setParent($parent, $conflict); |
194 | 194 | } |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | |
266 | 266 | $node = $this->_getNode($id, $p); |
267 | 267 | if ($node instanceof Collection) { |
268 | - return (new Response())->setBody(function () use ($node) { |
|
268 | + return (new Response())->setBody(function() use ($node) { |
|
269 | 269 | $node->getZip(); |
270 | 270 | }); |
271 | 271 | } |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | } |
285 | 285 | |
286 | 286 | return $response->setOutputFormat(null) |
287 | - ->setBody(function () use ($node, $encode, $offset, $length) { |
|
287 | + ->setBody(function() use ($node, $encode, $offset, $length) { |
|
288 | 288 | $mime = $node->getContentType(); |
289 | 289 | $stream = $node->get(); |
290 | 290 | $name = $node->getName(); |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | */ |
353 | 353 | public function postReadonly($id = null, $p = null, bool $readonly = true): Response |
354 | 354 | { |
355 | - return $this->bulk($id, $p, function ($node) use ($readonly) { |
|
355 | + return $this->bulk($id, $p, function($node) use ($readonly) { |
|
356 | 356 | $node->setReadonly($readonly); |
357 | 357 | |
358 | 358 | return ['status' => 204]; |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | */ |
598 | 598 | public function postMetaAttributes(?string $id = null, ?string $p = null): Response |
599 | 599 | { |
600 | - return $this->bulk($id, $p, function ($node) { |
|
600 | + return $this->bulk($id, $p, function($node) { |
|
601 | 601 | $node->setMetaAttributes($_POST); |
602 | 602 | |
603 | 603 | return ['status' => 204]; |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | throw new Exception\NotFound('destination collection was not found or is not a collection', Exception\NotFound::DESTINATION_NOT_FOUND); |
677 | 677 | } |
678 | 678 | |
679 | - return $this->bulk($id, $p, function ($node) use ($parent, $conflict) { |
|
679 | + return $this->bulk($id, $p, function($node) use ($parent, $conflict) { |
|
680 | 680 | $result = $node->copyTo($parent, $conflict); |
681 | 681 | |
682 | 682 | return [ |
@@ -734,7 +734,7 @@ discard block |
||
734 | 734 | throw new Exception\NotFound('destination collection was not found or is not a collection', Exception\NotFound::DESTINATION_NOT_FOUND); |
735 | 735 | } |
736 | 736 | |
737 | - return $this->bulk($id, $p, function ($node) use ($parent, $conflict) { |
|
737 | + return $this->bulk($id, $p, function($node) use ($parent, $conflict) { |
|
738 | 738 | $result = $node->setParent($parent, $conflict); |
739 | 739 | if (NodeInterface::CONFLICT_RENAME === $conflict) { |
740 | 740 | return [ |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | $at = $this->_verifyAttributes(['destroy' => $at])['destroy']; |
790 | 790 | } |
791 | 791 | |
792 | - return $this->bulk($id, $p, function ($node) use ($force, $ignore_flag, $at) { |
|
792 | + return $this->bulk($id, $p, function($node) use ($force, $ignore_flag, $at) { |
|
793 | 793 | if (null === $at) { |
794 | 794 | $node->delete($force && $node->isDeleted() || $force && $ignore_flag); |
795 | 795 | } else { |