[wp-trac] [WordPress Trac] #52072: Twenty Twenty-One: Immediately return expression instead of assigning it to the temporary variable
WordPress Trac
noreply at wordpress.org
Tue Dec 15 00:27:12 UTC 2020
#52072: Twenty Twenty-One: Immediately return expression instead of assigning it to
the temporary variable
-----------------------------------------+-------------------------------
Reporter: manzurahammed | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: 5.6
Severity: normal | Resolution:
Keywords: has-patch close 2nd-opinion | Focuses: coding-standards
-----------------------------------------+-------------------------------
Changes (by SergeyBiryukov):
* keywords: has-patch => has-patch close 2nd-opinion
* component: General => Bundled Theme
Comment:
Hi there, welcome to WordPress Trac! Thanks for the patch.
The existing code seems fine as is to me. It's a bit more readable, as
variables like `$calendar_output` describe the purpose of the code, and
also a bit more future-proof in case these lines need any additional
adjustments in the future.
I don't think any changes are needed here for now.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52072#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list