Skip to content

Commit 695306e

Browse files
committed
Update SlapCommand.php
Code fixes
1 parent a63e8b5 commit 695306e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Commands/SlapCommand.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*
1010
*/
1111
namespace Longman\TelegramBot\Commands;
12+
1213
use Longman\TelegramBot\Request;
1314
use Longman\TelegramBot\Command;
1415
use Longman\TelegramBot\Entities\Update;
@@ -31,8 +32,10 @@ public function execute()
3132
$sender='@'.$message->getFrom()->getUsername();
3233

3334
//username validation
34-
$test=preg_match('/@[\w_]{5,}/',$text);
35-
if($test===0) return false;
35+
$test=preg_match('/@[\w_]{5,}/', $text);
36+
if ($test===0) {
37+
return false;
38+
}
3639

3740
$data = array();
3841
$data['chat_id'] = $chat_id;

0 commit comments

Comments
 (0)