Code Duplication    Length = 9-9 lines in 2 locations

src/Entity/OAuth/Repository/ClientRepository.php 1 location

@@ 19-27 (lines=9) @@
16
     * @param bool $mustValidateSecret
17
     * @return ClientEntityInterface
18
     */
19
    public function getClientEntity($clientIdentifier, $grantType, $clientSecret = null, $mustValidateSecret = true)
20
    {
21
        $qb = $this->createQueryBuilder('c');
22
        $qb->where('c.identifier = :id');
23
        $qb->setParameter('id', $clientIdentifier);
24
        $query = $qb->getQuery();
25
        $result = $query->getResult();
26
        return empty($result) ? null : $result[0];
27
    }
28
29
    /**
30
     * @param Client $client

src/Entity/OAuth/Repository/ScopeRepository.php 1 location

@@ 16-24 (lines=9) @@
13
     * @param string $identifier
14
     * @return mixed
15
     */
16
    public function getScopeEntityByIdentifier($identifier)
17
    {
18
        $qb = $this->createQueryBuilder('s');
19
        $qb->where('s.identifier = :id');
20
        $qb->setParameter('id', $identifier);
21
        $query = $qb->getQuery();
22
        $result = $query->getResult();
23
        return empty($result) ? null : $result[0];
24
    }
25
26
    /**
27
     * @param array|ScopeEntityInterface[] $scopes