IndicatorValueRepository::getIndicatorValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 10
ccs 5
cts 5
cp 1
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Api\Entity;
4
5
use Doctrine\ORM\EntityRepository;
6
7
class IndicatorValueRepository extends EntityRepository
8
{
9 1
    public function getIndicatorValue($indicator)
10
    {
11
        $dql = 'SELECT iv FROM Api\Entity\IndicatorValue iv
12
            WHERE iv.indicator = :indicator
13 1
            ORDER BY iv.year ASC';
14
15 1
        return $this->getEntityManager()->createQuery($dql)
16 1
            ->setParameter('indicator', $indicator)
17 1
            ->getArrayResult();
18
    }
19
}    
20
21