@@ -36,13 +36,13 @@ discard block |
||
| 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 |
||
| 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 | { |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Serialize; |
| 3 | 3 | |
| 4 | -require_once dirname(__FILE__) . '/../libs/PHPExcel/Classes/PHPExcel.php'; |
|
| 4 | +require_once dirname(__FILE__).'/../libs/PHPExcel/Classes/PHPExcel.php'; |
|
| 5 | 5 | |
| 6 | 6 | class ExcelSerializer extends SpreadSheetSerializer |
| 7 | 7 | { |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | for($j = 0; $j < $colCount; $j++) |
| 33 | 33 | { |
| 34 | 34 | $colName = $keys[$j]; |
| 35 | - $sheat->setCellValueByColumnAndRow($j, 2+$i, $data[$i][$j]); |
|
| 35 | + $sheat->setCellValueByColumnAndRow($j, 2 + $i, $data[$i][$j]); |
|
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | if(strcasecmp($type, 'xlsx') === 0 || strcasecmp($type, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') === 0) |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | /** Only load the HTTPFul bootstrap if it isn't already loaded*/ |
| 17 | 17 | if(!class_exists('Httpful\Request')) |
| 18 | 18 | { |
| 19 | - require dirname(__FILE__) . '/../../libs/httpful/bootstrap.php'; |
|
| 19 | + require dirname(__FILE__).'/../../libs/httpful/bootstrap.php'; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Auth; |
| 3 | -require dirname(__FILE__) . '/../libs/google/src/Google/autoload.php'; |
|
| 3 | +require dirname(__FILE__).'/../libs/google/src/Google/autoload.php'; |
|
| 4 | 4 | |
| 5 | 5 | class GoogleAuthenticator extends Authenticator |
| 6 | 6 | {
|
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | public function authenticate($code, &$currentUser = false) |
| 35 | 35 | {
|
| 36 | 36 | $googleUser = false; |
| 37 | - try{
|
|
| 37 | + try {
|
|
| 38 | 38 | $this->client->authenticate($code); |
| 39 | 39 | $this->token = $this->client->getAccessToken(); |
| 40 | 40 | \FlipSession::setVar('GoogleToken', $this->token);
|
@@ -134,9 +134,9 @@ |
||
| 134 | 134 | $tmp = array(); |
| 135 | 135 | foreach($sort as $sort_col=>$dir) |
| 136 | 136 | { |
| 137 | - array_push($tmp, $sort_col.' '.($dir === 1? 'ASC' : 'DESC')); |
|
| 137 | + array_push($tmp, $sort_col.' '.($dir === 1 ? 'ASC' : 'DESC')); |
|
| 138 | 138 | } |
| 139 | - $sql .= implode($tmp,','); |
|
| 139 | + $sql .= implode($tmp, ','); |
|
| 140 | 140 | } |
| 141 | 141 | $stmt = $this->pdo->query($sql, \PDO::FETCH_ASSOC); |
| 142 | 142 | if($stmt === false) |