Completed
Pull Request — master (#346)
by Raffael
08:56
created
src/lib/Filesystem.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -362,6 +362,7 @@  discard block
 block discarded – undo
362 362
 
363 363
     /**
364 364
      * Find nodes with custom filters.
365
+     * @param integer $offset
365 366
      */
366 367
     public function findNodesByFilter(array $filter, ?int $offset = null, ?int $limit = null): Generator
367 368
     {
@@ -551,6 +552,8 @@  discard block
 block discarded – undo
551 552
 
552 553
     /**
553 554
      * Get custom filtered children.
555
+     * @param integer $offset
556
+     * @param integer $limit
554 557
      */
555 558
     public function findNodesByFilterUser(int $deleted, array $filter, ?int $offset = null, ?int $limit = null): Generator
556 559
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
     /**
419 419
      * Find nodes with custom filter recursive.
420 420
      */
421
-    public function findNodesByFilterRecursiveChildren(array $parent_filter=[], int $deleted, ?int $offset = null, ?int $limit = null): Generator
421
+    public function findNodesByFilterRecursiveChildren(array $parent_filter = [], int $deleted, ?int $offset = null, ?int $limit = null): Generator
422 422
     {
423 423
         $deleted_filter = [];
424 424
         if (NodeInterface::DELETED_EXCLUDE === $deleted) {
@@ -432,12 +432,12 @@  discard block
 block discarded – undo
432 432
                 [
433 433
                     'acl' => ['$exists' => false],
434 434
                 ], [
435
-                    'acl.id' => (string)$this->user->getId(),
435
+                    'acl.id' => (string) $this->user->getId(),
436 436
                 ]
437 437
             ]
438 438
         ];
439 439
 
440
-        if(count($deleted_filter) > 0) {
440
+        if (count($deleted_filter) > 0) {
441 441
             $query = ['$and' => [$deleted_filter, $query]];
442 442
         }
443 443
 
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
         array_pop($query);
477 477
 
478 478
         $offset !== null ? $query[] = ['$skip' => $offset] : false;
479
-        $limit !== null ? $query[] = ['$limit' => $limit]: false;
479
+        $limit !== null ? $query[] = ['$limit' => $limit] : false;
480 480
         $result = $this->db->storage->aggregate($query);
481 481
 
482 482
         foreach ($result as $node) {
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/Collection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
      */
277 277
     public function getSize(): int
278 278
     {
279
-        if($this->isFiltered()) {
279
+        if ($this->isFiltered()) {
280 280
             return count($this->getChildren());
281 281
         }
282 282
 
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
         $this->storage = $this->_parent->getStorage()->deleteCollection($this);
370 370
 
371 371
         if (!$this->isReference() && !$this->isMounted() && !$this->isFiltered()) {
372
-            $this->doRecursiveAction(function ($node) use ($recursion) {
372
+            $this->doRecursiveAction(function($node) use ($recursion) {
373 373
                 $node->delete(false, $recursion, false);
374 374
             }, NodeInterface::DELETED_EXCLUDE);
375 375
         }
@@ -864,8 +864,8 @@  discard block
 block discarded – undo
864 864
                             [
865 865
                                 'acl' => ['$exists' => false],
866 866
                             ], [
867
-                                'acl.id' => (string)$this->_user->getId(),
868
-                                'acl.privilege' => ['$in' => ['m','rw','r','w','w+']]
867
+                                'acl.id' => (string) $this->_user->getId(),
868
+                                'acl.privilege' => ['$in' => ['m', 'rw', 'r', 'w', 'w+']]
869 869
                             ]
870 870
                         ]
871 871
                     ]
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
     protected function _forceDelete(?string $recursion = null, bool $recursion_first = true): bool
914 914
     {
915 915
         if (!$this->isReference() && !$this->isMounted() && !$this->isFiltered()) {
916
-            $this->doRecursiveAction(function ($node) use ($recursion) {
916
+            $this->doRecursiveAction(function($node) use ($recursion) {
917 917
                 $node->delete(true, $recursion, false);
918 918
             }, NodeInterface::DELETED_INCLUDE);
919 919
         }
Please login to merge, or discard this patch.