vinkla / hashids

A small PHP library to generate YouTube-like ids from numbers. Use it when you don't want to expose your database ids to the user.
https://hashids.org/php
MIT License
5.29k stars 417 forks source link

improve some types on phpdoc #190

Closed jamband closed 1 year ago

jamband commented 1 year ago

fixed a mistake in the type of the argument of the encode method. also, there was an error in the return value type of the decode method, so I fixed it.

array{} means an empty array. this is fine without it, but it makes it explicit that an empty array can also be returned. you can remove it if you don't like it.

vinkla commented 1 year ago

Thanks for the pull request Tomoki!

Maybe should we drop the blocks on the class and rely just on the ones from the interface instead? Like we do with the math interface.

jamband commented 1 year ago

@vinkla yes, it makes the phpdoc block cleaner :)

vinkla commented 1 year ago

Great! Would you mind removing the blocks in this PR?

jamband commented 1 year ago

i pushed again because I included unnecessary commits. would this be ok?

vinkla commented 1 year ago

Looks good! Thanks 🙌

szepeviktor commented 1 year ago

This is a great PR.