WordPress.org

Make WordPress Core


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

    r38398 r42343  
    1010
    1111    public static function wpSetUpBeforeClass( $factory ) {
    12         self::$user_id = $factory->user->create( array(
    13             'role' => 'author',
    14             'user_login' => 'count_user_posts_user',
    15             'user_email' => 'count_user_posts_user@example.com',
    16         ) );
     12        self::$user_id = $factory->user->create(
     13            array(
     14                'role'       => 'author',
     15                'user_login' => 'count_user_posts_user',
     16                'user_email' => 'count_user_posts_user@example.com',
     17            )
     18        );
    1719
    18         self::$post_ids = $factory->post->create_many( 4, array(
    19             'post_author' => self::$user_id,
    20             'post_type'   => 'post',
    21         ) );
    22         self::$post_ids = array_merge( self::$post_ids, $factory->post->create_many( 3, array(
    23             'post_author' => self::$user_id,
    24             'post_type'   => 'wptests_pt',
    25         ) ) );
    26         self::$post_ids = array_merge( self::$post_ids, $factory->post->create_many( 2, array(
    27             'post_author' => 12345,
    28             'post_type'   => 'wptests_pt',
    29         ) ) );
     20        self::$post_ids = $factory->post->create_many(
     21            4, array(
     22                'post_author' => self::$user_id,
     23                'post_type'   => 'post',
     24            )
     25        );
     26        self::$post_ids = array_merge(
     27            self::$post_ids, $factory->post->create_many(
     28                3, array(
     29                    'post_author' => self::$user_id,
     30                    'post_type'   => 'wptests_pt',
     31                )
     32            )
     33        );
     34        self::$post_ids = array_merge(
     35            self::$post_ids, $factory->post->create_many(
     36                2, array(
     37                    'post_author' => 12345,
     38                    'post_type'   => 'wptests_pt',
     39                )
     40            )
     41        );
    3042
    31         self::$post_ids[] = $factory->post->create( array(
    32             'post_author' => 12345,
    33             'post_type'   => 'wptests_pt',
    34         ) );
     43        self::$post_ids[] = $factory->post->create(
     44            array(
     45                'post_author' => 12345,
     46                'post_type'   => 'wptests_pt',
     47            )
     48        );
    3549    }
    3650
Note: See TracChangeset for help on using the changeset viewer.