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

PHP 8 Future Improvements #19

Open
rotexdegba opened this issue Jan 13, 2021 · 0 comments
Open

PHP 8 Future Improvements #19

rotexdegba opened this issue Jan 13, 2021 · 0 comments

Comments

@rotexdegba
Copy link
Member

rotexdegba commented Jan 13, 2021

  • Improve type hints by using Union Types or mixed where appropriate in the code base.
    • Run ./vendor/bin/psalm --show-info=true to get suggestions for where more type-hints are needed
  • Rather than returning instances of CollectionInterface in methods in \VersatileCollections\CollectionInterface try returning static
  • Try to see if constructors can be refactored so that we can do stuff like __construct(mixed ...$items) in GenericCollection & __construct(int ...$items) in IntsCollection, etc. If it works, we can get rid of the check type code in specialized collections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant