Opened 3 years ago
Closed 3 years ago
#57527 closed enhancement (fixed)
Duotone: PHP code quality improvements
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.2 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Editor | Keywords: | has-patch gutenberg-merge commit |
| Focuses: | performance | Cc: |
Description (last modified by )
PHP code quality improvements:
- Use in/decrementors where appropriate.
Why? They're more performant than an assignment with a calculation.
See https://github.com/WordPress/gutenberg/pull/44551.
- Don't check if constants set by
wp_initial_constants()are defined.
This reduces the number of defined() calls for constants which are always set. Why? wp_initial_constants() makes sure that all the default constants are set.
See https://github.com/WordPress/gutenberg/pull/45979.
Change History (9)
This ticket was mentioned in PR #3890 on WordPress/wordpress-develop by @Mamaduka.
3 years ago
#1
- Keywords has-patch added
@Mamaduka commented on PR #3890:
3 years ago
#3
cc @hellofromtonya
#4
@
3 years ago
- Description modified (diff)
- Focuses performance added
- Keywords gutenberg-merge added
- Owner set to hellofromTonya
- Status changed from new to reviewing
- Summary changed from Duotone: Two minor code quality fixes to Duotone: PHP code quality improvements
#5
@
3 years ago
- Keywords commit added
Self-assigning for commit. Planning to do 2 separate atomic commits to capture the context of why each improvement is being made.
@hellofromTonya commented on PR #3890:
3 years ago
#8
Both atomic commits where committed via changesets https://core.trac.wordpress.org/changeset/55140 and https://core.trac.wordpress.org/changeset/55140.
Trac ticket: https://core.trac.wordpress.org/ticket/57527
Related Gutenberg PR:
Props @jrfnl, @ocean90