scientist
scientist copied to clipboard
Better explain the code using actual type hints
I was trying to figure out what Report->getTrial() would return, which was quite difficult since it was hidden deep down. So I felt it would be nice to add type hints to the project.
I only added type hints which are compatible with php 7.3, as defined in the composer.json. Further improvements could be made by requiring php 7.4 (to add type hints for class properties) or php 8.0 (to add type hint mixed). Both don't feel really important atm. But if we anyway are okay with bumping the required php version, I could start another PR for adding those as well.
All tests are green on a php 7.3 docker.