Completed
Pull Request — 4.0 (#4440)
by
unknown
04:44
created

MailTemplateRepository   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
dl 0
loc 21
ccs 5
cts 6
cp 0.8333
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getList() 0 8 1
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.ec-cube.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Eccube\Repository;
15
16
use Eccube\Entity\MailTemplate;
17
use Symfony\Bridge\Doctrine\RegistryInterface;
18
19
/**
20
 * MailTemplateRepository
21
 *
22
 * This class was generated by the Doctrine ORM. Add your own custom
23
 * repository methods below.
24
 */
25
class MailTemplateRepository extends AbstractRepository
26
{
27 149
    public function __construct(RegistryInterface $registry)
28
    {
29 149
        parent::__construct($registry, MailTemplate::class);
30
    }
31
32
    /**
33
     * getList
34
     *
35
     * @return array|null
36
     */
37
    public function getList()
38
    {
39 2
        $qb = $this->createQueryBuilder('m')
40
            ->orderBy('m.id');
41 2
42 2
        return $qb->getQuery()
43
            ->getResult();
44
    }
45
}
46