Closed franmomu closed 2 years ago
- Adding parameter type declarations which makes
InvalidArgumentException.php
not necessary since using other type thanstring
would result in anError
.
Looks good to me, makes sense.
- Add
strict_types
to every file.
I think this doesn't change much since we make no calls to code other than our own. Doesn't hurt.
- Make
ISO3166::$countries
static as suggested by PHPStorm since the array is quite heavy.
In what scenario does this actually provide any gain though? I have considered it myself as well, but I know too little of PHP internals to know the difference/impact of this change.
In what scenario does this actually provide any gain though? I have considered it myself as well, but I know too little of PHP internals to know the difference/impact of this change.
It was suggested by PHPStorm, I guess it uses less memory across instances, but I don't know for sure. So let's keep it as it was until we find a reason.
Thanks again for your contribution, much appreciated :-)
I may went too far, just let me know and I'll modify the PR, the changes are:
InvalidArgumentException.php
not necessary since using other type thanstring
would result in anError
.strict_types
to every file. ~- MakeISO3166::$countries
static as suggested by PHPStorm since the array is quite heavy.~