Completed
Push — master ( 5bf4c0...313184 )
by Kirill
02:02
created
src/Chrl/AppBundle/Service/GameService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.