Code Duplication    Length = 12-12 lines in 2 locations

class/assessment_resultados.php 2 locations

@@ 190-201 (lines=12) @@
187
    /**
188
     * @param $respostasCertas
189
     */
190
    public function setRespostasCertasAsArray($respostasCertas)
191
    {
192
        $x = array();
193
        foreach ($respostasCertas as $chave => $valor) {
194
            if (!($chave == null)) {
195
                $x[] = $chave . '-' . $valor;
196
            }
197
        }
198
199
        $y = implode(',', $x);
200
        $this->setVar('resp_certas', $y);
201
    }
202
203
    /**
204
     * @param $respostasErradas
@@ 206-217 (lines=12) @@
203
    /**
204
     * @param $respostasErradas
205
     */
206
    public function setRespostasErradasAsArray($respostasErradas)
207
    {
208
        $x = array();
209
        foreach ($respostasErradas as $chave => $valor) {
210
            if (!($chave == null)) {
211
                $x[] = $chave . '-' . $valor;
212
            }
213
        }
214
215
        $y = implode(',', $x);
216
        $this->setVar('resp_erradas', $y);
217
    }
218
219
    /**
220
     * @param $cod_pergunta