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

SwindlerRepository::findSwindlerIsBanned()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

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