| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function getCompared(): array |
||
| 40 | { |
||
| 41 | $post = $this->getNormalizeUserPost(); |
||
| 42 | |||
| 43 | foreach ($this->questions as $key => $value) { |
||
| 44 | $userAnswer = null; |
||
| 45 | |||
| 46 | if (isset($post[$value['id']])) { |
||
| 47 | $userAnswer = $post[$value['id']]; |
||
| 48 | } |
||
| 49 | |||
| 50 | $this->questions[$key]['userAnswer'] = $userAnswer; |
||
| 51 | } |
||
| 52 | |||
| 53 | return $this->questions; |
||
| 54 | } |
||
| 55 | } |
||
| 56 |