Completed
Pull Request — master (#171)
by Raffael
06:24
created
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 3 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.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -365,7 +365,7 @@
 block discarded – undo
365 365
         if (!$this->_acl->isAllowed($this, 'm')) {
366 366
             throw new ForbiddenException(
367 367
                 'not allowed to update acl',
368
-                 ForbiddenException::NOT_ALLOWED_TO_MANAGE
368
+                    ForbiddenException::NOT_ALLOWED_TO_MANAGE
369 369
             );
370 370
         }
371 371
 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -247,6 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
     /**
249 249
      * temporary session.
250
+     * @param resource|null $stream
250 251
      */
251 252
     public function temporarySession($stream, ObjectId $session = null): ObjectId
252 253
     {
@@ -1093,6 +1094,7 @@  discard block
 block discarded – undo
1093 1094
 
1094 1095
     /**
1095 1096
      * Duplicate name with a uniqid within name.
1097
+     * @param string $name
1096 1098
      */
1097 1099
     protected function getDuplicateName(?string $name = null, ?string $class = null): string
1098 1100
     {
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/File.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -45,14 +45,14 @@
 block discarded – undo
45 45
      * @param array
46 46
      **/
47 47
     protected $temp_files = [
48
-        '/^\._(.*)$/',     // OS/X resource forks
49
-        '/^.DS_Store$/',   // OS/X custom folder settings
48
+        '/^\._(.*)$/', // OS/X resource forks
49
+        '/^.DS_Store$/', // OS/X custom folder settings
50 50
         '/^desktop.ini$/', // Windows custom folder settings
51
-        '/^Thumbs.db$/',   // Windows thumbnail cache
52
-        '/^.(.*).swpx$/',  // ViM temporary files
53
-        '/^.(.*).swx$/',   // ViM temporary files
54
-        '/^.(.*).swp$/',   // ViM temporary files
55
-        '/^\.dat(.*)$/',   // Smultron seems to create these
51
+        '/^Thumbs.db$/', // Windows thumbnail cache
52
+        '/^.(.*).swpx$/', // ViM temporary files
53
+        '/^.(.*).swx$/', // ViM temporary files
54
+        '/^.(.*).swp$/', // ViM temporary files
55
+        '/^\.dat(.*)$/', // Smultron seems to create these
56 56
         '/^~lock.(.*)#$/', // Windows 7 lockfiles
57 57
     ];
58 58
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -502,7 +502,7 @@
 block discarded – undo
502 502
         $this->increaseVersion();
503 503
 
504 504
         $this->addVersion($attributes)
505
-             ->postPutFile();
505
+                ->postPutFile();
506 506
 
507 507
         return $this->version;
508 508
     }
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/Collection.php 4 patches
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, -1 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
     /**
258 258
      * Get real id (reference).
259 259
      *
260
-     * @return ObjectId
260
+     * @return ObjectId|null
261 261
      */
262 262
     public function getRealId(): ?ObjectId
263 263
     {
@@ -639,6 +639,7 @@  discard block
 block discarded – undo
639 639
 
640 640
     /**
641 641
      * Create new file as a child from this collection.
642
+     * @param string $name
642 643
      */
643 644
     public function addFile($name, ?ObjectId $session = null, array $attributes = [], int $conflict = NodeInterface::CONFLICT_NOACTION, bool $clone = false): File
644 645
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
 use Balloon\Filesystem\Exception;
18 18
 use Balloon\Filesystem\Storage;
19 19
 use Balloon\Hook;
20
-use Balloon\Server\User;
21 20
 use Generator;
22 21
 use MongoDB\BSON\ObjectId;
23 22
 use MongoDB\BSON\Regex;
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -770,8 +770,8 @@
 block discarded – undo
770 770
     {
771 771
         if (!$this->_acl->isAllowed($this, 'm')) {
772 772
             throw new ForbiddenException(
773
-                 'not allowed to set acl',
774
-                  ForbiddenException::NOT_ALLOWED_TO_MANAGE
773
+                    'not allowed to set acl',
774
+                    ForbiddenException::NOT_ALLOWED_TO_MANAGE
775 775
             );
776 776
         }
777 777
 
Please login to merge, or discard this patch.
src/lib/Bootstrap/Cli.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/lib/Bootstrap/Http.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/lib/Bootstrap/AbstractBootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.