Skip to content

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

Closed
wants to merge 5 commits into from

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Aug 5, 2020

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.

run-tests.php Outdated
@@ -1665,6 +1685,9 @@ function kill_children(array $children)
}
}

/**
* @return true|void
*/
Copy link
Member

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.

Copy link
Member Author

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.

@Girgias Girgias force-pushed the type-declarations-test-runner branch from ea2a67a to 7bdc401 Compare August 6, 2020 11:51
Copy link
Member

@nikic nikic left a 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;
Copy link
Contributor

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 :)

Copy link
Member Author

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.

@php-pulls php-pulls closed this in 11274f5 Aug 6, 2020
@Girgias Girgias deleted the type-declarations-test-runner branch August 6, 2020 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants