Skip to content

InlineKeyboard with constructor parameters #1239

Closed
@TiiFuchs

Description

@TiiFuchs

It's currently not that transparent without reading the documentation how to construct a InlineKeyboard. This is mostly because the __construct of InlineKeyboard (respectively Keyboard) uses func_get_args() to get the parameters.
An IDE like PhpStorm is unable to hint this.

A better approach would be to use

public function __construct(...$rows)

to give a hint that every Keyboard row can be passed via multiple parameters.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions