Completed
Pull Request — dev (#24)
by
unknown
04:06
created

SurveyAnswerRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 12
ccs 6
cts 6
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A findAnswersBySurvey() 0 9 1
1
<?php
2
3
namespace AppBundle\Repository;
4
5
/**
6
 * SurveyAnswerRepository.
7
 *
8
 * This class was generated by the Doctrine ORM. Add your own custom
9
 * repository methods below.
10
 */
11
class SurveyAnswerRepository extends \Doctrine\ORM\EntityRepository
12
{
13 2
    public function findAnswersBySurvey($survey)
14
    {
15 2
        $query = $this->createQueryBuilder('a')
16 2
            ->where('a.survey = :survey')
17 2
            ->setParameter('survey', $survey)
18 2
            ->getQuery();
19
20 2
        return $query->getResult();
21
    }
22
}
23