google2fa
google2fa copied to clipboard
PHPStan level 9 with bleeding edge
Update PHPStan level to 9/max with bleeding edge. You can't go any higher :-) #172 inspired me to do this, to make sure the types are correct throughout the lib.
Native types could be used instead of docblocks if support for older PHP version is dropped, but first I wanted to make sure the lib is on a highest possible PHPStan level to make adding native types a bit safer. Can add them in a next PR once this is merged for example.
This branch is based on #196 branch to make tests run on all PHP versions, probably should be rebased before merging, can take care of that.
I'm not sure what to do with the failing Style CI test that wants me to update a preexisting code like this:
- exit();
+ exit;
I can update it if it looks like what's expected.