Skip to content

There is a problem with return types while extending Bot class #94

@Vanawy

Description

@Vanawy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions