Skip to content

PHPStan level 6 #536

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

PHPStan level 6 #536

wants to merge 6 commits into from

Conversation

swissspidy
Copy link
Member

No description provided.

@swissspidy swissspidy force-pushed the add/phpstan branch 2 times, most recently from 8f14b59 to 7a36e2a Compare May 18, 2025 12:16
*/
protected function _url( $args, $callback ) {
foreach ( $args as $obj_id ) {
$object = $this->fetcher->get_check( $obj_id );
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fetcher property didn't even exist on this abstract class, and in the extending classes it was private. So this code never worked. Plus it was never used, so it's safe to remove.

@@ -182,10 +182,6 @@ public function create( $args, $assoc_args ) {
$assoc_args['post_category'] = $this->get_category_ids( $assoc_args['post_category'] );
}

if ( isset( $assoc_args['meta_input'] ) && Utils\wp_version_compare( '4.4', '<' ) ) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figured with our move to WP 4.9+ we can remove this compat code.

Copy link

codecov bot commented May 18, 2025

Codecov Report

Attention: Patch coverage is 87.67123% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/User_Command.php 72.22% 5 Missing ⚠️
src/Term_Command.php 88.23% 2 Missing ⚠️
src/Menu_Command.php 0.00% 1 Missing ⚠️
src/Site_Command.php 75.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Comment on lines +325 to +326
? $a->$orderby <=> $b->$orderby
: $b->$orderby <=> $a->$orderby;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope this is not the wrong way around 🤔

@swissspidy swissspidy marked this pull request as ready for review May 18, 2025 13:16
@swissspidy swissspidy requested a review from a team as a code owner May 18, 2025 13:16
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant