Completed
Pull Request — master (#144)
by
unknown
12:10
created

SwindlerRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A findSwindlerIsBanned() 0 10 1
1
<?php
2
3
namespace AppBundle\Repository;
4
5
class SwindlerRepository extends \Doctrine\ORM\EntityRepository
6
{
7
    public function findSwindlerIsBanned($ip)
8
    {
9
        return $this->createQueryBuilder('s')
10
            ->select('s')
11
            ->where('s.ip = :param')
12
            ->andWhere('s.banned = 1')
13
            ->setParameter(':param', $ip)
14
            ->getQuery()
15
            ->getOneOrNullResult();
16
    }
17
}
18