More PHPStan level 6 cleanups, last of the *.php files - #1615
Merged
Conversation
cpeel
reviewed
Aug 31, 2026
| require_login(); | ||
|
|
||
| $verbose = get_integer_param($_GET, "verbose", 0, 0, 1); | ||
| $verbose = (bool) get_integer_param($_GET, "verbose", 0, 0, 1); |
Member
There was a problem hiding this comment.
Suggested change
| $verbose = (bool) get_integer_param($_GET, "verbose", 0, 0, 1); | |
| $verbose = get_bool_param($_GET, "verbose", false); |
Collaborator
Author
There was a problem hiding this comment.
Err... after some double checking, yes. There was some other place in the code where I didn't want to touch a 0/1 param because the value was being string interpolated into some form HTML and I didn't want to change the output. But casting it to bool like I did here would have that side effect anyway, and as it happens $verbose is never interpolated directly in this file. So... yes :)
cpeel
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some of this, in particular the
tools/project_manager/*.phpcode is a bit of a maze of arrays being passed around, and sometimes large lists of return values.I've done the minimum to add types and array shapes, but definitely more could be done.
This allows us to remove the rest of the
missingType.*warning suppressions inphpstan.neon.