Completed
Pull Request — master (#141)
by Raffael
15:37 queued 10:36
created
src/lib/Filesystem/Node/Collection.php 2 patches
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.
src/lib/Filesystem/Storage.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -147,6 +147,7 @@
 block discarded – undo
147 147
 
148 148
     /**
149 149
      * Store file.
150
+     * @param string $adapter
150 151
      */
151 152
     public function storeFile(File $file, ObjectId $session, ?string &$adapter = null)
152 153
     {
Please login to merge, or discard this patch.
src/lib/Filesystem/Node/File.php 1 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/Storage/Adapter/Gridfs.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -367,7 +367,7 @@
 block discarded – undo
367 367
 
368 368
             throw new Exception\InsufficientStorage(
369 369
                 'user quota is full',
370
-                 Exception\InsufficientStorage::USER_QUOTA_FULL
370
+                    Exception\InsufficientStorage::USER_QUOTA_FULL
371 371
             );
372 372
         }
373 373
 
Please login to merge, or discard this patch.
src/lib/Server/AttributeDecorator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,13 +92,13 @@  discard block
 block discarded – undo
92 92
         }
93 93
 
94 94
         return [
95
-            'created' => function ($role) use ($attributes) {
95
+            'created' => function($role) use ($attributes) {
96 96
                 return $attributes['created']->toDateTime()->format('c');
97 97
             },
98
-            'changed' => function ($role) use ($attributes) {
98
+            'changed' => function($role) use ($attributes) {
99 99
                 return $attributes['changed']->toDateTime()->format('c');
100 100
             },
101
-            'deleted' => function ($role) use ($attributes) {
101
+            'deleted' => function($role) use ($attributes) {
102 102
                 if (false === $attributes['deleted']) {
103 103
                     return null;
104 104
                 }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             'name' => (string) $attributes['username'],
146 146
             'admin' => (bool) $attributes['admin'],
147 147
             'namespace' => isset($attributes['namespace']) ? (string) $attributes['namespace'] : null,
148
-            'mail' => function ($role) use ($attributes, $user) {
148
+            'mail' => function($role) use ($attributes, $user) {
149 149
                 if (!isset($attributes['mail'])) {
150 150
                     return null;
151 151
                 }
Please login to merge, or discard this patch.
src/app/Balloon.App.Office/Api/v2/Documents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
         $tpl = new Template($type);
162 162
 
163 163
         $attributes = compact('readonly', 'meta');
164
-        $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); });
164
+        $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); });
165 165
 
166 166
         $session = $parent->temporarySession($tpl->get());
167 167
         $result = $parent->addFile($name, $session, $attributes);
Please login to merge, or discard this patch.
src/app/Balloon.App.Api/v2/Files.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 
281 281
         if ($index === $chunks) {
282 282
             $attributes = compact('changed', 'created', 'readonly', 'meta');
283
-            $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); });
283
+            $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); });
284 284
             $attributes = $this->_verifyAttributes($attributes);
285 285
 
286 286
             return $this->_put($session, $id, $p, $collection, $name, $attributes, $conflict);
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
         $session = $this->storage->storeTemporaryFile($input, $this->server->getIdentity());
394 394
 
395 395
         $attributes = compact('changed', 'created', 'readonly', 'meta');
396
-        $attributes = array_filter($attributes, function ($attribute) {return !is_null($attribute); });
396
+        $attributes = array_filter($attributes, function($attribute) {return !is_null($attribute); });
397 397
         $attributes = $this->_verifyAttributes($attributes);
398 398
 
399 399
         return $this->_put($session, $id, $p, $collection, $name, $attributes, $conflict);
Please login to merge, or discard this patch.