Completed
Branch dev (bc6e47)
by Raffael
02:23
created
src/lib/Api/v1/File.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
      *
108 108
      * @param string $id
109 109
      * @param string $p
110
-     * @param string $version
110
+     * @param integer $version
111 111
      *
112 112
      * @return Response
113 113
      */
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Balloon
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      *
78 78
      * @return Response
79 79
      */
80
-    public function getHistory(?string $id = null, ?string $p = null): Response
80
+    public function getHistory(?string $id = null, ?string $p = null) : Response
81 81
     {
82 82
         $result = Helper::escape(
83 83
             $this->_getNode($id, $p)->getHistory()
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      *
112 112
      * @return Response
113 113
      */
114
-    public function postRestore(int $version, ?string $id = null, ?string $p = null): Response
114
+    public function postRestore(int $version, ?string $id = null, ?string $p = null) : Response
115 115
     {
116 116
         $result = $this->_getNode($id, $p)->restore($version);
117 117
 
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
             $wrote = fwrite($chunkgroup_handler, $data);
294 294
             $tmp_size += $wrote;
295 295
 
296
-            if ($tmp_size > (int) $this->server->getMaxFileSize()) {
296
+            if ($tmp_size > (int)$this->server->getMaxFileSize()) {
297 297
                 fclose($input_handler);
298 298
                 fclose($chunkgroup_handler);
299 299
                 unlink($file);
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
         ?string $name = null,
430 430
         array $attributes = [],
431 431
         int $conflict = 0
432
-    ): Response {
432
+    ) : Response {
433 433
         $attributes = $this->_verifyAttributes($attributes);
434 434
 
435 435
         ini_set('auto_detect_line_endings', '1');
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
         ?string $name = null,
460 460
         array $attributes = [],
461 461
         int $conflict = 0
462
-    ): Response {
462
+    ) : Response {
463 463
         if (null === $id && null === $p && null === $name) {
464 464
             throw new Exception\InvalidArgument('neither id, p nor name was set');
465 465
         }
Please login to merge, or discard this patch.
src/lib/Bootstrap/Cli.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,6 @@
 block discarded – undo
163 163
     /**
164 164
      * Start.
165 165
      *
166
-     * @param array $options
167 166
      *
168 167
      * @return bool
169 168
      */
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Balloon
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         parent::__construct($composer, $config);
45 45
         $this->setExceptionHandler();
46 46
 
47
-        $this->container->add(GetOpt::class, function () {
47
+        $this->container->add(GetOpt::class, function() {
48 48
             return new GetOpt([
49 49
                 ['v', 'verbose', GetOpt::NO_ARGUMENT, 'Verbose'],
50 50
             ]);
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      *
68 68
      * @return Cli
69 69
      */
70
-    protected function configureLogger(?int $level = null): self
70
+    protected function configureLogger(?int $level = null) : self
71 71
     {
72 72
         if (null === $level) {
73 73
             $level = 4;
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      *
97 97
      * @return string
98 98
      */
99
-    protected function getHelp(GetOpt $getopt, ?ConsoleInterface $module = null): string
99
+    protected function getHelp(GetOpt $getopt, ?ConsoleInterface $module = null) : string
100 100
     {
101 101
         $help = "Balloon\n";
102 102
         $help .= "balloon (GLOBAL OPTIONS) [MODULE] (MODULE OPTIONS)\n\n";
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      */
180 180
     protected function setExceptionHandler(): self
181 181
     {
182
-        set_exception_handler(function ($e) {
182
+        set_exception_handler(function($e) {
183 183
             echo $e;
184 184
             $logger = $this->container->get(LoggerInterface::class);
185 185
             $logger->emergency('uncaught exception: '.$e->getMessage(), [
Please login to merge, or discard this patch.
src/lib/Console/Async.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,6 @@
 block discarded – undo
51 51
     /**
52 52
      * Constructor.
53 53
      *
54
-     * @param App             $app
55 54
      * @param AsyncQueue      $async
56 55
      * @param LoggerInterface $logger
57 56
      * @param GetOpt          $getopt
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Balloon
Please login to merge, or discard this patch.
src/lib/Converter/Result.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
      * Create result.
33 33
      *
34 34
      * @param string     $path
35
-     * @param resource   $stream
36
-     * @param null|mixed $resource
35
+     * @param resource $resource
37 36
      */
38 37
     public function __construct(string $path, $resource = null)
39 38
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Balloon
Please login to merge, or discard this patch.
src/lib/Database.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,6 @@
 block discarded – undo
51 51
     /**
52 52
      * Construct.
53 53
      *
54
-     * @param Server          $server
55 54
      * @param LoggerInterface $logger
56 55
      */
57 56
     public function __construct(MongoDB $db, LoggerInterface $logger, string $meta_collection = 'delta')
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Balloon
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      *
246 246
      * @return AdapterAwareInterface
247 247
      */
248
-    public function injectAdapter($adapter, ?string $name = null): AdapterAwareInterface
248
+    public function injectAdapter($adapter, ?string $name = null) : AdapterAwareInterface
249 249
     {
250 250
         if (!($adapter instanceof DeltaInterface)) {
251 251
             throw new Exception('delta needs to implement DeltaInterface');
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/AbstractNode.php 2 patches
Doc Comments   -7 removed lines patch added patch discarded remove patch
@@ -409,7 +409,6 @@  discard block
 block discarded – undo
409 409
     /**
410 410
      * Get share node.
411 411
      *
412
-     * @param bool $reference
413 412
      *
414 413
      * @return Collection
415 414
      */
@@ -858,7 +857,6 @@  discard block
 block discarded – undo
858 857
     /**
859 858
      * Set app attributes.
860 859
      *
861
-     * @param AppInterface $app
862 860
      * @param array        $attributes
863 861
      *
864 862
      * @return NodeInterface
@@ -874,7 +872,6 @@  discard block
 block discarded – undo
874 872
     /**
875 873
      * Set app attribute.
876 874
      *
877
-     * @param AppInterface $app
878 875
      * @param string       $attribute
879 876
      * @param mixed        $value
880 877
      *
@@ -895,7 +892,6 @@  discard block
 block discarded – undo
895 892
     /**
896 893
      * Remove app attribute.
897 894
      *
898
-     * @param AppInterface $app
899 895
      *
900 896
      * @return NodeInterface
901 897
      */
@@ -912,7 +908,6 @@  discard block
 block discarded – undo
912 908
     /**
913 909
      * Remove app attribute.
914 910
      *
915
-     * @param AppInterface $app
916 911
      * @param string       $attribute
917 912
      *
918 913
      * @return NodeInterface
@@ -930,7 +925,6 @@  discard block
 block discarded – undo
930 925
     /**
931 926
      * Get app attribute.
932 927
      *
933
-     * @param AppInterface $app
934 928
      * @param string       $attribute
935 929
      *
936 930
      * @return mixed
@@ -947,7 +941,6 @@  discard block
 block discarded – undo
947 941
     /**
948 942
      * Get app attributes.
949 943
      *
950
-     * @param AppInterface $app
951 944
      *
952 945
      * @return array
953 946
      */
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Balloon
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
      *
550 550
      * @return bool
551 551
      */
552
-    public function undelete(int $conflict = NodeInterface::CONFLICT_NOACTION, ?string $recursion = null, bool $recursion_first = true): bool
552
+    public function undelete(int $conflict = NodeInterface::CONFLICT_NOACTION, ?string $recursion = null, bool $recursion_first = true) : bool
553 553
     {
554 554
         if (!$this->_acl->isAllowed($this, 'w')) {
555 555
             throw new ForbiddenException(
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
     public function getLastModified(): int
658 658
     {
659 659
         if ($this->changed instanceof UTCDateTime) {
660
-            return (int) $this->changed->toDateTime()->format('U');
660
+            return (int)$this->changed->toDateTime()->format('U');
661 661
         }
662 662
 
663 663
         return 0;
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
     public function getId(bool $string = false)
672 672
     {
673 673
         if (true === $string) {
674
-            return (string) $this->_id;
674
+            return (string)$this->_id;
675 675
         }
676 676
 
677 677
         return $this->_id;
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
      *
721 721
      * @return array
722 722
      */
723
-    public function getParents(?NodeInterface $node = null, array $parents = []): array
723
+    public function getParents(?NodeInterface $node = null, array $parents = []) : array
724 724
     {
725 725
         if (null === $node) {
726 726
             $node = $this;
@@ -762,7 +762,7 @@  discard block
 block discarded – undo
762 762
      *
763 763
      * @return bool
764 764
      */
765
-    public function zip(ZipStream $archive, bool $self = true, ?NodeInterface $parent = null, string $path = '', int $depth = 0): bool
765
+    public function zip(ZipStream $archive, bool $self = true, ?NodeInterface $parent = null, string $path = '', int $depth = 0) : bool
766 766
     {
767 767
         if (null === $parent) {
768 768
             $parent = $this;
@@ -1021,7 +1021,7 @@  discard block
 block discarded – undo
1021 1021
      *
1022 1022
      * @return bool
1023 1023
      */
1024
-    public function setDestroyable(?UTCDateTime $ts): bool
1024
+    public function setDestroyable(?UTCDateTime $ts) : bool
1025 1025
     {
1026 1026
         $this->destroy = $ts;
1027 1027
 
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
      *
1090 1090
      * @return bool
1091 1091
      */
1092
-    public function save($attributes = [], $remove = [], ?string $recursion = null, bool $recursion_first = true): bool
1092
+    public function save($attributes = [], $remove = [], ?string $recursion = null, bool $recursion_first = true) : bool
1093 1093
     {
1094 1094
         if (!$this->_acl->isAllowed($this, 'w') && !$this->isReference()) {
1095 1095
             throw new ForbiddenException(
@@ -1102,8 +1102,8 @@  discard block
 block discarded – undo
1102 1102
             return false;
1103 1103
         }
1104 1104
 
1105
-        $remove = (array) $remove;
1106
-        $attributes = (array) $attributes;
1105
+        $remove = (array)$remove;
1106
+        $attributes = (array)$attributes;
1107 1107
         $this->_hook->run(
1108 1108
             'preSaveNodeAttributes',
1109 1109
             [$this, &$attributes, &$remove, &$recursion, &$recursion_first]
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
      *
1162 1162
      * @return string
1163 1163
      */
1164
-    protected function getDuplicateName(?string $name = null): string
1164
+    protected function getDuplicateName(?string $name = null) : string
1165 1165
     {
1166 1166
         if (null === $name) {
1167 1167
             $name = $this->name;
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/Collection.php 2 patches
Doc Comments   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
     /**
311 311
      * Get real id (reference).
312 312
      *
313
-     * @return ObjectId
313
+     * @return ObjectId|null
314 314
      */
315 315
     public function getRealId(): ?ObjectId
316 316
     {
@@ -339,10 +339,9 @@  discard block
 block discarded – undo
339 339
     /**
340 340
      * Fetch children items of this collection.
341 341
      *
342
-     * @param string $node
343 342
      * @param int    $deleted
344 343
      * @param array  $filter
345
-     * @param mixed  $name
344
+     * @param string  $name
346 345
      *
347 346
      * @return NodeInterface
348 347
      */
@@ -922,7 +921,7 @@  discard block
 block discarded – undo
922 921
      * @param string $name
923 922
      * @param string $data
924 923
      *
925
-     * @return File
924
+     * @return string
926 925
      */
927 926
     public function createFile($name, $data = null): String
928 927
     {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Balloon
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      *
88 88
      * @return NodeInterface
89 89
      */
90
-    public function copyTo(self $parent, int $conflict = NodeInterface::CONFLICT_NOACTION, ?string $recursion = null, bool $recursion_first = true): NodeInterface
90
+    public function copyTo(self $parent, int $conflict = NodeInterface::CONFLICT_NOACTION, ?string $recursion = null, bool $recursion_first = true) : NodeInterface
91 91
     {
92 92
         if (null === $recursion) {
93 93
             $recursion_first = true;
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
      *
402 402
      * @return bool
403 403
      */
404
-    public function delete(bool $force = false, ?string $recursion = null, bool $recursion_first = true): bool
404
+    public function delete(bool $force = false, ?string $recursion = null, bool $recursion_first = true) : bool
405 405
     {
406 406
         if (!$this->_acl->isAllowed($this, 'w') && !$this->isReference()) {
407 407
             throw new ForbiddenException(
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
 
505 505
         $node = $this->_db->storage->findOne($find);
506 506
 
507
-        return (bool) $node;
507
+        return (bool)$node;
508 508
     }
509 509
 
510 510
     /**
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
      *
673 673
      * @return array
674 674
      */
675
-    public function getChildrenRecursive(?ObjectId $id = null, ?array &$shares = [], ?array &$files = []): array
675
+    public function getChildrenRecursive(?ObjectId $id = null, ? array &$shares = [], ? array &$files = []) : array
676 676
     {
677 677
         $list = [];
678 678
         $result = $this->_db->storage->find([
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
      *
973 973
      * @return bool
974 974
      */
975
-    protected function _forceDelete(?string $recursion = null, bool $recursion_first = true): bool
975
+    protected function _forceDelete(?string $recursion = null, bool $recursion_first = true) : bool
976 976
     {
977 977
         if (!$this->isReference()) {
978 978
             $this->doRecursiveAction('delete', [
Please login to merge, or discard this patch.
src/lib/Filesystem/Storage/Adapter/AdapterInterface.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,6 @@
 block discarded – undo
29 29
     /**
30 30
      * Delete file.
31 31
      *
32
-     * @param string $id
33 32
      * @param array  $attributes
34 33
      *
35 34
      * @return bool
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Balloon
Please login to merge, or discard this patch.
src/lib/Hook.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,6 @@  discard block
 block discarded – undo
58 58
     /**
59 59
      * Inject hook.
60 60
      *
61
-     * @param HookInterface $adapter
62 61
      *
63 62
      * @return AdapterAwareInterface
64 63
      */
@@ -198,7 +197,7 @@  discard block
 block discarded – undo
198 197
      *
199 198
      * @param string $name
200 199
      *
201
-     * @return mixed
200
+     * @return HookInterface
202 201
      */
203 202
     public function getAdapter(string $name)
204 203
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Balloon
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      *
189 189
      * @return AdapterAwareInterface
190 190
      */
191
-    public function injectAdapter($adapter, ?string $name = null): AdapterAwareInterface
191
+    public function injectAdapter($adapter, ?string $name = null) : AdapterAwareInterface
192 192
     {
193 193
         return $this->injectHook($adapter);
194 194
     }
Please login to merge, or discard this patch.