Completed
Push — master ( af42cb...3888f0 )
by Julito
13:17
created

AccessUrlRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFirstId() 0 7 1
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CoreBundle\Repository;
5
6
use Doctrine\ORM\EntityRepository;
7
8
/**
9
 * Class AccessUrlRepository.
10
 *
11
 * @package Chamilo\CoreBundle\Repository
12
 */
13
class AccessUrlRepository extends EntityRepository
14
{
15
    /**
16
     * Select the first access_url ID in the list as a default setting for
17
     * the creation of new users.
18
     *
19
     * @return mixed
20
     */
21
    public function getFirstId()
22
    {
23
        $qb = $this->createQueryBuilder('a');
24
        $qb->select('MIN (a.id)');
25
        $q = $qb->getQuery();
26
27
        return $q->execute();
28
    }
29
}
30