diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2017-03-28 15:04:39 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2017-06-23 09:26:41 +0200 |
commit | 2585953e0dae631b65c59b0e31196d65bdde84df (patch) | |
tree | aa40f9658d13361c27399940e72d0d25e4b8d918 /src/Wallabag/UserBundle/Entity | |
parent | 2041810adbc6e663e4520337805c0003c77762e2 (diff) | |
download | wallabag-2585953e0dae631b65c59b0e31196d65bdde84df.tar.gz wallabag-2585953e0dae631b65c59b0e31196d65bdde84df.tar.zst wallabag-2585953e0dae631b65c59b0e31196d65bdde84df.zip |
Fixed typos
Diffstat (limited to 'src/Wallabag/UserBundle/Entity')
-rw-r--r-- | src/Wallabag/UserBundle/Entity/User.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Wallabag/UserBundle/Entity/User.php b/src/Wallabag/UserBundle/Entity/User.php index 2b73e344..4f24b17a 100644 --- a/src/Wallabag/UserBundle/Entity/User.php +++ b/src/Wallabag/UserBundle/Entity/User.php | |||
@@ -325,6 +325,7 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf | |||
325 | 325 | ||
326 | /** | 326 | /** |
327 | * @param Group $group | 327 | * @param Group $group |
328 | * | ||
328 | * @return UserGroup | 329 | * @return UserGroup |
329 | */ | 330 | */ |
330 | public function getUserGroupFromGroup(Group $group) | 331 | public function getUserGroupFromGroup(Group $group) |
@@ -334,6 +335,7 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf | |||
334 | return $userGroup; | 335 | return $userGroup; |
335 | } | 336 | } |
336 | } | 337 | } |
338 | |||
337 | return null; | 339 | return null; |
338 | } | 340 | } |
339 | 341 | ||
@@ -351,6 +353,7 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf | |||
351 | 353 | ||
352 | /** | 354 | /** |
353 | * @param Group $group | 355 | * @param Group $group |
356 | * | ||
354 | * @return int | 357 | * @return int |
355 | */ | 358 | */ |
356 | public function getGroupRoleForUser(Group $group) | 359 | public function getGroupRoleForUser(Group $group) |
@@ -358,19 +361,23 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf | |||
358 | if ($userGroup = $this->getUserGroupFromGroup($group)) { | 361 | if ($userGroup = $this->getUserGroupFromGroup($group)) { |
359 | return $userGroup->getRole(); | 362 | return $userGroup->getRole(); |
360 | } | 363 | } |
364 | |||
361 | return 0; | 365 | return 0; |
362 | } | 366 | } |
363 | 367 | ||
364 | /** | 368 | /** |
365 | * @param Group $group | 369 | * @param Group $group |
370 | * | ||
366 | * @return bool | 371 | * @return bool |
367 | */ | 372 | */ |
368 | public function inGroup(Group $group) | 373 | public function inGroup(Group $group) |
369 | { | 374 | { |
370 | if ($group::ACCESS_REQUEST === $group->getAcceptSystem()) { | 375 | if ($group::ACCESS_REQUEST === $group->getAcceptSystem()) { |
371 | $userGroup = $this->getUserGroupFromGroup($group); | 376 | $userGroup = $this->getUserGroupFromGroup($group); |
377 | |||
372 | return $userGroup->isAccepted(); | 378 | return $userGroup->isAccepted(); |
373 | } | 379 | } |
380 | |||
374 | return null !== $this->getUserGroupFromGroup($group); | 381 | return null !== $this->getUserGroupFromGroup($group); |
375 | } | 382 | } |
376 | 383 | ||
@@ -383,6 +390,7 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf | |||
383 | foreach ($this->userGroups as $userGroup) { | 390 | foreach ($this->userGroups as $userGroup) { |
384 | $groups->add($userGroup->getGroup()); | 391 | $groups->add($userGroup->getGroup()); |
385 | } | 392 | } |
393 | |||
386 | return $groups; | 394 | return $groups; |
387 | } | 395 | } |
388 | } | 396 | } |