Test Setup Failed
Branch master (b29bf8)
by Raffael
03:59
created
src/app/Balloon.App.Preview/Hook.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 
13 13
 namespace Balloon\App\Preview;
14 14
 
15
-use Balloon\Exception;
16 15
 use Balloon\Filesystem\Node\File;
17 16
 use Balloon\Hook\AbstractHook;
18 17
 use MongoDB\GridFS\Exception\FileNotFoundException;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/File.php 4 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
      * @param string $path
695 695
      * @param bool   $new
696 696
      *
697
-     * @return bool
697
+     * @return string
698 698
      */
699 699
     protected function verifyFile(?string $path, bool $new = false): string
700 700
     {
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
     /**
828 828
      * Finalize put request.
829 829
      *
830
-     * @param resource|string $file
830
+     * @param string|null $file
831 831
      * @param bool            $new
832 832
      * @param array           $attributes
833 833
      *
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -589,7 +589,7 @@
 block discarded – undo
589 589
         ]);
590 590
 
591 591
         $this->addVersion($attributes)
592
-             ->postPutFile($file, $new, $attributes);
592
+                ->postPutFile($file, $new, $attributes);
593 593
 
594 594
         return $this->version;
595 595
     }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,6 @@
 block discarded – undo
18 18
 use Balloon\Filesystem\Storage;
19 19
 use Balloon\Hook;
20 20
 use Balloon\Mime;
21
-use Balloon\Server\User;
22 21
 use MongoDB\BSON\UTCDateTime;
23 22
 use Psr\Log\LoggerInterface;
24 23
 use Sabre\DAV\IFile;
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 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
@@ -45,14 +45,14 @@  discard block
 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.
src/lib/Filesystem/Node/NodeInterface.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,14 +108,13 @@
 block discarded – undo
108 108
      *
109 109
      * @param bool $reference
110 110
      *
111
-     * @return ObjectId
111
+     * @return ObjectId|null
112 112
      */
113 113
     public function getShareId(bool $reference = false): ?ObjectId;
114 114
 
115 115
     /**
116 116
      * Get share node.
117 117
      *
118
-     * @param bool $reference
119 118
      *
120 119
      * @return Collection
121 120
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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
Please login to merge, or discard this patch.
src/app/Balloon.App.Elasticsearch/Job.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
     /**
76 76
      * Constructor.
77 77
      *
78
-     * @param Elasticsarch           $es
78
+     * @param Elasticsearch           $es
79 79
      * @param Storage                $storage
80 80
      * @param Server                 $server
81 81
      * @param NodeAttributeDecorator $decorator
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
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
         $content = base64_encode(stream_get_contents($node->get()));
354 354
 
355 355
         $metadata = $meta['metadata'];
356
-        array_walk_recursive($metadata, function (&$value) { $value = (string) $value; });
356
+        array_walk_recursive($metadata, function(&$value) { $value = (string) $value; });
357 357
 
358 358
         $params = [
359 359
             'index' => $this->es->getIndex(),
Please login to merge, or discard this patch.
src/lib/Console.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     /**
174 174
      * Configure cli logger.
175 175
      *
176
-     * @return Cli
176
+     * @return Console
177 177
      */
178 178
     protected function configureLogger(?int $level = null): self
179 179
     {
@@ -264,7 +264,6 @@  discard block
 block discarded – undo
264 264
     /**
265 265
      * Start.
266 266
      *
267
-     * @param array $options
268 267
      *
269 268
      * @return bool
270 269
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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
Please login to merge, or discard this patch.
src/lib/Console/Jobs.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,6 @@
 block discarded – undo
50 50
     /**
51 51
      * Constructor.
52 52
      *
53
-     * @param App             $app
54 53
      * @param Async           $async
55 54
      * @param LoggerInterface $logger
56 55
      * @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,6 +1,6 @@
 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
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/AttributeDecorator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      *
61 61
      * @param Server    $server
62 62
      * @param Acl       $acl
63
-     * @param Decorator $role_decorator
63
+     * @param RoleAttributeDecorator $role_decorator
64 64
      */
65 65
     public function __construct(Server $server, Acl $acl, RoleAttributeDecorator $role_decorator)
66 66
     {
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 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
@@ -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.
src/app/Balloon.App.Notification/UserMessage.php 1 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
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $role_decorator = $this->role_decorator;
79 79
 
80
-        $string = preg_replace_callback('/(\{user\.(([a-z]\.*)+)\})/', function ($match) use ($user, $role_decorator) {
80
+        $string = preg_replace_callback('/(\{user\.(([a-z]\.*)+)\})/', function($match) use ($user, $role_decorator) {
81 81
             return $role_decorator->decorate($user, [$match[2]])[$match[2]];
82 82
         }, $this->{$type});
83 83
 
Please login to merge, or discard this patch.
src/lib/Server/User.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -734,8 +734,8 @@
 block discarded – undo
734 734
 
735 735
         $ops[] = [
736 736
             '$sort' => [
737
-               'sum' => -1,
738
-               '_id' => 1,
737
+                'sum' => -1,
738
+                '_id' => 1,
739 739
             ],
740 740
         ];
741 741
 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -722,6 +722,8 @@
 block discarded – undo
722 722
     /**
723 723
      * Get resolved groups.
724 724
      *
725
+     * @param integer $offset
726
+     * @param integer $limit
725 727
      * @return Generator
726 728
      */
727 729
     public function getResolvedGroups(?int $offset = null, ?int $limit = null): ?Generator
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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
Please login to merge, or discard this patch.