[wp-trac] [WordPress Trac] #49376: Adjust coding standards to always omit parenthesis for include/require statements

WordPress Trac noreply at wordpress.org
Thu Feb 6 15:00:37 UTC 2020


#49376: Adjust coding standards to always omit parenthesis for include/require
statements
------------------------------+-----------------------
 Reporter:  desrosj           |      Owner:  (none)
     Type:  task (blessed)    |     Status:  new
 Priority:  low               |  Milestone:  5.4
Component:  General           |    Version:
 Severity:  trivial           |   Keywords:  has-patch
  Focuses:  coding-standards  |
------------------------------+-----------------------
 This is a follow-up of #48082 and the changes committed in [47198].

 Now that all parenthesis have been removed from
 `include`/`include_once`/`require`/`require_once` statements, the PHCS
 configuration file should also be updated to enforce this until the sniff
 is moved from the `WordPress-Extra` ruleset to the `WordPress-Core`
 ruleset upstream in the [https://github.com/WordPress/WordPress-Coding-
 Standards WordPress Coding Standards] repo (pull request coming soon).

 Running this sniff on `trunk` today produces 4 errors, all of them are
 instances where two spaces are included after `return` and `echo`
 statements instead of one. These instances are all typos and should be
 fixed.

 The PHP coding standards in the handbook should also be updated to reflect
 that parenthesis should be omitted, and one space and one space only
 should follow these language constructs to satisfy this check.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49376>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list