viber-bot-php icon indicating copy to clipboard operation
viber-bot-php copied to clipboard

There is a problem with return types while extending Bot class

Open Vanawy opened this issue 5 years ago • 0 comments

I extend Bot class then add new onSomething method. I call one of default on methods and then I call child method onSomething Intellisense tells there is no method 'onSomething' because in Bot class in all 'on' methods return type is Bot.

I suggest to change return type to self instead of \Viber\Bot

Vanawy avatar Sep 25 '20 09:09 Vanawy