Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add constants for available string values #107

Closed
kavnik opened this issue Jul 25, 2019 · 2 comments
Closed

Add constants for available string values #107

kavnik opened this issue Jul 25, 2019 · 2 comments

Comments

@kavnik
Copy link

kavnik commented Jul 25, 2019

There are no enums in PHP, but it might be useful to add constants for available string values.

For example, in sendChatAction there is a parameter action with available values:
typing, upload_photo , record_video etc.

For this values it's possible to add constants in SendChatAction class:
const TYPE_TYPING = 'typing';
const TYPE_UPLOAD_PHOTO = 'upload_photo';
...

IDE will allow you to avoid typos and will give a prompt with autocomplete.

@unreal4u
Copy link
Owner

Hi @kavnik : This is certainly possible and also a good idea 👍

You can shoot in a PR or wait until I got time to implement it (which will possibly be tonight)

unreal4u pushed a commit that referenced this issue Jul 31, 2019
@unreal4u
Copy link
Owner

Implemented in v3.6.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@unreal4u @kavnik and others