Completed
Push — master ( 89c1e6...70f342 )
by Patrick
03:41
created
class.FlipsideCAPTCHA.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $dataset = DataSetFactory::getDataSetByName('profiles');
38 38
         $datatable = $dataset['captcha'];
39
-        return $datatable->create(array('question'=>$question,'hint'=>$hint,'answer'=>$answer));
39
+        return $datatable->create(array('question'=>$question, 'hint'=>$hint, 'answer'=>$answer));
40 40
     }
41 41
 
42 42
     public function __construct()
43 43
     {
44 44
         $this->validIDs = FlipsideCAPTCHA::get_valid_captcha_ids();
45
-        $this->random_id = mt_rand(0, count($this->validIDs)-1);
45
+        $this->random_id = mt_rand(0, count($this->validIDs) - 1);
46 46
         $this->random_id = $this->validIDs[$this->random_id];
47 47
     }
48 48
 
@@ -84,22 +84,22 @@  discard block
 block discarded – undo
84 84
 
85 85
     public function is_answer_right($answer)
86 86
     {
87
-        return strcasecmp($this->get_answer(),$answer) == 0;
87
+        return strcasecmp($this->get_answer(), $answer) == 0;
88 88
     }
89 89
 
90
-    public function draw_captcha($explination=true, $return=false, $ownForm=false)
90
+    public function draw_captcha($explination = true, $return = false, $ownForm = false)
91 91
     {
92 92
         $string = '';
93 93
 
94 94
         if($ownForm)
95 95
         {
96
-            $string.= '<form id="flipcaptcha" name="flipcaptcha">';
96
+            $string .= '<form id="flipcaptcha" name="flipcaptcha">';
97 97
         }
98 98
 
99 99
         $string .= '<label for="captcha" class="col-sm-2 control-label">'.$this->get_question().'</label><div class="col-sm-10"><input class="form-control" type="text" id="captcha" name="captcha" placeholder="'.$this->get_hint().'" required/></div>';
100 100
         if($ownForm)
101 101
         {
102
-            $string.='</form>';
102
+            $string .= '</form>';
103 103
         }
104 104
         if($explination)
105 105
         {
Please login to merge, or discard this patch.