Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function run($message, $user) |
||
16 | { |
||
17 | $top = $this->gameService->getTopUsers(); |
||
18 | |||
19 | $text = 'Current top 10: '."\n"; |
||
20 | $i = 0; |
||
21 | |||
22 | foreach ($top as $user) { |
||
23 | $text .= ++$i.') '.$user['name']." (".$user['points']." points)\n"; |
||
24 | } |
||
25 | |||
26 | $this->botApi->sendMessage($message['chat']['id'], $text); |
||
27 | } |
||
28 | } |
||
29 |