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

LeadRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A leadExist() 0 12 1
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