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/taxonomy/getObjectTaxonomies.php

    r38292 r42343  
    1111
    1212    public function test_object_should_accept_string() {
    13         $found = get_object_taxonomies( 'wptests_pt' );
     13        $found    = get_object_taxonomies( 'wptests_pt' );
    1414        $expected = array( 'wptests_tax' );
    1515
     
    1818
    1919    public function test_object_should_accept_array_of_post_type_names() {
    20         $found = get_object_taxonomies( array( 'wptests_pt' ) );
     20        $found    = get_object_taxonomies( array( 'wptests_pt' ) );
    2121        $expected = array( 'wptests_tax' );
    2222
     
    2525
    2626    public function test_object_should_accept_post_object() {
    27         $p = self::factory()->post->create_and_get( array( 'post_type' => 'wptests_pt' ) );
    28         $found = get_object_taxonomies( $p );
     27        $p        = self::factory()->post->create_and_get( array( 'post_type' => 'wptests_pt' ) );
     28        $found    = get_object_taxonomies( $p );
    2929        $expected = array( 'wptests_tax' );
    3030
     
    4141
    4242    public function test_any_value_of_output_other_than_names_should_return_objects() {
    43         $found = get_object_taxonomies( 'wptests_pt', 'foo' );
     43        $found    = get_object_taxonomies( 'wptests_pt', 'foo' );
    4444        $expected = get_object_taxonomies( 'wptests_pt', 'objects' );
    4545
     
    5353        register_taxonomy( 'wptests_tax2', 'attachment:image' );
    5454
    55         $a = self::factory()->attachment->create_object( 'image.jpg', 0, array(
    56             'post_mime_type' => 'image/jpeg',
    57             'post_type' => 'attachment'
    58         ) );
     55        $a          = self::factory()->attachment->create_object(
     56            'image.jpg', 0, array(
     57                'post_mime_type' => 'image/jpeg',
     58                'post_type'      => 'attachment',
     59            )
     60        );
    5961        $attachment = get_post( $a );
    6062
     
    7072        register_taxonomy( 'wptests_tax2', 'attachment:image' );
    7173
    72         $a = self::factory()->attachment->create_object( 'image.jpg', 0, array(
    73             'post_mime_type' => 'image/jpeg',
    74             'post_type' => 'attachment'
    75         ) );
     74        $a          = self::factory()->attachment->create_object(
     75            'image.jpg', 0, array(
     76                'post_mime_type' => 'image/jpeg',
     77                'post_type'      => 'attachment',
     78            )
     79        );
    7680        $attachment = get_post( $a );
    7781
Note: See TracChangeset for help on using the changeset viewer.