@@ -173,6 +173,7 @@ discard block |
||
173 | 173 | /** |
174 | 174 | * Filesystem factory. |
175 | 175 | * |
176 | + * @param User $user |
|
176 | 177 | * @return Filesystem |
177 | 178 | */ |
178 | 179 | public function getFilesystem(?User $user = null): Filesystem |
@@ -376,7 +377,7 @@ discard block |
||
376 | 377 | * |
377 | 378 | * @param string $id |
378 | 379 | * |
379 | - * @return User |
|
380 | + * @return Group |
|
380 | 381 | */ |
381 | 382 | public function getGroupById(ObjectId $id): Group |
382 | 383 | { |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | public function getUserById(ObjectId $id): User |
224 | 224 | { |
225 | 225 | $attributes = $this->db->user->findOne([ |
226 | - '_id' => $id, |
|
226 | + '_id' => $id, |
|
227 | 227 | ]); |
228 | 228 | |
229 | 229 | if (null === $attributes) { |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | public function getUserByName(string $name): User |
310 | 310 | { |
311 | 311 | $attributes = $this->db->user->findOne([ |
312 | - 'username' => $name, |
|
312 | + 'username' => $name, |
|
313 | 313 | ]); |
314 | 314 | |
315 | 315 | if (null === $attributes) { |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | public function getGroupByName(string $name): Group |
362 | 362 | { |
363 | 363 | $attributes = $this->db->group->findOne([ |
364 | - 'username' => $name, |
|
364 | + 'username' => $name, |
|
365 | 365 | ]); |
366 | 366 | |
367 | 367 | if (null === $attributes) { |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | public function getGroupById(ObjectId $id): Group |
382 | 382 | { |
383 | 383 | $attributes = $this->db->group->findOne([ |
384 | - '_id' => $id, |
|
384 | + '_id' => $id, |
|
385 | 385 | ]); |
386 | 386 | |
387 | 387 | if (null === $attributes) { |
@@ -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 |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * |
120 | 120 | * @return Server |
121 | 121 | */ |
122 | - public function setOptions(?Iterable $config = null): self |
|
122 | + public function setOptions(?Iterable $config = null) : self |
|
123 | 123 | { |
124 | 124 | if (null === $config) { |
125 | 125 | return $this; |
@@ -128,12 +128,12 @@ discard block |
||
128 | 128 | foreach ($config as $name => $value) { |
129 | 129 | switch ($name) { |
130 | 130 | case 'temp_dir': |
131 | - $this->temp_dir = (string) $value; |
|
131 | + $this->temp_dir = (string)$value; |
|
132 | 132 | |
133 | 133 | break; |
134 | 134 | case 'max_file_version': |
135 | 135 | case 'max_file_size': |
136 | - $this->{$name} = (int) $value; |
|
136 | + $this->{$name} = (int)$value; |
|
137 | 137 | |
138 | 138 | break; |
139 | 139 | default: |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | * |
180 | 180 | * @return Filesystem |
181 | 181 | */ |
182 | - public function getFilesystem(?User $user = null): Filesystem |
|
182 | + public function getFilesystem(?User $user = null) : Filesystem |
|
183 | 183 | { |
184 | 184 | if (null !== $user) { |
185 | 185 | return new Filesystem($this, $this->db, $this->hook, $this->logger, $this->storage, $this->acl, $user); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | * |
201 | 201 | * @return ObjectId |
202 | 202 | */ |
203 | - public function addUser(string $username, ?string $password = null, array $attributes = []): ObjectId |
|
203 | + public function addUser(string $username, ?string $password = null, array $attributes = []) : ObjectId |
|
204 | 204 | { |
205 | 205 | if ($this->userExists($username)) { |
206 | 206 | throw new UserException('user does already exists', UserException::ALREADY_EXISTS); |
@@ -288,7 +288,7 @@ |
||
288 | 288 | /** |
289 | 289 | * Save. |
290 | 290 | * |
291 | - * @param array $attributes |
|
291 | + * @param string[] $attributes |
|
292 | 292 | * |
293 | 293 | * @return bool |
294 | 294 | */ |
@@ -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 |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | if (empty($attribute)) { |
225 | 225 | $requested = $default; |
226 | 226 | } elseif (is_string($attribute)) { |
227 | - $requested = (array) $attribute; |
|
227 | + $requested = (array)$attribute; |
|
228 | 228 | } elseif (is_array($attribute)) { |
229 | 229 | $requested = $attribute; |
230 | 230 | } |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | |
238 | 238 | switch ($attr) { |
239 | 239 | case 'id': |
240 | - $resolved['id'] = (string) $this->_id; |
|
240 | + $resolved['id'] = (string)$this->_id; |
|
241 | 241 | |
242 | 242 | break; |
243 | 243 | case 'avatar': |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |