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

PaymentRepository   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A createNew() 0 4 1
A findAllAvailable() 0 10 1
A createPaginator() 0 3 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
use Newscoop\PaywallBundle\Entity\Payment;
12
use Sylius\Component\Resource\Repository\RepositoryInterface;
13
14
/**
15
 * Payment repository.
16
 */
17
class PaymentRepository extends EntityRepository implements RepositoryInterface
0 ignored issues
show
Bug introduced by
There is at least one abstract method in this class. Maybe declare it as abstract, or implement the remaining methods: find, findAll, findBy, findOneBy, getClassName
Loading history...
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function createNew()
23
    {
24
        return new Payment();
25
    }
26
27
    /**
28
     * Find all available payments.
29
     */
30
    public function findAllAvailable()
31
    {
32
        $queryBuilder = $this
33
            ->createQueryBuilder('d')
34
        ;
35
36
        return $queryBuilder
37
            ->getQuery()
38
        ;
39
    }
40
41
    /**
42
     * {@inheritdoc}
43
     */
44
    public function createPaginator(array $criteria = null, array $orderBy = null)
45
    {
46
    }
47
}
48