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

RemoteClaimRepository::findByClient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 8
rs 9.4285
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