Code Duplication    Length = 10-10 lines in 2 locations

src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Repository/InstitutionAuthorizationRepository.php 2 locations

@@ 36-45 (lines=10) @@
33
     * @param InstitutionRole $role
34
     * @return InstitutionAuthorization[]
35
     */
36
    public function findAuthorizationOptionsForInstitution(Institution $institution, InstitutionRole $role)
37
    {
38
        return $this->createQueryBuilder('ia')
39
            ->where('ia.institution = :institution')
40
            ->andWhere('ia.type = :type')
41
            ->setParameter('institution', $institution->getInstitution())
42
            ->setParameter('institutionRole', $role)
43
            ->getQuery()
44
            ->getArrayResult();
45
    }
46
47
    /**
48
     * @param Institution $institution
@@ 53-62 (lines=10) @@
50
     * @return InstitutionAuthorization|null
51
     * @throws \Doctrine\ORM\NonUniqueResultException
52
     */
53
    public function findInstitutionByAuthorization(Institution $institution, InstitutionRole $role)
54
    {
55
        return $this->createQueryBuilder('ia')
56
            ->where('ia.institutionRelation = :institution')
57
            ->andWhere('ia.type = :type')
58
            ->setParameter('institution', $institution->getInstitution())
59
            ->setParameter('institutionRole', $role)
60
            ->getQuery()
61
            ->getOneOrNullResult();
62
    }
63
64
    /**
65
     * @param Institution $institution