Completed
Push — master ( a435b5...54b9b0 )
by Guillaume
14:56
created

LeadRepository::leadExist()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 9
nc 1
nop 2
1
<?php
2
3
namespace Starkerxp\LeadBundle\Repository;
4
5
6
use Doctrine\ORM\EntityRepository;
7
8
/**
9
 * LeadRepository
10
 *
11
 * This class was generated by the Doctrine ORM. Add your own custom
12
 * repository methods below.
13
 */
14
class LeadRepository extends EntityRepository
15
{
16
    public function leadExist($origin, $externalReference)
17
    {
18
        $qb = $this->createQueryBuilder('l')
19
            ->andWhere('l.origin= :origin')
20
            ->andWhere('l.externalReference= :externalReference')
21
            ->setParameter('origin', $origin)
22
            ->setParameter('externalReference', $externalReference)
23
            ->getQuery();
24
        $result = $qb->execute();
25
26
        return !empty($result);
27
    }
28
29
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
30