Conditions | 2 |
Paths | 2 |
Total Lines | 24 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 4 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
32 | public function process(array $data) |
||
33 | { |
||
34 | $rating = $this->checkAnswers->checkAnswers($data); |
||
35 | $passModule = $this->doctrine->getRepository('AppBundle:PassModule') |
||
|
|||
36 | ->findOneById($data['idPassModule']); |
||
37 | |||
38 | $passModule->addAnsweredQuestionId($passModule->getCurrentQuestion()->getId()); |
||
39 | |||
40 | $nextQuestionForPass = $this->doctrine->getRepository('AppBundle:Question') |
||
41 | ->getNextQuestionForPass($passModule); |
||
42 | |||
43 | $passModule->addRating($rating); |
||
44 | |||
45 | |||
46 | if($nextQuestionForPass === null) { |
||
47 | $this->deactivation->deactivation($passModule, new \DateTime()); |
||
48 | return $this->generateOutput('redirect_to_result', 301, $data['idPassModule']); |
||
49 | } |
||
50 | |||
51 | $passModule->setCurrentQuestion($nextQuestionForPass); |
||
52 | $this->doctrine->getManager()->flush(); |
||
53 | |||
54 | return $this->generateOutput('redirect_to_pass', 301, $data['idPassModule']); |
||
55 | } |
||
56 | } |
||
57 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.