Completed
Pull Request — master (#30)
by
unknown
09:18 queued 06:01
created

SurveyAnswerRepository::findAnswersBySurvey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 9
ccs 6
cts 6
cp 1
rs 9.6666
cc 1
eloc 6
nc 1
nop 1
crap 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