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/updateUserCaches.php

    r35242 r42343  
    88        global $wpdb;
    99
    10         $u = self::factory()->user->create();
     10        $u            = self::factory()->user->create();
    1111        $raw_userdata = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->users WHERE ID = %d", $u ) );
    1212
     
    1717
    1818    public function test_should_store_user_id_in_userlogins_bucket() {
    19         $data = new stdClass();
    20         $data->ID = 12345;
    21         $data->user_login = 'foo';
    22         $data->user_email = 'foo@example.com';
     19        $data                = new stdClass();
     20        $data->ID            = 12345;
     21        $data->user_login    = 'foo';
     22        $data->user_email    = 'foo@example.com';
    2323        $data->user_nicename = 'bar';
    2424
     
    2929
    3030    public function test_should_store_user_id_in_useremail_bucket() {
    31         $data = new stdClass();
    32         $data->ID = 12345;
    33         $data->user_login = 'foo';
    34         $data->user_email = 'foo@example.com';
     31        $data                = new stdClass();
     32        $data->ID            = 12345;
     33        $data->user_login    = 'foo';
     34        $data->user_email    = 'foo@example.com';
    3535        $data->user_nicename = 'bar';
    3636
     
    4141
    4242    public function test_should_store_user_id_in_userslugs_bucket() {
    43         $data = new stdClass();
    44         $data->ID = 12345;
    45         $data->user_login = 'foo';
    46         $data->user_email = 'foo@example.com';
     43        $data                = new stdClass();
     44        $data->ID            = 12345;
     45        $data->user_login    = 'foo';
     46        $data->user_email    = 'foo@example.com';
    4747        $data->user_nicename = 'bar';
    4848
     
    5858        global $wpdb;
    5959
    60         $u = self::factory()->user->create();
     60        $u            = self::factory()->user->create();
    6161        $raw_userdata = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->users WHERE ID = %d", $u ) );
    62         $user_object = new WP_User( $u );
     62        $user_object  = new WP_User( $u );
    6363
    6464        update_user_caches( $user_object );
Note: See TracChangeset for help on using the changeset viewer.