Skip to content

Conversation

@westonruter
Copy link
Member

See Core-58874.

I only found one instance.

@westonruter westonruter added the [Type] Enhancement A suggestion for improvement of an existing feature label Jan 9, 2026
@westonruter westonruter added [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) no milestone PRs that do not have a defined milestone for release skip changelog PRs that should not be mentioned in changelogs labels Jan 9, 2026
@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.17%. Comparing base (49f2d7a) to head (d073f86).
⚠️ Report is 2 commits behind head on trunk.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk    #2339   +/-   ##
=======================================
  Coverage   69.17%   69.17%           
=======================================
  Files          90       90           
  Lines        7696     7696           
=======================================
  Hits         5324     5324           
  Misses       2372     2372           
Flag Coverage Δ
multisite 69.17% <100.00%> (ø)
single 35.35% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: westonruter <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes code style by replacing a ternary operator with the null coalescing operator (??) for better readability and consistency with modern PHP best practices.

Changes:

  • Replaced isset() ternary pattern with null coalescing operator on line 159

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 157 to 158
$height = isset( $size_data['height'] ) ? (int) $size_data['height'] : 0;
$width = isset( $size_data['width'] ) ? (int) $size_data['width'] : 0;
Copy link

Copilot AI Jan 10, 2026

Choose a reason for hiding this comment

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

For consistency with the updated line 159, lines 157-158 should also use the null coalescing operator since they follow the same pattern. However, note that lines 157-158 include type casting to (int), so they should be updated to maintain that casting:

  • Line 157: $height = (int) ($size_data['height'] ?? 0);
  • Line 158: $width = (int) ($size_data['width'] ?? 0);

This would make all three assignments consistent in style.

Suggested change
$height = isset( $size_data['height'] ) ? (int) $size_data['height'] : 0;
$width = isset( $size_data['width'] ) ? (int) $size_data['width'] : 0;
$height = (int) ( $size_data['height'] ?? 0 );
$width = (int) ( $size_data['width'] ?? 0 );

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no milestone PRs that do not have a defined milestone for release [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) skip changelog PRs that should not be mentioned in changelogs [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants