Completed
Push — master ( 309a3e...0a98b4 )
by Raffael
04:53
created
src/lib/Filesystem/Node/Collection.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
 use Balloon\Filesystem\Acl\Exception\Forbidden as ForbiddenException;
17 17
 use Balloon\Filesystem\Exception;
18 18
 use Balloon\Hook;
19
-use Balloon\Server\User;
20 19
 use Generator;
21 20
 use MongoDB\BSON\ObjectId;
22 21
 use MongoDB\BSON\Regex;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         $this->deleted = new UTCDateTime();
387 387
 
388 388
         if (!$this->isReference()) {
389
-            $this->doRecursiveAction(function ($node) use ($recursion) {
389
+            $this->doRecursiveAction(function($node) use ($recursion) {
390 390
                 $node->delete(false, $recursion, false);
391 391
             }, NodeInterface::DELETED_EXCLUDE);
392 392
         }
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
     protected function _forceDelete(?string $recursion = null, bool $recursion_first = true): bool
937 937
     {
938 938
         if (!$this->isReference()) {
939
-            $this->doRecursiveAction(function ($node) use ($recursion) {
939
+            $this->doRecursiveAction(function($node) use ($recursion) {
940 940
                 $node->delete(true, $recursion, false);
941 941
             }, NodeInterface::DELETED_INCLUDE);
942 942
         }
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     /**
256 256
      * Get real id (reference).
257 257
      *
258
-     * @return ObjectId
258
+     * @return ObjectId|null
259 259
      */
260 260
     public function getRealId(): ?ObjectId
261 261
     {
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
      * @param string $name
753 753
      * @param string $data
754 754
      *
755
-     * @return File
755
+     * @return string
756 756
      */
757 757
     public function createFile($name, $data = null): String
758 758
     {
Please login to merge, or discard this patch.
src/lib/Server/Group.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -265,6 +265,8 @@
 block discarded – undo
265 265
     /**
266 266
      * Get resolved member.
267 267
      *
268
+     * @param integer $offset
269
+     * @param integer $limit
268 270
      * @return Generator
269 271
      */
270 272
     public function getResolvedMembers(?int $offset = null, ?int $limit = null): ?Generator
Please login to merge, or discard this patch.
src/lib/Server.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 
532 532
         $this->identity = $user;
533 533
         $user->updateIdentity($identity)
534
-             ->updateShares();
534
+                ->updateShares();
535 535
         $this->hook->run('postServerIdentity', [$user]);
536 536
 
537 537
         return true;
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
     public function getGroupByName(string $name): Group
663 663
     {
664 664
         $group = $this->db->group->findOne([
665
-           'name' => $name,
665
+            'name' => $name,
666 666
         ]);
667 667
 
668 668
         if (null === $group) {
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
     public function getGroupById(ObjectId $id): Group
683 683
     {
684 684
         $group = $this->db->group->findOne([
685
-           '_id' => $id,
685
+            '_id' => $id,
686 686
         ]);
687 687
 
688 688
         if (null === $group) {
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -195,6 +195,7 @@
 block discarded – undo
195 195
 
196 196
     /**
197 197
      * Filesystem factory.
198
+     * @param User $user
198 199
      */
199 200
     public function getFilesystem(?User $user = null): Filesystem
200 201
     {
Please login to merge, or discard this patch.
src/app/Balloon.App.Sharelink/Migration/Delta/SharelinkIntoApp.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@
 block discarded – undo
49 49
             $this->db->storage->updateOne(
50 50
                 ['_id' => $object['_id']],
51 51
                 [
52
-                  '$unset' => ['sharelink' => 1],
53
-                  '$set' => ['app.Balloon\App\Sharelink' => $object['sharelink']],
52
+                    '$unset' => ['sharelink' => 1],
53
+                    '$set' => ['app.Balloon\App\Sharelink' => $object['sharelink']],
54 54
                 ]
55 55
             );
56 56
         }
Please login to merge, or discard this patch.
src/app/Balloon.App.Elasticsearch/Job.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -341,7 +341,7 @@
 block discarded – undo
341 341
         }
342 342
 
343 343
         $this->logger->debug('elasticsarch blob document ['.$result['_id'].'] has no references left, remove completely', [
344
-         'category' => get_class($this),
344
+            'category' => get_class($this),
345 345
         ]);
346 346
 
347 347
         return $this->deleteBlob($result['_id']);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
     protected function addShare(Collection $collection): bool
272 272
     {
273 273
         $that = $this;
274
-        $collection->doRecursiveAction(function ($node) use ($that) {
274
+        $collection->doRecursiveAction(function($node) use ($that) {
275 275
             if ($node instanceof Collection) {
276 276
                 $that->addShare($node);
277 277
             } else {
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
     protected function deleteShare(Collection $collection): bool
293 293
     {
294 294
         $that = $this;
295
-        $collection->doRecursiveAction(function ($node) use ($that) {
295
+        $collection->doRecursiveAction(function($node) use ($that) {
296 296
             if ($node instanceof Collection) {
297 297
                 $that->deleteShare($node);
298 298
             } else {
Please login to merge, or discard this patch.
src/app/Balloon.App.Cli/Console/Group.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
 
76 76
         $this->logger->info('new group ['.$result.'] created', [
77 77
             'category' => get_class($this),
78
-       ]);
78
+        ]);
79 79
 
80 80
         return true;
81 81
     }
Please login to merge, or discard this patch.
src/lib/Migration/Delta/AddHashToHistory.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/AbstractNode.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -629,7 +629,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -1044,6 +1044,7 @@
 block discarded – undo
1044 1044
 
1045 1045
     /**
1046 1046
      * Duplicate name with a uniqid within name.
1047
+     * @param string $name
1047 1048
      */
1048 1049
     protected function getDuplicateName(?string $name = null, ?string $class = null): string
1049 1050
     {
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/AttributeDecorator.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -131,20 +131,20 @@  discard block
 block discarded – undo
131 131
             'mime' => (string) $attributes['mime'],
132 132
             'readonly' => (bool) $attributes['readonly'],
133 133
             'directory' => $node instanceof Collection,
134
-            'meta' => function ($node) {
134
+            'meta' => function($node) {
135 135
                 return (object) $node->getMetaAttributes();
136 136
             },
137
-            'size' => function ($node) {
137
+            'size' => function($node) {
138 138
                 return $node->getSize();
139 139
             },
140
-            'path' => function ($node) {
140
+            'path' => function($node) {
141 141
                 try {
142 142
                     return $node->getPath();
143 143
                 } catch (\Exception $e) {
144 144
                     return null;
145 145
                 }
146 146
             },
147
-            'parent' => function ($node) {
147
+            'parent' => function($node) {
148 148
                 $parent = $node->getParent();
149 149
 
150 150
                 if (null === $parent || $parent->isRoot()) {
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
 
154 154
                 return $this->decorate($node->getParent(), ['id', 'name', '_links']);
155 155
             },
156
-            'access' => function ($node) use ($acl) {
156
+            'access' => function($node) use ($acl) {
157 157
                 return $acl->getAclPrivilege($node);
158 158
             },
159
-            'share' => function ($node) {
159
+            'share' => function($node) {
160 160
                 if ($node->isShared() || !$node->isSpecial()) {
161 161
                     return null;
162 162
                 }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                     return null;
168 168
                 }
169 169
             },
170
-            'sharename' => function ($node) {
170
+            'sharename' => function($node) {
171 171
                 if (!$node->isShared()) {
172 172
                     return null;
173 173
                 }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                     return null;
179 179
                 }
180 180
             },
181
-            'shareowner' => function ($node) use ($server, $fs, $decorator) {
181
+            'shareowner' => function($node) use ($server, $fs, $decorator) {
182 182
                 if (!$node->isSpecial()) {
183 183
                     return null;
184 184
                 }
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                     return null;
193 193
                 }
194 194
             },
195
-            'owner' => function ($node) use ($server, $decorator) {
195
+            'owner' => function($node) use ($server, $decorator) {
196 196
                 try {
197 197
                     return $decorator->decorate(
198 198
                         $server->getUserById($node->getOwner()),
@@ -216,20 +216,20 @@  discard block
 block discarded – undo
216 216
     protected function getTimeAttributes(NodeInterface $node, array $attributes): array
217 217
     {
218 218
         return [
219
-            'created' => function ($node) use ($attributes) {
219
+            'created' => function($node) use ($attributes) {
220 220
                 return $attributes['created']->toDateTime()->format('c');
221 221
             },
222
-            'changed' => function ($node) use ($attributes) {
222
+            'changed' => function($node) use ($attributes) {
223 223
                 return $attributes['changed']->toDateTime()->format('c');
224 224
             },
225
-            'deleted' => function ($node) use ($attributes) {
225
+            'deleted' => function($node) use ($attributes) {
226 226
                 if (false === $attributes['deleted']) {
227 227
                     return null;
228 228
                 }
229 229
 
230 230
                 return $attributes['deleted']->toDateTime()->format('c');
231 231
             },
232
-            'destroy' => function ($node) use ($attributes) {
232
+            'destroy' => function($node) use ($attributes) {
233 233
                 if (null === $attributes['destroy']) {
234 234
                     return null;
235 235
                 }
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         return [
263 263
             'shared' => $node->isShared(),
264 264
             'reference' => $node->isReference(),
265
-            'filter' => function ($node) use ($attributes) {
265
+            'filter' => function($node) use ($attributes) {
266 266
                 if (null === $attributes['filter']) {
267 267
                     return null;
268 268
                 }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
     /**
59 59
      * Init.
60 60
      *
61
-     * @param Decorator $role_decorator
61
+     * @param RoleAttributeDecorator $role_decorator
62 62
      */
63 63
     public function __construct(Server $server, Acl $acl, RoleAttributeDecorator $role_decorator)
64 64
     {
Please login to merge, or discard this patch.