@@ -106,14 +106,13 @@ discard block |
||
| 106 | 106 | * |
| 107 | 107 | * @param bool $reference |
| 108 | 108 | * |
| 109 | - * @return ObjectId |
|
| 109 | + * @return ObjectId|null |
|
| 110 | 110 | */ |
| 111 | 111 | public function getShareId(bool $reference = false): ?ObjectId; |
| 112 | 112 | |
| 113 | 113 | /** |
| 114 | 114 | * Get share node. |
| 115 | 115 | * |
| 116 | - * @param bool $reference |
|
| 117 | 116 | * |
| 118 | 117 | * @return Collection |
| 119 | 118 | */ |
@@ -236,6 +235,7 @@ discard block |
||
| 236 | 235 | |
| 237 | 236 | /** |
| 238 | 237 | * Download. |
| 238 | + * @return resource |
|
| 239 | 239 | */ |
| 240 | 240 | public function get(); |
| 241 | 241 | } |
@@ -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 |
@@ -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 @@ 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 |
@@ -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] |
@@ -816,7 +816,6 @@ discard block |
||
| 816 | 816 | /** |
| 817 | 817 | * Set app attributes. |
| 818 | 818 | * |
| 819 | - * @param AppInterface $app |
|
| 820 | 819 | * @param array $attributes |
| 821 | 820 | * |
| 822 | 821 | * @return NodeInterface |
@@ -832,7 +831,6 @@ discard block |
||
| 832 | 831 | /** |
| 833 | 832 | * Set app attribute. |
| 834 | 833 | * |
| 835 | - * @param AppInterface $app |
|
| 836 | 834 | * @param string $attribute |
| 837 | 835 | * @param mixed $value |
| 838 | 836 | * |
@@ -853,7 +851,6 @@ discard block |
||
| 853 | 851 | /** |
| 854 | 852 | * Remove app attribute. |
| 855 | 853 | * |
| 856 | - * @param AppInterface $app |
|
| 857 | 854 | * |
| 858 | 855 | * @return NodeInterface |
| 859 | 856 | */ |
@@ -870,7 +867,6 @@ discard block |
||
| 870 | 867 | /** |
| 871 | 868 | * Remove app attribute. |
| 872 | 869 | * |
| 873 | - * @param AppInterface $app |
|
| 874 | 870 | * @param string $attribute |
| 875 | 871 | * |
| 876 | 872 | * @return NodeInterface |
@@ -888,7 +884,6 @@ discard block |
||
| 888 | 884 | /** |
| 889 | 885 | * Get app attribute. |
| 890 | 886 | * |
| 891 | - * @param AppInterface $app |
|
| 892 | 887 | * @param string $attribute |
| 893 | 888 | * |
| 894 | 889 | * @return mixed |
@@ -905,7 +900,6 @@ discard block |
||
| 905 | 900 | /** |
| 906 | 901 | * Get app attributes. |
| 907 | 902 | * |
| 908 | - * @param AppInterface $app |
|
| 909 | 903 | * |
| 910 | 904 | * @return array |
| 911 | 905 | */ |
@@ -944,7 +938,7 @@ discard block |
||
| 944 | 938 | /** |
| 945 | 939 | * Get meta attributes as array. |
| 946 | 940 | * |
| 947 | - * @param array $attribute Specify attributes to return |
|
| 941 | + * @param array $attributes Specify attributes to return |
|
| 948 | 942 | * |
| 949 | 943 | * @return array |
| 950 | 944 | */ |
@@ -1115,9 +1109,9 @@ discard block |
||
| 1115 | 1109 | /** |
| 1116 | 1110 | * Get array value via string path. |
| 1117 | 1111 | * |
| 1118 | - * @param iterable $arr |
|
| 1112 | + * @param iterable $array |
|
| 1119 | 1113 | * @param string $path |
| 1120 | - * @param string $seperator |
|
| 1114 | + * @param string $separator |
|
| 1121 | 1115 | * |
| 1122 | 1116 | * @return mixed |
| 1123 | 1117 | */ |