mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-24 22:48:18 +00:00
Refactor findNull to find
This commit is contained in:
@@ -183,7 +183,7 @@ class UserRepository implements UserRepositoryInterface
|
||||
*
|
||||
* @return User|null
|
||||
*/
|
||||
public function findNull(int $userId): ?User
|
||||
public function find(int $userId): ?User
|
||||
{
|
||||
return User::find($userId);
|
||||
}
|
||||
@@ -269,8 +269,6 @@ class UserRepository implements UserRepositoryInterface
|
||||
*/
|
||||
public function hasRole(User $user, string $role): bool
|
||||
{
|
||||
// See reference nr. 8
|
||||
|
||||
/** @var Role $userRole */
|
||||
foreach ($user->roles as $userRole) {
|
||||
if ($userRole->name === $role) {
|
||||
|
Reference in New Issue
Block a user