Completed
Pull Request — master (#24)
by Rafał
03:08
created

GatewayRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A findActive() 0 11 1
1
<?php
2
3
/**
4
 * @author Rafał Muszyński <[email protected]>
5
 * @copyright 2015 Sourcefabric z.ú.
6
 * @license http://www.gnu.org/licenses/gpl-3.0.txt
7
 */
8
namespace Newscoop\PaywallBundle\Entity\Repository;
9
10
use Doctrine\ORM\EntityRepository;
11
12
/**
13
 * Gateway repository.
14
 */
15
class GatewayRepository extends EntityRepository
16
{
17
    /**
18
     * Finds active gateways/pament methods.
19
     */
20
    public function findActive()
21
    {
22
        $qb = $this
23
            ->createQueryBuilder('d')
24
            ->where('d.isActive = true')
25
        ;
26
27
        return $qb
28
            ->getQuery()
29
        ;
30
    }
31
}
32