Completed
Pull Request — master (#30)
by
unknown
09:18 queued 06:01
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 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 12
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

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