WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (3 years ago)
Author:
pento
Message:

Coding Standards: Upgrade WPCS to 1.0.0

WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:

  • Multiline function calls must now put each parameter on a new line.
  • Auto-formatting files is now part of the grunt precommit script.
  • Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/query.php

    r42594 r43571  
    180180        $file       = DIR_TESTDATA . '/images/canola.jpg';
    181181        $att_ids[1] = self::factory()->attachment->create_object(
    182             $file, $post_id, array(
     182            $file,
     183            $post_id,
     184            array(
    183185                'post_mime_type' => 'image/jpeg',
    184186                'menu_order'     => rand( 1, 100 ),
     
    186188        );
    187189        $att_ids[2] = self::factory()->attachment->create_object(
    188             $file, $post_id, array(
     190            $file,
     191            $post_id,
     192            array(
    189193                'post_mime_type' => 'image/jpeg',
    190194                'menu_order'     => rand( 1, 100 ),
     
    192196        );
    193197        $att_ids[3] = self::factory()->attachment->create_object(
    194             $file, $post_id, array(
     198            $file,
     199            $post_id,
     200            array(
    195201                'post_mime_type' => 'image/jpeg',
    196202                'menu_order'     => rand( 1, 100 ),
     
    198204        );
    199205        $att_ids[4] = self::factory()->attachment->create_object(
    200             $file, $post_id, array(
     206            $file,
     207            $post_id,
     208            array(
    201209                'post_mime_type' => 'image/jpeg',
    202210                'menu_order'     => rand( 1, 100 ),
     
    204212        );
    205213        $att_ids[5] = self::factory()->attachment->create_object(
    206             $file, $post_id, array(
     214            $file,
     215            $post_id,
     216            array(
    207217                'post_mime_type' => 'image/jpeg',
    208218                'menu_order'     => rand( 1, 100 ),
Note: See TracChangeset for help on using the changeset viewer.