diff --git a/src/Bundle/ChillMainBundle/Entity/User.php b/src/Bundle/ChillMainBundle/Entity/User.php index 18d208c99..64f0e18f6 100644 --- a/src/Bundle/ChillMainBundle/Entity/User.php +++ b/src/Bundle/ChillMainBundle/Entity/User.php @@ -270,7 +270,7 @@ class User implements UserInterface, \Stringable foreach ($this->scopeHistories as $scopeHistory) { if ($at >= $scopeHistory->getStartDate() && ( null === $scopeHistory->getEndDate() || $at < $scopeHistory->getEndDate() - )) { + )) { return $scopeHistory->getScope(); } } diff --git a/src/Bundle/ChillMainBundle/Tests/Entity/UserTest.php b/src/Bundle/ChillMainBundle/Tests/Entity/UserTest.php index a0502593e..2aeadc574 100644 --- a/src/Bundle/ChillMainBundle/Tests/Entity/UserTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Entity/UserTest.php @@ -41,7 +41,7 @@ class UserTest extends TestCase self::assertNotNull( $user ->getMainScopeHistories() - ->filter(fn (User\UserScopeHistory $userScopeHistory) => $userScopeHistory->getScope() === $scopeA ) + ->filter(fn (User\UserScopeHistory $userScopeHistory) => $userScopeHistory->getScope() === $scopeA) ->first()->getEndDate() ); @@ -63,7 +63,7 @@ class UserTest extends TestCase self::assertNotNull( $user ->getUserJobHistories() - ->filter(fn(User\UserJobHistory $userJobHistory) => $userJobHistory->getJob() === $jobA ) + ->filter(fn (User\UserJobHistory $userJobHistory) => $userJobHistory->getJob() === $jobA) ->first()->getEndDate() ); }