[buddypress-trac] [BuddyPress Trac] #7228: Add PHPCS

buddypress-trac noreply at wordpress.org
Sun Feb 18 12:49:30 UTC 2018


#7228: Add PHPCS
------------------------------+-------------------------------------
 Reporter:  DJPaul            |       Owner:
     Type:  enhancement       |      Status:  reopened
 Priority:  normal            |   Milestone:  Awaiting Contributions
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:                    |
------------------------------+-------------------------------------

Comment (by DJPaul):

 To help audit the Nouveau templates, I've ran a modified version of WP's
 PHPCS config on it. My current config is at
 https://gist.github.com/paulgibbs/9d6c1f1cfc5d4765852c0e38a711e1e5

 There are some temporary rule exclusions purely to make the rest more
 manageable, but there's still a bunch of style issues I'm not sure what
 the correct way to resolve.

 e.g. the indentation for the paired template "bp_get_x" functions, and:


 {{{
 -                               $data = wp_parse_args( $style, array(
 -                                       'dependencies' => array(),
 -                                       'version'      => $this->version,
 -                                       'type'         => 'screen',
 -                               ) );
 +                               $data = wp_parse_args(
 +                                       $style, array(
 +                                               'dependencies' => array(),
 +                                               'version'      =>
 $this->version,
 +                                               'type'         =>
 'screen',
 +                                       )
 +                               );
 }}}

 {{{
 -<h2 class="bp-screen-title <?php if ( bp_is_group_create() ) { echo
 esc_attr( 'creation-step-name' ); } ?>">
 +<h2 class="bp-screen-title
 +<?php
 +if ( bp_is_group_create() ) {
 +       echo esc_attr( 'creation-step-name' );
 +}
 +?>
 +">
 }}}

 This is not going to be a trivial thing to adopt to BuddyPress.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7228#comment:10>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list