Make WordPress Core


Ignore:
Timestamp:
07/08/2019 12:55:20 AM (5 years ago)
Author:
pento
Message:

Coding Standards: Fix the remaining issues in /tests.

All PHP files in /tests now conform to the PHP coding standards, or have exceptions appropriately marked.

Travis now also runs phpcs on the /tests directory, any future changes to these files must conform entirely to the WordPress PHP coding standards. 🎉

See #47632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/wp-profiler.php

    r44915 r45607  
    115115        if ( $this->stack ) {
    116116            global $wp_actions;
    117             if ( $tag == end( $wp_actions ) ) {
    118                 @$this->stack[ count( $this->stack ) - 1 ]['actions'][ $tag ] ++;
     117            if ( end( $wp_actions ) === $tag ) {
     118                $this->stack[ count( $this->stack ) - 1 ]['actions'][ $tag ]++;
    119119            } else {
    120                 @$this->stack[ count( $this->stack ) - 1 ]['filters'][ $tag ] ++;
     120                $this->stack[ count( $this->stack ) - 1 ]['filters'][ $tag ]++;
    121121            }
    122122        }
     
    126126    public function log_action( $tag ) {
    127127        if ( $this->stack ) {
    128             @$this->stack[ count( $this->stack ) - 1 ]['actions'][ $tag ] ++;
     128            $this->stack[ count( $this->stack ) - 1 ]['actions'][ $tag ]++;
    129129        }
    130130    }
     
    145145            $sql = preg_replace( '/(WHERE \w+ =) \'\[-\w]+\'/', '$1 \'xxx\'', $sql );
    146146
    147             @$out[ $sql ] ++;
     147            $out[ $sql ] ++;
    148148        }
    149149        asort( $out );
     
    156156        foreach ( $queries as $q ) {
    157157            if ( empty( $q[2] ) ) {
    158                 @$out['unknown'] ++;
     158                $out['unknown']++;
    159159            } else {
    160                 @$out[ $q[2] ] ++;
     160                $out[ $q[2] ]++;
    161161            }
    162162        }
Note: See TracChangeset for help on using the changeset viewer.