From 1adf272d2a74955e905b6fe42ea628fb0b9fb8fe Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 21 Dec 2018 19:50:06 +0700 Subject: [PATCH] Add type declaration to reply_user --- src/entryPoint.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/entryPoint.php b/src/entryPoint.php index bdfe533..4aa16b2 100644 --- a/src/entryPoint.php +++ b/src/entryPoint.php @@ -18,12 +18,13 @@ $handlers = array( new TestHandler() ); -function reply_user($room_id, $msgid, $message, $room_lang) +function reply_user(int $room_id, int $msgid, string $message, $room_lang): bool { global $handlers; foreach ($handlers as $handler) { if($handler->TryHandle($room_id, $msgid, $message, $room_lang)) { - break; + return true; } } + return false; } \ No newline at end of file