@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | 'BaseFileName' => $attrs['name'], |
| 141 | 141 | 'Size' => $doc->getSize(), |
| 142 | 142 | 'Version' => $attrs['version'], |
| 143 | - 'OwnerId' => (string) $doc->getNode()->getOwner(), |
|
| 144 | - 'UserId' => (string) $this->user->getId(), |
|
| 143 | + 'OwnerId' => (string)$doc->getNode()->getOwner(), |
|
| 144 | + 'UserId' => (string)$this->user->getId(), |
|
| 145 | 145 | 'UserFriendlyName' => $this->user->getUsername(), |
| 146 | 146 | 'UserCanWrite' => true, |
| 147 | 147 | 'PostMessageOrigin' => null, |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | foreach ($config as $key => $value) { |
| 69 | 69 | switch ($key) { |
| 70 | 70 | case 'index_configuration': |
| 71 | - $this->{$key} = (string) $value; |
|
| 71 | + $this->{$key} = (string)$value; |
|
| 72 | 72 | |
| 73 | 73 | break; |
| 74 | 74 | default: |
@@ -1,6 +1,6 @@ discard block |
||
| 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 |
||
| 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 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -85,16 +85,16 @@ discard block |
||
| 85 | 85 | foreach ($this->server->getGroups($groups_filter) as $role) { |
| 86 | 86 | $body[] = [ |
| 87 | 87 | 'type' => 'group', |
| 88 | - 'id' => (string) $role->getId(), |
|
| 89 | - 'name' => (string) $role->getName(), |
|
| 88 | + 'id' => (string)$role->getId(), |
|
| 89 | + 'name' => (string)$role->getName(), |
|
| 90 | 90 | ]; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | foreach ($this->server->getUsers($users_filter) as $role) { |
| 94 | 94 | $body[] = [ |
| 95 | 95 | 'type' => 'user', |
| 96 | - 'id' => (string) $role->getId(), |
|
| 97 | - 'name' => (string) $role->getUsername(), |
|
| 96 | + 'id' => (string)$role->getId(), |
|
| 97 | + 'name' => (string)$role->getUsername(), |
|
| 98 | 98 | ]; |
| 99 | 99 | } |
| 100 | 100 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | $meta['share_ref'] = []; |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | - set_time_limit((int) ($file->getSize() / 15339168)); |
|
| 230 | + set_time_limit((int)($file->getSize() / 15339168)); |
|
| 231 | 231 | $id = new ObjectId(); |
| 232 | 232 | |
| 233 | 233 | //somehow mongo-connector does not catch metadata when set during uploadFromStream() |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -629,7 +629,7 @@ discard block |
||
| 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 | } |
@@ -652,7 +652,7 @@ discard block |
||
| 652 | 652 | public function getLastModified(): int |
| 653 | 653 | { |
| 654 | 654 | if ($this->changed instanceof UTCDateTime) { |
| 655 | - return (int) $this->changed->toDateTime()->format('U'); |
|
| 655 | + return (int)$this->changed->toDateTime()->format('U'); |
|
| 656 | 656 | } |
| 657 | 657 | |
| 658 | 658 | return 0; |
@@ -1093,8 +1093,8 @@ discard block |
||
| 1093 | 1093 | return false; |
| 1094 | 1094 | } |
| 1095 | 1095 | |
| 1096 | - $remove = (array) $remove; |
|
| 1097 | - $attributes = (array) $attributes; |
|
| 1096 | + $remove = (array)$remove; |
|
| 1097 | + $attributes = (array)$attributes; |
|
| 1098 | 1098 | $this->_hook->run( |
| 1099 | 1099 | 'preSaveNodeAttributes', |
| 1100 | 1100 | [$this, &$attributes, &$remove, &$recursion, &$recursion_first] |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | if (true === $string) { |
| 291 | - $found[] = (string) $share; |
|
| 291 | + $found[] = (string)$share; |
|
| 292 | 292 | } else { |
| 293 | 293 | $found[] = $share; |
| 294 | 294 | } |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | '$or' => [ |
| 391 | 391 | ['acl' => [ |
| 392 | 392 | '$elemMatch' => [ |
| 393 | - 'id' => (string) $this->_id, |
|
| 393 | + 'id' => (string)$this->_id, |
|
| 394 | 394 | 'type' => 'user', |
| 395 | 395 | ], |
| 396 | 396 | ]], |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | $list = []; |
| 408 | 408 | foreach ($item as $child) { |
| 409 | 409 | $found[] = $child['_id']; |
| 410 | - $list[(string) $child['_id']] = $child; |
|
| 410 | + $list[(string)$child['_id']] = $child; |
|
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | if (empty($found)) { |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | |
| 445 | 445 | $new = array_diff($found, $exists); |
| 446 | 446 | foreach ($new as $add) { |
| 447 | - $node = $list[(string) $add]; |
|
| 447 | + $node = $list[(string)$add]; |
|
| 448 | 448 | |
| 449 | 449 | $this->logger->info('found new share ['.$node['_id'].']', [ |
| 450 | 450 | 'category' => get_class($this), |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | */ |
| 528 | 528 | public function setHardQuota(int $quota): self |
| 529 | 529 | { |
| 530 | - $this->hard_quota = (int) $quota; |
|
| 530 | + $this->hard_quota = (int)$quota; |
|
| 531 | 531 | $this->save(['hard_quota']); |
| 532 | 532 | |
| 533 | 533 | return $this; |
@@ -542,7 +542,7 @@ discard block |
||
| 542 | 542 | */ |
| 543 | 543 | public function setSoftQuota(int $quota): self |
| 544 | 544 | { |
| 545 | - $this->soft_quota = (int) $quota; |
|
| 545 | + $this->soft_quota = (int)$quota; |
|
| 546 | 546 | $this->save(['soft_quota']); |
| 547 | 547 | |
| 548 | 548 | return $this; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | foreach ($config as $option => $value) { |
| 58 | 58 | switch ($option) { |
| 59 | 59 | case 'interval': |
| 60 | - $this->{$option} = (int) $value; |
|
| 60 | + $this->{$option} = (int)$value; |
|
| 61 | 61 | |
| 62 | 62 | break; |
| 63 | 63 | default: |