-
Notifications
You must be signed in to change notification settings - Fork 107
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
Update PHPStan level to 2 #1199
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
f4fec1f
to
7fd8cde
Compare
@@ -58,6 +58,13 @@ function dominant_color_get_dominant_color_data( $attachment_id ) { | |||
$file = get_attached_file( $attachment_id ); | |||
} | |||
add_filter( 'wp_image_editors', 'dominant_color_set_image_editors' ); | |||
|
|||
/** |
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.
/** | |
/* |
Seems it's local variable so do we needs to use multiline comment per https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments
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.
I don't think that's right. Without /**
then the phpdoc is not parsed.
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.
The docs you link to are talking about a regular multiline comment, not one that serves as a doc block.
See #775.
This fixes the following PHPStan issues:
Note that PHPStan is correctly identifying a bug here which could cause a fatal error in case another plugin is filtering
wp_image_editors
so that our specific subclasses are not used.