Ejemplo n.º 1
0
 private function getSerieData(Question $question, $answers)
 {
     $data = array_fill(0, $question->getScale()->getSize(), 0);
     foreach ($answers as $answer) {
         $data[$answer->getAnswer() - 1]++;
     }
     return $data;
 }
Ejemplo n.º 2
0
 private function getChoices(Question $question)
 {
     $choices = array();
     for ($i = 1; $i <= $question->getScale()->getSize(); $i++) {
         $choices[$i] = $i;
     }
     return $choices;
 }