WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (3 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/applyFilters.php

    r42200 r42343  
    99
    1010    public function test_apply_filters_with_callback() {
    11         $a = new MockAction();
    12         $callback = array( $a, 'filter' );
    13         $hook = new WP_Hook();
    14         $tag = __FUNCTION__;
    15         $priority = rand( 1, 100 );
     11        $a             = new MockAction();
     12        $callback      = array( $a, 'filter' );
     13        $hook          = new WP_Hook();
     14        $tag           = __FUNCTION__;
     15        $priority      = rand( 1, 100 );
    1616        $accepted_args = rand( 1, 100 );
    17         $arg = __FUNCTION__ . '_arg';
     17        $arg           = __FUNCTION__ . '_arg';
    1818
    1919        $hook->add_filter( $tag, $callback, $priority, $accepted_args );
     
    2626
    2727    public function test_apply_filters_with_multiple_calls() {
    28         $a = new MockAction();
    29         $callback = array( $a, 'filter' );
    30         $hook = new WP_Hook();
    31         $tag = __FUNCTION__;
    32         $priority = rand( 1, 100 );
     28        $a             = new MockAction();
     29        $callback      = array( $a, 'filter' );
     30        $hook          = new WP_Hook();
     31        $tag           = __FUNCTION__;
     32        $priority      = rand( 1, 100 );
    3333        $accepted_args = rand( 1, 100 );
    34         $arg = __FUNCTION__ . '_arg';
     34        $arg           = __FUNCTION__ . '_arg';
    3535
    3636        $hook->add_filter( $tag, $callback, $priority, $accepted_args );
Note: See TracChangeset for help on using the changeset viewer.