@@ -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 | } |
@@ -49,8 +49,8 @@ |
||
| 49 | 49 | $this->db->storage->updateOne( |
| 50 | 50 | ['_id' => $object['_id']], |
| 51 | 51 | [ |
| 52 | - '$unset' => 'sharelink', |
|
| 53 | - '$set' => ['app.Balloon\App\Sharelink' => $object['sharelink']], |
|
| 52 | + '$unset' => 'sharelink', |
|
| 53 | + '$set' => ['app.Balloon\App\Sharelink' => $object['sharelink']], |
|
| 54 | 54 | ] |
| 55 | 55 | ); |
| 56 | 56 | } |
@@ -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 |
@@ -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 |
@@ -92,11 +92,11 @@ discard block |
||
| 92 | 92 | switch ($option) { |
| 93 | 93 | case 'github_request_url': |
| 94 | 94 | case 'github_request_timeout': |
| 95 | - $this->{$option} = (string) $value; |
|
| 95 | + $this->{$option} = (string)$value; |
|
| 96 | 96 | |
| 97 | 97 | break; |
| 98 | 98 | case 'github_request_timeout': |
| 99 | - $this->github_request_timeout = (int) $value; |
|
| 99 | + $this->github_request_timeout = (int)$value; |
|
| 100 | 100 | |
| 101 | 101 | break; |
| 102 | 102 | case 'formats': |
@@ -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 |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | ->setCode(200) |
| 62 | 62 | ->setOutputFormat(null) |
| 63 | 63 | ->setBody( |
| 64 | - function () use ($url) { |
|
| 64 | + function() use ($url) { |
|
| 65 | 65 | $stream = fopen($url, 'r'); |
| 66 | 66 | while (!feof($stream)) { |
| 67 | 67 | echo fread($stream, 8192); |
@@ -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 |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | { |
| 281 | 281 | $id = $this->server->addGroup($name, $member, $attributes); |
| 282 | 282 | |
| 283 | - return (new Response())->setBody((string) $id)->setCode(201); |
|
| 283 | + return (new Response())->setBody((string)$id)->setCode(201); |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | /** |
@@ -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 |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | |
| 482 | 482 | $id = $this->server->addUser($username, $attributes); |
| 483 | 483 | |
| 484 | - return (new Response())->setBody((string) $id)->setCode(201); |
|
| 484 | + return (new Response())->setBody((string)$id)->setCode(201); |
|
| 485 | 485 | } |
| 486 | 486 | |
| 487 | 487 | /** |