Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (9 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/hooks/removeFilter.php

    r42200 r42343  
    99
    1010        public function test_remove_filter_with_function() {
    11                 $callback = '__return_null';
    12                 $hook = new WP_Hook();
    13                 $tag = __FUNCTION__;
    14                 $priority = rand( 1, 100 );
     11                $callback      = '__return_null';
     12                $hook          = new WP_Hook();
     13                $tag           = __FUNCTION__;
     14                $priority      = rand( 1, 100 );
    1515                $accepted_args = rand( 1, 100 );
    1616
    … …  
    2222
    2323        public function test_remove_filter_with_object() {
    24                 $a = new MockAction();
    25                 $callback = array( $a, 'action' );
    26                 $hook = new WP_Hook();
    27                 $tag = __FUNCTION__;
    28                 $priority = rand( 1, 100 );
     24                $a             = new MockAction();
     25                $callback      = array( $a, 'action' );
     26                $hook          = new WP_Hook();
     27                $tag           = __FUNCTION__;
     28                $priority      = rand( 1, 100 );
    2929                $accepted_args = rand( 1, 100 );
    3030
    … …  
    3636
    3737        public function test_remove_filter_with_static_method() {
    38                 $callback = array( 'MockAction', 'action' );
    39                 $hook = new WP_Hook();
    40                 $tag = __FUNCTION__;
    41                 $priority = rand( 1, 100 );
     38                $callback      = array( 'MockAction', 'action' );
     39                $hook          = new WP_Hook();
     40                $tag           = __FUNCTION__;
     41                $priority      = rand( 1, 100 );
    4242                $accepted_args = rand( 1, 100 );
    4343
    … …  
    4949
    5050        public function test_remove_filters_with_another_at_same_priority() {
    51                 $callback_one = '__return_null';
    52                 $callback_two = '__return_false';
    53                 $hook = new WP_Hook();
    54                 $tag = __FUNCTION__;
    55                 $priority = rand( 1, 100 );
     51                $callback_one  = '__return_null';
     52                $callback_two  = '__return_false';
     53                $hook          = new WP_Hook();
     54                $tag           = __FUNCTION__;
     55                $priority      = rand( 1, 100 );
    5656                $accepted_args = rand( 1, 100 );
    5757
    … …  
    6565
    6666        public function test_remove_filter_with_another_at_different_priority() {
    67                 $callback_one = '__return_null';
    68                 $callback_two = '__return_false';
    69                 $hook = new WP_Hook();
    70                 $tag = __FUNCTION__;
    71                 $priority = rand( 1, 100 );
     67                $callback_one  = '__return_null';
     68                $callback_two  = '__return_false';
     69                $hook          = new WP_Hook();
     70                $tag           = __FUNCTION__;
     71                $priority      = rand( 1, 100 );
    7272                $accepted_args = rand( 1, 100 );
    7373
Note: See TracChangeset for help on using the changeset viewer.