-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add type information to test-runner #5942
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
Conversation
run-tests.php
Outdated
@@ -1665,6 +1685,9 @@ function kill_children(array $children) | |||
} | |||
} | |||
|
|||
/** | |||
* @return true|void | |||
*/ |
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.
Where does the true
come from? Should be just void.
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.
From line 1712, but will change that to void then.
ea2a67a
to
7bdc401
Compare
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.
LG assuming CI passes.
run-tests.php
Outdated
@@ -1706,7 +1706,7 @@ function run_worker(): void | |||
]); | |||
} | |||
|
|||
return; | |||
return true; |
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.
You can add a return type to anonys. functions as well. The one on line 1702 is an example :)
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.
Did that in the, hopefully, final pass.
I've bumped the minimal PHP version to 7.1.0 such that the
void
return type can be used.This should help with refactoring and making it less dependable on global state, if this is something we want to pursue.