[wp-trac] [WordPress Trac] #41057: Update PHP codebase per WordPress PHP Coding Standards
WordPress Trac
noreply at wordpress.org
Sat Jun 24 07:40:21 UTC 2017
#41057: Update PHP codebase per WordPress PHP Coding Standards
----------------------------+-----------------------
Reporter: netweb | Owner: pento
Type: task (blessed) | Status: accepted
Priority: normal | Milestone: 4.9
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+-----------------------
Comment (by pento):
WPCS currently doesn't change whether a `break` is aligned with it's
`case`, or indented from it. The format isn't defined in the coding
standards, the normal usage for core is to indent the `break` one tab from
the `case` statement.
{{{
$ ag --php --stats '^(\t*)case(.*\n){0,5}\1break' wp-includes/ wp-admin/ |
ag '^\d+ matches$'
34 matches
$ ag --php --stats '^(\t*)case(.*\n){0,5}\1\tbreak' wp-includes/ wp-admin/
| ag '^\d+ matches$'
613 matches
}}}
Any objections to formalising the latter as the correct standard?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41057#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list