Code Duplication    Length = 6-6 lines in 2 locations

class/Faq.php 2 locations

@@ 378-383 (lines=6) @@
375
    {
376
        $answerHandler = new Smartfaq\AnswerHandler($this->db);
377
        switch ($this->status()) {
378
            case Constants::SF_STATUS_SUBMITTED:
379
                $theAnswers = $answerHandler->getAllAnswers($this->faqid(), Constants::SF_AN_STATUS_APPROVED, 1, 0);
380
                //echo "test";
381
                //exit;
382
                $this->answer =& $theAnswers[0];
383
                break;
384
385
            case Constants::SF_STATUS_ANSWERED:
386
                $theAnswers = $answerHandler->getAllAnswers($this->faqid(), Constants::SF_AN_STATUS_PROPOSED, 1, 0);
@@ 385-390 (lines=6) @@
382
                $this->answer =& $theAnswers[0];
383
                break;
384
385
            case Constants::SF_STATUS_ANSWERED:
386
                $theAnswers = $answerHandler->getAllAnswers($this->faqid(), Constants::SF_AN_STATUS_PROPOSED, 1, 0);
387
                //echo "test";
388
                //exit;
389
                $this->answer =& $theAnswers[0];
390
                break;
391
392
            case Constants::SF_STATUS_PUBLISHED:
393
            case Constants::SF_STATUS_NEW_ANSWER: