Code Duplication    Length = 11-11 lines in 2 locations

app/Auth/AccountManager/DatabaseAccountManager.php 2 locations

@@ 22-32 (lines=11) @@
19
                ->findOneBy(['accountId' => $accountId]) !== null;
20
    }
21
22
    public function isEqualPassword($accountId, $password)
23
    {
24
        if ($this->isExistAccountId($accountId) === false) {
25
            return false;
26
        }
27
28
        return DatabaseManager::getEntityManager()
29
                ->getRepository(User::class)
30
                ->findOneBy(['accountId' => $accountId])
31
                ->getPassword() === $password;
32
    }
33
34
    public function getRole($accountId)
35
    {
@@ 34-44 (lines=11) @@
31
                ->getPassword() === $password;
32
    }
33
34
    public function getRole($accountId)
35
    {
36
        if ($this->isExistAccountId($accountId) === false) {
37
            return null;
38
        }
39
40
        return DatabaseManager::getEntityManager()
41
                ->getRepository(User::class)
42
                ->findOneBy(['accountId' => $accountId])
43
                ->getRoles();
44
    }
45
}
46