Make WordPress Core


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

    r37565 r42343  
    1010        $bookmarks = self::factory()->bookmark->create_many( 2 );
    1111
    12         $found1 = get_bookmarks( array(
    13             'orderby' => 'link_id',
    14         ) );
     12        $found1 = get_bookmarks(
     13            array(
     14                'orderby' => 'link_id',
     15            )
     16        );
    1517
    1618        $num_queries = $wpdb->num_queries;
    1719
    18         $found2 = get_bookmarks( array(
    19             'orderby' => 'link_id',
    20         ) );
     20        $found2 = get_bookmarks(
     21            array(
     22                'orderby' => 'link_id',
     23            )
     24        );
    2125
    2226        $this->assertEqualSets( $found1, $found2 );
     
    3034
    3135        // Prime cache.
    32         $found1 = get_bookmarks( array(
    33             'orderby' => 'link_id',
    34         ) );
     36        $found1 = get_bookmarks(
     37            array(
     38                'orderby' => 'link_id',
     39            )
     40        );
    3541
    3642        $num_queries = $wpdb->num_queries;
    3743
    38         $bookmarks[] = wp_insert_link( array(
    39             'link_name' => 'foo',
    40             'link_url' => 'http://example.com',
    41         ) );
     44        $bookmarks[] = wp_insert_link(
     45            array(
     46                'link_name' => 'foo',
     47                'link_url'  => 'http://example.com',
     48            )
     49        );
    4250
    43         $found2 = get_bookmarks( array(
    44             'orderby' => 'link_id',
    45         ) );
     51        $found2 = get_bookmarks(
     52            array(
     53                'orderby' => 'link_id',
     54            )
     55        );
    4656
    4757        $this->assertEqualSets( $bookmarks, wp_list_pluck( $found2, 'link_id' ) );
     
    5767        $bookmarks = self::factory()->bookmark->create_many( 2 );
    5868
    59         $found1 = get_bookmarks( array(
    60             'orderby' => 'rand',
    61         ) );
     69        $found1 = get_bookmarks(
     70            array(
     71                'orderby' => 'rand',
     72            )
     73        );
    6274
    6375        $num_queries = $wpdb->num_queries;
    6476
    65         $found2 = get_bookmarks( array(
    66             'orderby' => 'rand',
    67         ) );
     77        $found2 = get_bookmarks(
     78            array(
     79                'orderby' => 'rand',
     80            )
     81        );
    6882
    6983        // equal sets != same order
Note: See TracChangeset for help on using the changeset viewer.