Completed
Push — master ( b75c6e...ecc25c )
by Julito
07:54
created

CGroupInfoRepository   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A findOneByCode() 0 3 1
A createGroup() 0 3 1
A findOneByTitle() 0 3 1
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CourseBundle\Repository;
5
6
use Chamilo\CoreBundle\Repository\ResourceRepository;
7
use Chamilo\CourseBundle\Entity\CGroupInfo;
8
9
/**
10
 * Class CGroupInfoRepository.
11
 */
12
final class CGroupInfoRepository extends ResourceRepository
13
{
14
    /**
15
     * @return CGroupInfo
16
     */
17
    public function createGroup()
18
    {
19
        return $this->create();
20
    }
21
22
    /**
23
     * @param string $code
24
     *
25
     * @return mixed
26
     */
27
    public function findOneByCode($code)
28
    {
29
        return $this->getRepository()->findOneByCode($code);
30
    }
31
32
    /**
33
     * @param string $name
34
     *
35
     * @return mixed
36
     */
37
    public function findOneByTitle($name)
38
    {
39
        return $this->getRepository()->findOneByTitle($name);
40
    }
41
}
42