Type Hinting
Type declarations enable you to keep your code consistent and predictable. But not only that, they will also reduce the amount of code that you need to write because you no longer will need to check that your arguments are of the right type.
PHP will also throw an error on our behalf if the wrong type is passed. Type hints are a good thing and you should use them.
Branch: https://github.com/GaryClarke/learn-oophp/tree/7-type-hinting
4 comments