Position on scalar type checking?
Coleman's recent API4 PR to return values with their correct types made me realize that now that we have a PHP 7.0 requirement, we can start using type hinting for scalars.
I was wondering if this has been discussed yet, and if not, this can be the space for it. I'd be curious to hear the more active devs' positions on starting to use them in the codebase. Some questions to consider:
- Strong type-checking, or weak? Is it something that perhaps should be different for new vs. legacy classes?
- Do we want to implement Jenkins testing for type checking?
- Do we want to consider some sort of wholesale shift, like when we implemented code formatting standards? I just spotted this: https://github.com/dunglas/phpdoc-to-typehint