Opened 6 years ago
Closed 6 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: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Bundled Theme | Version: | 5.6 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | coding-standards |
Description
Immediately return expression instead of assigning it to the temporary variable
Attachments (1)
Change History (4)
#2
@
6 years ago
- Component General → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi!
Can you add some context and explaination to why you consider the original code a bug, and the reason for the changes?