@@ -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 |
@@ -93,11 +93,11 @@ discard block |
||
| 93 | 93 | foreach ($config as $option => $value) { |
| 94 | 94 | switch ($option) { |
| 95 | 95 | case 'server': |
| 96 | - $this->es_server = (array) $value; |
|
| 96 | + $this->es_server = (array)$value; |
|
| 97 | 97 | |
| 98 | 98 | break; |
| 99 | 99 | case 'index': |
| 100 | - $this->es_index = (string) $value; |
|
| 100 | + $this->es_index = (string)$value; |
|
| 101 | 101 | |
| 102 | 102 | break; |
| 103 | 103 | default: |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | ], |
| 148 | 148 | ]); |
| 149 | 149 | |
| 150 | - $user = (string) $this->user->getId(); |
|
| 150 | + $user = (string)$this->user->getId(); |
|
| 151 | 151 | foreach ($result['hits']['hits'] as $node) { |
| 152 | 152 | $id = false; |
| 153 | 153 | |
@@ -158,8 +158,8 @@ discard block |
||
| 158 | 158 | $_node = $this->fs->findNodeById($id); |
| 159 | 159 | if ($_node->isDeleted() && (1 === $deleted || 2 === $deleted) |
| 160 | 160 | || !$_node->isDeleted() && (0 === $deleted || 2 === $deleted)) { |
| 161 | - if (!($_node->isShared() && !$_node->isOwnerRequest()) && !isset($list[(string) $_node->getId()])) { |
|
| 162 | - $list[(string) $_node->getId()] = $_node; |
|
| 161 | + if (!($_node->isShared() && !$_node->isOwnerRequest()) && !isset($list[(string)$_node->getId()])) { |
|
| 162 | + $list[(string)$_node->getId()] = $_node; |
|
| 163 | 163 | } |
| 164 | 164 | } |
| 165 | 165 | } catch (\Exception $e) { |
@@ -239,8 +239,8 @@ discard block |
||
| 239 | 239 | $bool = $query['body']['query']; |
| 240 | 240 | |
| 241 | 241 | $filter1 = []; |
| 242 | - $filter1['bool']['should'][]['term']['owner'] = (string) $this->user->getId(); |
|
| 243 | - $filter1['bool']['should'][]['term']['metadata.ref.owner'] = (string) $this->user->getId(); |
|
| 242 | + $filter1['bool']['should'][]['term']['owner'] = (string)$this->user->getId(); |
|
| 243 | + $filter1['bool']['should'][]['term']['metadata.ref.owner'] = (string)$this->user->getId(); |
|
| 244 | 244 | |
| 245 | 245 | $share_filter = [ |
| 246 | 246 | 'bool' => [ |
@@ -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 |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | if (empty($set['expiration'])) { |
| 69 | 69 | unset($set['expiration']); |
| 70 | 70 | } else { |
| 71 | - $set['expiration'] = (int) $set['expiration']; |
|
| 71 | + $set['expiration'] = (int)$set['expiration']; |
|
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | if (isset($attributes['expiration']) && !empty($attributes['expiration'])) { |
| 163 | - $time = (int) $attributes['expiration']; |
|
| 163 | + $time = (int)$attributes['expiration']; |
|
| 164 | 164 | if ($time < time()) { |
| 165 | 165 | throw new Exception('share link for this node is expired'); |
| 166 | 166 | } |
@@ -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 |
@@ -97,22 +97,22 @@ discard block |
||
| 97 | 97 | foreach ($config as $option => $value) { |
| 98 | 98 | switch ($option) { |
| 99 | 99 | case 'socket': |
| 100 | - $this->socket = (string) $value; |
|
| 100 | + $this->socket = (string)$value; |
|
| 101 | 101 | |
| 102 | 102 | break; |
| 103 | 103 | case 'max_stream_size': |
| 104 | - $this->max_stream_size = (int) $value; |
|
| 104 | + $this->max_stream_size = (int)$value; |
|
| 105 | 105 | |
| 106 | 106 | break; |
| 107 | 107 | case 'aggressiveness': |
| 108 | - if ((int) $value > 3 || (int) $value < 0) { |
|
| 109 | - throw new Exception('invalid config value ['.(int) $value.'] for aggressiveness'); |
|
| 108 | + if ((int)$value > 3 || (int)$value < 0) { |
|
| 109 | + throw new Exception('invalid config value ['.(int)$value.'] for aggressiveness'); |
|
| 110 | 110 | } |
| 111 | - $this->aggressiveness = (int) $value; |
|
| 111 | + $this->aggressiveness = (int)$value; |
|
| 112 | 112 | |
| 113 | 113 | break; |
| 114 | 114 | case 'timeout': |
| 115 | - $this->timeout = (int) $value; |
|
| 115 | + $this->timeout = (int)$value; |
|
| 116 | 116 | |
| 117 | 117 | break; |
| 118 | 118 | break; |
@@ -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() |