Completed
Branch master (1995c1)
by Raffael
08:57
created
src/lib/Balloon/Filesystem/Node/INode.php 1 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/Balloon/Filesystem/Node/Node.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Balloon
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      * @param  Filesystem $fs
222 222
      * @return void
223 223
      */
224
-    public function __construct(?BSONDocument $node, Filesystem $fs)
224
+    public function __construct(? BSONDocument $node, Filesystem $fs)
225 225
     {
226 226
         $this->_fs         = $fs;
227 227
         $this->_db         = $fs->getDatabase();
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
      *
270 270
      * @return mixed
271 271
      */
272
-    public function __call(string $attribute, array $params=[])
272
+    public function __call(string $attribute, array $params = [])
273 273
     {
274 274
         $prefix = 'get';
275 275
         $attr = strtolower(substr($attribute, 3));
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
      * @param  int $conflict
315 315
      * @return INode
316 316
      */
317
-    public function setParent(Collection $parent, int $conflict=INode::CONFLICT_NOACTION): INode
317
+    public function setParent(Collection $parent, int $conflict = INode::CONFLICT_NOACTION): INode
318 318
     {
319 319
         if ($this->parent === $parent->getId()) {
320 320
             throw new Exception\Conflict('source node '.$this->name.' is already in the requested parent folder',
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
      * @param   bool $recursion_first
390 390
      * @return  INode
391 391
      */
392
-    abstract public function copyTo(Collection $parent, int $conflict=INode::CONFLICT_NOACTION, ?string $recursion=null, bool $recursion_first=true): INode;
392
+    abstract public function copyTo(Collection $parent, int $conflict = INode::CONFLICT_NOACTION, ? string $recursion = null, bool $recursion_first = true) : INode;
393 393
 
394 394
 
395 395
     /**
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
      * @param   bool $reference
399 399
      * @return  ObjectId
400 400
      */
401
-    public function getShareId(bool $reference=false): ?ObjectId
401
+    public function getShareId(bool $reference = false): ? ObjectId
402 402
     {
403 403
         if ($this->isReference() && $reference === true) {
404 404
             return $this->_id;
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
      * @param   bool $reference
447 447
      * @return  Collection
448 448
      */
449
-    public function getShareNode(): ?Collection
449
+    public function getShareNode(): ? Collection
450 450
     {
451 451
         if ($this->isSpecial()) {
452 452
             return $this->_fs->findNodeWithId($this->getShareId(true));
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
      * @param   string $privilege
595 595
      * @return  bool
596 596
      */
597
-    public function isAllowed(string $privilege='r'): bool
597
+    public function isAllowed(string $privilege = 'r'): bool
598 598
     {
599 599
         $acl   = null;
600 600
         $share = null;
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
             $clean[] = 'meta';
789 789
         }
790 790
         
791
-        $attribute  = $clean;
791
+        $attribute = $clean;
792 792
 
793 793
         try {
794 794
             $sharenode  = $this->getShareNode();
@@ -918,7 +918,7 @@  discard block
 block discarded – undo
918 918
      * @param   string $name
919 919
      * @return  string
920 920
      */
921
-    protected function _getDuplicateName(?string $name=null): string
921
+    protected function _getDuplicateName(? string $name = null) : string
922 922
     {
923 923
         if ($name === null) {
924 924
             $name = $this->name;
@@ -927,7 +927,7 @@  discard block
 block discarded – undo
927 927
         if ($this instanceof Collection) {
928 928
             return $name.' ('.substr(uniqid('', true), -4).')';
929 929
         } else {
930
-            $ext  = substr(strrchr($name, '.'), 1);
930
+            $ext = substr(strrchr($name, '.'), 1);
931 931
 
932 932
             if ($ext === false) {
933 933
                 return $name.' ('.substr(uniqid('', true), -4).')';
@@ -947,7 +947,7 @@  discard block
 block discarded – undo
947 947
      * @param   bool $recursion_first
948 948
      * @return  bool
949 949
      */
950
-    public function undelete(int $conflict=INode::CONFLICT_NOACTION, ?string $recursion=null, bool $recursion_first=true): bool
950
+    public function undelete(int $conflict = INode::CONFLICT_NOACTION, ? string $recursion = null, bool $recursion_first = true) : bool
951 951
     {
952 952
         if (!$this->isAllowed('w')) {
953 953
             throw new Exception\Forbidden('not allowed to restore node '.$this->name,
@@ -987,7 +987,7 @@  discard block
 block discarded – undo
987 987
             $recursion_first = false;
988 988
         }
989 989
 
990
-        $this->deleted  = false;
990
+        $this->deleted = false;
991 991
         
992 992
         if ($this instanceof File) {
993 993
             $current = $this->version;
@@ -1141,7 +1141,7 @@  discard block
 block discarded – undo
1141 1141
      *
1142 1142
      * @return ObjectId|string
1143 1143
      */
1144
-    public function getId(bool $string=false)
1144
+    public function getId(bool $string = false)
1145 1145
     {
1146 1146
         if ($string === true) {
1147 1147
             return (string)$this->_id;
@@ -1156,7 +1156,7 @@  discard block
 block discarded – undo
1156 1156
      *
1157 1157
      * @return Collection
1158 1158
      */
1159
-    public function getParent(): ?Collection
1159
+    public function getParent(): ? Collection
1160 1160
     {
1161 1161
         try {
1162 1162
             if ($this->isRoot()) {
@@ -1191,7 +1191,7 @@  discard block
 block discarded – undo
1191 1191
      * @param   array $parents
1192 1192
      * @return  array
1193 1193
      */
1194
-    public function getParents(?INode $node=null, array $parents=[]): array
1194
+    public function getParents(? INode $node = null, array $parents = []) : array
1195 1195
     {
1196 1196
         if ($node === null) {
1197 1197
             $node = $this;
@@ -1258,7 +1258,7 @@  discard block
 block discarded – undo
1258 1258
      * @param   int $depth
1259 1259
      * @return  bool
1260 1260
      */
1261
-    public function zip(ZipStream $archive, bool $self=true, ?INode $parent=null, string $path='', int $depth=0): bool
1261
+    public function zip(ZipStream $archive, bool $self = true, ? INode $parent = null, string $path = '', int $depth = 0) : bool
1262 1262
     {
1263 1263
         if ($parent === null) {
1264 1264
             $parent = $this;
@@ -1320,7 +1320,7 @@  discard block
 block discarded – undo
1320 1320
      * @param   mixed $value
1321 1321
      * @return  INode
1322 1322
      */
1323
-    public function setMetaAttribute($attributes, $value=null): INode
1323
+    public function setMetaAttribute($attributes, $value = null): INode
1324 1324
     {
1325 1325
         $this->meta = self::validateMetaAttribute($attributes, $value, $this->meta);
1326 1326
         $this->save('meta');
@@ -1336,7 +1336,7 @@  discard block
 block discarded – undo
1336 1336
      * @param   array $set
1337 1337
      * @return  array
1338 1338
      */
1339
-    public static function validateMetaAttribute($attributes, $value=null, array $set=[]): array
1339
+    public static function validateMetaAttribute($attributes, $value = null, array $set = []): array
1340 1340
     {
1341 1341
         if (is_string($attributes)) {
1342 1342
             $attributes = [
@@ -1367,7 +1367,7 @@  discard block
 block discarded – undo
1367 1367
      * @param  string|array $attribute Specify attributes to return
1368 1368
      * @return string|array
1369 1369
      */
1370
-    public function getMetaAttribute($attribute=[])
1370
+    public function getMetaAttribute($attribute = [])
1371 1371
     {
1372 1372
         if (is_string($attribute)) {
1373 1373
             if (isset($this->meta[$attribute])) {
@@ -1387,7 +1387,7 @@  discard block
 block discarded – undo
1387 1387
      * @param   bool $readonly
1388 1388
      * @return  bool
1389 1389
      */
1390
-    public function setReadonly(bool $readonly=true): bool
1390
+    public function setReadonly(bool $readonly = true): bool
1391 1391
     {
1392 1392
         $this->readonly = $readonly;
1393 1393
         return $this->save('readonly');
@@ -1400,7 +1400,7 @@  discard block
 block discarded – undo
1400 1400
      * @param   UTCDateTime $ts
1401 1401
      * @return  bool
1402 1402
      */
1403
-    public function setDestroyable(?UTCDateTime $ts): bool
1403
+    public function setDestroyable(? UTCDateTime $ts) : bool
1404 1404
     {
1405 1405
         $this->destroy = $ts;
1406 1406
         
@@ -1423,7 +1423,7 @@  discard block
 block discarded – undo
1423 1423
      * @param   string $recursion
1424 1424
      * @return  bool
1425 1425
      */
1426
-    abstract public function delete(bool $force=false, ?string $recursion=null, bool $recursion_first=true): bool;
1426
+    abstract public function delete(bool $force = false, ? string $recursion = null, bool $recursion_first = true) : bool;
1427 1427
 
1428 1428
 
1429 1429
     /**
@@ -1493,7 +1493,7 @@  discard block
 block discarded – undo
1493 1493
      * @param  bool $recursion_first
1494 1494
      * @return bool
1495 1495
      */
1496
-    public function save($attributes=[], $remove=[], ?string $recursion=null, bool $recursion_first=true): bool
1496
+    public function save($attributes = [], $remove = [], ? string $recursion = null, bool $recursion_first = true) : bool
1497 1497
     {
1498 1498
         if (!$this->isAllowed('w') && !$this->isReference()) {
1499 1499
             throw new Exception\Forbidden('not allowed to modify node '.$this->name,
@@ -1526,7 +1526,7 @@  discard block
 block discarded – undo
1526 1526
             if (empty($update)) {
1527 1527
                 return false;
1528 1528
             } else {
1529
-                $result =$this->_db->storage->updateOne([
1529
+                $result = $this->_db->storage->updateOne([
1530 1530
                     '_id' => $this->_id,
1531 1531
                 ], $update);
1532 1532
             }
@@ -1562,11 +1562,11 @@  discard block
 block discarded – undo
1562 1562
      * @return  array
1563 1563
      */
1564 1564
     public static function loadNodeAttributesWithCustomFilter(
1565
-        ?array $filter = null,
1565
+        ? array $filter = null,
1566 1566
         array $attributes = ['_id'],
1567
-        ?int $limit = null,
1568
-        ?int &$cursor = null,
1569
-        ?bool &$has_more = null)
1567
+        ? int $limit = null,
1568
+        ? int&$cursor = null,
1569
+        ? bool&$has_more = null)
1570 1570
     {
1571 1571
         $default = [
1572 1572
             '_id'       => 1,
@@ -1578,7 +1578,7 @@  discard block
 block discarded – undo
1578 1578
 
1579 1579
         $search_attributes = array_merge($default, array_fill_keys($attributes, 1));
1580 1580
         $list   = [];
1581
-        $result =$this->_db->storage->find($filter, [
1581
+        $result = $this->_db->storage->find($filter, [
1582 1582
             'skip'      => $cursor,
1583 1583
             'limit'     => $limit,
1584 1584
             'projection'=> $search_attributes
Please login to merge, or discard this patch.
src/lib/Balloon/Filesystem/Node/File.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Balloon
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
      * @param array
48 48
      **/
49 49
     protected $temp_files = [
50
-        '/^\._(.*)$/',     // OS/X resource forks
51
-        '/^.DS_Store$/',   // OS/X custom folder settings
50
+        '/^\._(.*)$/', // OS/X resource forks
51
+        '/^.DS_Store$/', // OS/X custom folder settings
52 52
         '/^desktop.ini$/', // Windows custom folder settings
53
-        '/^Thumbs.db$/',   // Windows thumbnail cache
54
-        '/^.(.*).swpx$/',  // ViM temporary files
55
-        '/^.(.*).swx$/',   // ViM temporary files
56
-        '/^.(.*).swp$/',   // ViM temporary files
57
-        '/^\.dat(.*)$/',   // Smultron seems to create these
53
+        '/^Thumbs.db$/', // Windows thumbnail cache
54
+        '/^.(.*).swpx$/', // ViM temporary files
55
+        '/^.(.*).swx$/', // ViM temporary files
56
+        '/^.(.*).swp$/', // ViM temporary files
57
+        '/^\.dat(.*)$/', // Smultron seems to create these
58 58
         '/^~lock.(.*)#$/', // Windows 7 lockfiles
59 59
     ];
60 60
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      * @param  bool $recursion_first
160 160
      * @return INode
161 161
      */
162
-    public function copyTo(Collection $parent, int $conflict=INode::CONFLICT_NOACTION, ?string $recursion=null, bool $recursion_first=true): INode
162
+    public function copyTo(Collection $parent, int $conflict = INode::CONFLICT_NOACTION, ? string $recursion = null, bool $recursion_first = true) : INode
163 163
     {
164 164
         $this->_pluginmgr->run('preCopyFile',
165 165
             [$this, $parent, &$conflict, &$recursion, &$recursion_first]
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
      * @param   bool $recursion_first
317 317
      * @return  bool
318 318
      */
319
-    public function delete(bool $force=false, ?string $recursion=null, bool $recursion_first=true): bool
319
+    public function delete(bool $force = false, ? string $recursion = null, bool $recursion_first = true) : bool
320 320
     {
321 321
         if (!$this->isAllowed('w')) {
322 322
             throw new Exception\Forbidden('not allowed to delete node '.$this->name,
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
         }
340 340
 
341 341
         $ts = new UTCDateTime();
342
-        $this->deleted  = $ts;
342
+        $this->deleted = $ts;
343 343
         $this->increaseVersion();
344 344
         
345 345
         $this->history[] = [
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
                     return true;
435 435
                 }
436 436
 
437
-                $ref  = $file['metadata']['ref'];
437
+                $ref = $file['metadata']['ref'];
438 438
                 
439 439
                 $found = false;
440 440
                 foreach ($ref as $key => $node) {
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
      * @param  string|array $attribute
574 574
      * @return array|string
575 575
      */
576
-    public function getAttribute($attribute=[])
576
+    public function getAttribute($attribute = [])
577 577
     {
578 578
         if (empty($attribute)) {
579 579
             $attribute = [
@@ -892,8 +892,8 @@  discard block
 block discarded – undo
892 892
     {
893 893
         assert(strlen($data) == 16);
894 894
 
895
-        $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100
896
-        $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10
895
+        $data[6] = chr(ord($data[6])&0x0f|0x40); // set version to 0100
896
+        $data[8] = chr(ord($data[8])&0x3f|0x80); // set bits 6-7 to 10
897 897
 
898 898
         return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
899 899
     }
@@ -917,7 +917,7 @@  discard block
 block discarded – undo
917 917
      * @param   array $attributes
918 918
      * @return  int
919 919
      */
920
-    public function put($file, bool $new=false, array $attributes=[]): int
920
+    public function put($file, bool $new = false, array $attributes = []): int
921 921
     {
922 922
         $this->_logger->debug('PUT new content data for ['.$this->_id.']', [
923 923
             'category' => get_class($this),
@@ -968,7 +968,7 @@  discard block
 block discarded – undo
968 968
                 );
969 969
             }
970 970
 
971
-            $file  = $tmp_file;
971
+            $file = $tmp_file;
972 972
         }
973 973
         
974 974
        
@@ -1036,7 +1036,7 @@  discard block
 block discarded – undo
1036 1036
             $this->mime = $attributes['mime'];
1037 1037
         } elseif ($file !== null) {
1038 1038
             $finfo = finfo_open(FILEINFO_MIME_TYPE);
1039
-            $this->mime  = finfo_file($finfo, $file);
1039
+            $this->mime = finfo_file($finfo, $file);
1040 1040
             if ($this->mime == 'application/zip' || $this->mime == 'application/vnd.ms-office') {
1041 1041
                 $this->mime = $this->getMimeTypeFromExtension($this->name);
1042 1042
             }
@@ -1129,7 +1129,7 @@  discard block
 block discarded – undo
1129 1129
      * @param  string $db mimetypes
1130 1130
      * @return string
1131 1131
      */
1132
-    public function getMimeTypeFromExtension(string $filename, string $db='/etc/mime.types'): string
1132
+    public function getMimeTypeFromExtension(string $filename, string $db = '/etc/mime.types'): string
1133 1133
     {
1134 1134
         if (!is_readable($db)) {
1135 1135
             throw new Exception('mime database '.$db.' was not found or is not readable');
@@ -1146,7 +1146,7 @@  discard block
 block discarded – undo
1146 1146
             if (substr($line, 0, 1) == '#') {
1147 1147
                 continue;
1148 1148
             } // skip comments
1149
-            $line = rtrim($line) . " ";
1149
+            $line = rtrim($line)." ";
1150 1150
             if (!preg_match($regex, $line, $matches)) {
1151 1151
                 continue;
1152 1152
             } // no match to the extension
Please login to merge, or discard this patch.
src/lib/Balloon/Filesystem/Node/Collection.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Balloon
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      * @param  Filesystem $fs
73 73
      * @return void
74 74
      */
75
-    public function __construct(?BSONDocument $node, Filesystem $fs)
75
+    public function __construct(? BSONDocument $node, Filesystem $fs)
76 76
     {
77 77
         parent::__construct($node, $fs);
78 78
         
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             $this->_id = null;
81 81
 
82 82
             if ($this->_user instanceof User) {
83
-                $this->owner  = $this->_user->getId();
83
+                $this->owner = $this->_user->getId();
84 84
             }
85 85
         }
86 86
             
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * @param  bool $recursion_first
98 98
      * @return INode
99 99
      */
100
-    public function copyTo(Collection $parent, int $conflict=INode::CONFLICT_NOACTION, ?string $recursion=null, bool $recursion_first=true): INode
100
+    public function copyTo(Collection $parent, int $conflict = INode::CONFLICT_NOACTION, ? string $recursion = null, bool $recursion_first = true) : INode
101 101
     {
102 102
         if ($recursion === null) {
103 103
             $recursion_first = true;
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
      * @param  array|string $attribute
197 197
      * @return array|string
198 198
      */
199
-    public function getAttribute($attribute=[])
199
+    public function getAttribute($attribute = [])
200 200
     {
201 201
         if (empty($attribute)) {
202 202
             $attribute = [
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      * @param   array $filter
243 243
      * @return  Generator
244 244
      */
245
-    public function getChildNodes(int $deleted=INode::DELETED_EXCLUDE, array $filter=[]): Generator
245
+    public function getChildNodes(int $deleted = INode::DELETED_EXCLUDE, array $filter = []): Generator
246 246
     {
247 247
         if ($this->_user instanceof User) {
248 248
             $this->_user->findNewShares();
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
      * @param   array $filter
314 314
      * @return  Generator
315 315
      */
316
-    public function getChildren(int $deleted=INode::DELETED_EXCLUDE, array $filter=[]): array
316
+    public function getChildren(int $deleted = INode::DELETED_EXCLUDE, array $filter = []): array
317 317
     {
318 318
         return iterator_to_array($this->getChildNodes($deleted, $filter));
319 319
     }
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
      *
351 351
      * @return ObjectId
352 352
      */
353
-    public function getRealId(): ?ObjectId
353
+    public function getRealId(): ? ObjectId
354 354
     {
355 355
         if ($this->shared == true && $this->isReference()) {
356 356
             return $this->reference;
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
      * @param  array $filter
385 385
      * @return INode
386 386
      */
387
-    public function getChild($node, int $deleted=INode::DELETED_EXCLUDE, array $filter=[]): INode
387
+    public function getChild($node, int $deleted = INode::DELETED_EXCLUDE, array $filter = []): INode
388 388
     {
389 389
         //if $node is string load the object from the backend based on the current parent (the name
390 390
         //is unique per depth, so we can load the object)
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
      * @param   int $deleted
453 453
      * @return  bool
454 454
      */
455
-    protected function doRecursiveAction(string $method, array $params=[], int $deleted=INode::DELETED_EXCLUDE): bool
455
+    protected function doRecursiveAction(string $method, array $params = [], int $deleted = INode::DELETED_EXCLUDE): bool
456 456
     {
457 457
         if (!is_callable([$this, $method])) {
458 458
             throw new Exception("method $method is not callable in ".__CLASS__);
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
      * @param   bool $recursion_first
480 480
      * @return  bool
481 481
      */
482
-    public function delete(bool $force=false, ?string $recursion=null, bool $recursion_first=true): bool
482
+    public function delete(bool $force = false, ? string $recursion = null, bool $recursion_first = true) : bool
483 483
     {
484 484
         if (!$this->isAllowed('w') && !$this->isReference()) {
485 485
             throw new Exception\Forbidden('not allowed to delete node '.$this->name,
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
      * @param   bool $recursion_first
543 543
      * @return  bool
544 544
      */
545
-    protected function _forceDelete(?string $recursion=null, bool $recursion_first=true): bool
545
+    protected function _forceDelete(? string $recursion = null, bool $recursion_first = true) : bool
546 546
     {
547 547
         if (!$this->isReference()) {
548 548
             $this->doRecursiveAction('delete', [
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
      * @param   array $filter
595 595
      * @return  bool
596 596
      */
597
-    public function childExists($name, $deleted=INode::DELETED_EXCLUDE, array $filter=[]): bool
597
+    public function childExists($name, $deleted = INode::DELETED_EXCLUDE, array $filter = []): bool
598 598
     {
599 599
         $find = [
600 600
             'parent'  => $this->getRealId(),
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
         }
729 729
 
730 730
         $this->shared = false;
731
-        $this->acl   = null;
731
+        $this->acl = null;
732 732
         $action = [
733 733
             '$unset' => [
734 734
                 'shared' => $this->_id
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
      * @param   arary $files
789 789
      * @return  array
790 790
      */
791
-    public function getChildrenRecursive(?ObjectId $id=null, ?array &$shares=[], ?array &$files=[]): array
791
+    public function getChildrenRecursive(? ObjectId $id = null, ? array &$shares = [], ? array &$files = []) : array
792 792
     {
793 793
         $list = [];
794 794
         $result = $this->_db->storage->find([
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
      * @param   bool $clone
833 833
      * @return  Collection
834 834
      */
835
-    public function createDirectory($name, array $attributes=[], int $conflict=INode::CONFLICT_NOACTION, bool $clone=false): Collection
835
+    public function createDirectory($name, array $attributes = [], int $conflict = INode::CONFLICT_NOACTION, bool $clone = false): Collection
836 836
     {
837 837
         if (!$this->isAllowed('w')) {
838 838
             throw new Exception\Forbidden('not allowed to create new node here',
@@ -879,7 +879,7 @@  discard block
 block discarded – undo
879 879
                 'shared'    => ($this->shared === true ? $this->getRealId() : $this->shared)
880 880
             ];
881 881
 
882
-            $save  = array_merge($meta, $attributes);
882
+            $save = array_merge($meta, $attributes);
883 883
 
884 884
             $result = $this->_db->storage->insertOne($save);
885 885
             $save['_id'] = $result->getInsertedId();
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
      * @param   bool $clone
913 913
      * @return  File
914 914
      */
915
-    public function createFile($name, $data=null, array $attributes=[], int $conflict=INode::CONFLICT_NOACTION, bool $clone=false): File
915
+    public function createFile($name, $data = null, array $attributes = [], int $conflict = INode::CONFLICT_NOACTION, bool $clone = false): File
916 916
     {
917 917
         if (!$this->isAllowed('w')) {
918 918
             throw new Exception\Forbidden('not allowed to create new node here',
@@ -962,7 +962,7 @@  discard block
 block discarded – undo
962 962
                 'shared'    => ($this->shared === true ? $this->getRealId() : $this->shared),
963 963
             ];
964 964
 
965
-            $save  = array_merge($meta, $attributes);
965
+            $save = array_merge($meta, $attributes);
966 966
 
967 967
             $result = $this->_db->storage->insertOne($save);
968 968
             $save['_id'] = $result->getInsertedId();
Please login to merge, or discard this patch.
src/lib/Balloon/Log/Adapter/Blackhole.php 1 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/Balloon/Log/Adapter/Stdout.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Balloon
@@ -71,15 +71,15 @@  discard block
 block discarded – undo
71 71
 
72 72
         // Check if given foreground color found
73 73
         if (isset($this->foreground_colors[$foreground_color])) {
74
-            $colored_string .= "\033[" . $this->foreground_colors[$foreground_color] . "m";
74
+            $colored_string .= "\033[".$this->foreground_colors[$foreground_color]."m";
75 75
         }
76 76
         // Check if given background color found
77 77
         if (isset($this->background_colors[$background_color])) {
78
-            $colored_string .= "\033[" . $this->background_colors[$background_color] . "m";
78
+            $colored_string .= "\033[".$this->background_colors[$background_color]."m";
79 79
         }
80 80
 
81 81
         // Add string and end coloring
82
-        $colored_string .=  $string . "\033[0m";
82
+        $colored_string .= $string."\033[0m";
83 83
 
84 84
         return $colored_string;
85 85
     }
Please login to merge, or discard this patch.
src/lib/Balloon/Log/Adapter/AbstractAdapter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Balloon
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @param Iterable $options
53 53
      * @return void
54 54
      */
55
-    public function __construct(?Iterable $config=null)
55
+    public function __construct(? Iterable $config = null)
56 56
     {
57 57
         $this->setOptions($config);
58 58
     }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      * @param   Iterable $options
96 96
      * @return  AdapterInterface
97 97
      */
98
-    public function setOptions(?Iterable $config=null): AdapterInterface
98
+    public function setOptions(? Iterable $config = null) : AdapterInterface
99 99
     {
100 100
         if ($config === null) {
101 101
             return $this;
Please login to merge, or discard this patch.
src/lib/Balloon/Log/Adapter/File.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Balloon
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      * @param   Iterable $options
36 36
      * @return  AdapterInterface
37 37
      */
38
-    public function setOptions(?Iterable $config=null): AdapterInterface
38
+    public function setOptions(? Iterable $config = null) : AdapterInterface
39 39
     {
40 40
         parent::setOptions($config);
41 41
         if ($config === null) {
Please login to merge, or discard this patch.
src/lib/Balloon/Log/Adapter/AdapterInterface.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Balloon
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      * @param Iterable $options
31 31
      * @return void
32 32
      */
33
-    public function __construct(?Iterable $config=null);
33
+    public function __construct(? Iterable $config = null);
34 34
     
35 35
 
36 36
     /**
@@ -61,5 +61,5 @@  discard block
 block discarded – undo
61 61
      * @param   Iterable $options
62 62
      * @return  AdapterInterface
63 63
      */
64
-    public function setOptions(?Iterable $config=null): AdapterInterface;
64
+    public function setOptions(? Iterable $config = null) : AdapterInterface;
65 65
 }
Please login to merge, or discard this patch.