Code Duplication    Length = 11-11 lines in 3 locations

class.FlipsideCAPTCHA.php 3 locations

@@ 48-58 (lines=11) @@
45
        $this->random_id = $this->validIDs[$this->random_id];
46
    }
47
48
    public function get_question()
49
    {
50
        $dataset = DataSetFactory::getDataSetByName('profiles');
51
        $datatable = $dataset['captcha'];
52
        $data = $datatable->read(new \Data\Filter('id eq '.$this->random_id), array('question'));
53
        if($data === false)
54
        {
55
            return false;
56
        }
57
        return $data[0]['question'];
58
    }
59
60
    public function get_hint()
61
    {
@@ 60-70 (lines=11) @@
57
        return $data[0]['question'];
58
    }
59
60
    public function get_hint()
61
    {
62
        $dataset = DataSetFactory::getDataSetByName('profiles');
63
        $datatable = $dataset['captcha'];
64
        $data = $datatable->read(new \Data\Filter('id eq '.$this->random_id), array('hint'));
65
        if($data === false)
66
        {
67
            return false;
68
        }
69
        return $data[0]['hint'];
70
    }
71
72
    private function get_answer()
73
    {
@@ 72-82 (lines=11) @@
69
        return $data[0]['hint'];
70
    }
71
72
    private function get_answer()
73
    {
74
        $dataset = DataSetFactory::getDataSetByName('profiles');
75
        $datatable = $dataset['captcha'];
76
        $data = $datatable->read(new \Data\Filter('id eq '.$this->random_id), array('answer'));
77
        if($data === false)
78
        {
79
            return false;
80
        }
81
        return $data[0]['answer'];
82
    }
83
84
    public function is_answer_right($answer)
85
    {