google2fa icon indicating copy to clipboard operation
google2fa copied to clipboard

PHPStan level 9 with bleeding edge

Open spaze opened this issue 11 months ago • 0 comments

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.

spaze avatar Feb 29 '24 02:02 spaze