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

PaymentRepository::findAllAvailable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

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