Completed
Push — issue#666 ( 5bb037...827179 )
by Guilherme
04:30 queued 33s
created

RemoteClaimRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 15
rs 10
wmc 1
lcom 0
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A findByClient() 0 8 1
1
<?php
2
/**
3
 * This file is part of the login-cidadao project or it's bundles.
4
 *
5
 * (c) Guilherme Donato <guilhermednt on github>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace LoginCidadao\RemoteClaimsBundle\Entity;
12
13
use Doctrine\ORM\EntityRepository;
14
use LoginCidadao\OAuthBundle\Model\ClientInterface;
15
use LoginCidadao\RemoteClaimsBundle\Model\RemoteClaimInterface;
16
17
/**
18
 * Class RemoteClaimRepository
19
 * @package LoginCidadao\RemoteClaimsBundle\Entity
20
 *
21
 * @codeCoverageIgnore
22
 */
23
class RemoteClaimRepository extends EntityRepository
24
{
25
    /**
26
     * @param ClientInterface $client
27
     * @return array|RemoteClaimInterface[]
28
     */
29
    public function findByClient(ClientInterface $client)
30
    {
31
        return $this->createQueryBuilder('r')
32
            ->where('r.provider = :client')
33
            ->setParameter('client', $client)
34
            ->getQuery()
35
            ->getResult();
36
    }
37
}
38