Opened 4 years ago
Closed 4 years ago
#52072 closed defect (bug) (wontfix)
Twenty Twenty-One: Immediately return expression instead of assigning it to the temporary variable
Reported by: | manzurahammed | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.6 |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | coding-standards | Cc: |
Description
Immediately return expression instead of assigning it to the temporary variable
Attachments (1)
Change History (4)
#2
@
4 years ago
- Component changed from General to Bundled Theme
- Keywords close 2nd-opinion added
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.
Note: See
TracTickets for help on using
tickets.
Hi!
Can you add some context and explaination to why you consider the original code a bug, and the reason for the changes?