-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: PHP 7.2 GitHub workflows #44
base: master
Are you sure you want to change the base?
chore: PHP 7.2 GitHub workflows #44
Conversation
@ChristianRiesen this passes locally for me with PHP 7.4 Can you allow the GitHub workflows to run? CI is green here: |
@@ -307,7 +307,7 @@ private function getBinaryCounter($counter) | |||
*/ | |||
private function getTimecounter() | |||
{ | |||
return floor((time() + $this->totpOffset) / $this->period); | |||
return \intval(floor((time() + $this->totpOffset) / $this->period)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
floor
gives a float tpye that actually has an integer value. intval
()turns into into an actual
int` type, which is what the return type is supposed to be.
* @return number | ||
* @return int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This always returns an int
and never a float
(phpstan noticed this)
Use GitHub workflows for CI.
Just support PHP 7.2 and later.
php-cs-fixer 3.51 (latest)
get phpunit to pass locally (I used PHP 7.4 and phpunit 9.6.17)
get phpstan to pass locally (I used PHP 7.4 and phpstan 1.10.59)
IMO the code here should still work with PHP 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3
Related issue #40