@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | if (mb_strtoupper($question->a1, 'UTF-8') == mb_strtoupper($message['text'], 'UTF-8')) { |
| 122 | 122 | // Correct answer! |
| 123 | 123 | |
| 124 | - $user->setPoints($user->getPoints()+$question->price); |
|
| 124 | + $user->setPoints($user->getPoints() + $question->price); |
|
| 125 | 125 | $this->em->persist($user); |
| 126 | 126 | |
| 127 | 127 | $this->botApi->sendMessage( |
@@ -142,15 +142,15 @@ discard block |
||
| 142 | 142 | $game->incorrectTries++; |
| 143 | 143 | $hint = $game->hint; |
| 144 | 144 | |
| 145 | - if (mb_substr_count($hint, '*', 'UTF-8') >= mb_strlen($hint, 'UTF-8')/2) { |
|
| 145 | + if (mb_substr_count($hint, '*', 'UTF-8') >= mb_strlen($hint, 'UTF-8') / 2) { |
|
| 146 | 146 | //tell hint |
| 147 | 147 | |
| 148 | - for ($t = 0; $t< mb_strlen($hint); $t++) { |
|
| 148 | + for ($t = 0; $t < mb_strlen($hint); $t++) { |
|
| 149 | 149 | if (mb_substr($hint, $t, 1, 'UTF-8') == '*') { |
| 150 | - if (rand(0, 1)==1) { |
|
| 150 | + if (rand(0, 1) == 1) { |
|
| 151 | 151 | $hint = mb_substr($hint, 0, $t, 'UTF-8') |
| 152 | 152 | .mb_substr($question->a1, $t, 1) |
| 153 | - .mb_substr($hint, $t+1); |
|
| 153 | + .mb_substr($hint, $t + 1); |
|
| 154 | 154 | break; |
| 155 | 155 | } |
| 156 | 156 | } |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | $this->botApi->sendMessage( |
| 205 | 205 | $game->chatId, |
| 206 | 206 | '*[question]* '. |
| 207 | - $question->text.' _('.mb_strlen($question->a1, 'UTF-8'). ' letters)_', |
|
| 207 | + $question->text.' _('.mb_strlen($question->a1, 'UTF-8').' letters)_', |
|
| 208 | 208 | 'markdown' |
| 209 | 209 | ); |
| 210 | 210 | } |