Completed
Pull Request — dev (#54)
by nonanerz
02:53
created

SurveyAnswerRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 12
rs 10
c 0
b 0
f 0
ccs 0
cts 8
cp 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
    public function findAnswersBySurvey(Survey $survey)
16
    {
17
        $query = $this->createQueryBuilder('a')
18
            ->where('a.survey = :survey')
19
            ->setParameter('survey', $survey)
20
            ->getQuery();
21
22
        return $query->getResult();
23
    }
24
}
25