Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (6 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/image/functions.php

    r42863 r43571  
    309309        $file = wp_crop_image(
    310310            DIR_TESTDATA . '/images/canola.jpg',
    311             0, 0, 100, 100, 100, 100
     311            0,
     312            0,
     313            100,
     314            100,
     315            100,
     316            100
    312317        );
    313318        $this->assertNotWPError( $file );
     
    332337        $file = wp_crop_image(
    333338            'https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg',
    334             0, 0, 100, 100, 100, 100, false,
     339            0,
     340            0,
     341            100,
     342            100,
     343            100,
     344            100,
     345            false,
    335346            DIR_TESTDATA . '/images/' . __FUNCTION__ . '.jpg'
    336347        );
     
    348359        $file = wp_crop_image(
    349360            DIR_TESTDATA . '/images/canoladoesnotexist.jpg',
    350             0, 0, 100, 100, 100, 100
     361            0,
     362            0,
     363            100,
     364            100,
     365            100,
     366            100
    351367        );
    352368        $this->assertInstanceOf( 'WP_Error', $file );
     
    360376        $file = wp_crop_image(
    361377            'https://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg',
    362             0, 0, 100, 100, 100, 100
     378            0,
     379            0,
     380            100,
     381            100,
     382            100,
     383            100
    363384        );
    364385        $this->assertInstanceOf( 'WP_Error', $file );
     
    378399        $file = wp_crop_image(
    379400            DIR_TESTDATA . '/images/canola.jpg',
    380             0, 0, 100, 100, 100, 100
     401            0,
     402            0,
     403            100,
     404            100,
     405            100,
     406            100
    381407        );
    382408        $this->assertInstanceOf( 'WP_Error', $file );
     
    399425
    400426        $attachment_id = $this->factory->attachment->create_object(
    401             $test_file, 0, array(
     427            $test_file,
     428            0,
     429            array(
    402430                'post_mime_type' => 'application/pdf',
    403431            )
     
    462490
    463491        $attachment_id = $this->factory->attachment->create_object(
    464             $test_file, 0, array(
     492            $test_file,
     493            0,
     494            array(
    465495                'post_mime_type' => 'application/pdf',
    466496            )
     
    520550
    521551        $attachment_id = $this->factory->attachment->create_object(
    522             $test_file, 0, array(
     552            $test_file,
     553            0,
     554            array(
    523555                'post_mime_type' => 'application/pdf',
    524556            )
     
    578610
    579611        $attachment_id = $this->factory->attachment->create_object(
    580             $pdf_path, 0, array(
     612            $pdf_path,
     613            0,
     614            array(
    581615                'post_mime_type' => 'application/pdf',
    582616            )
Note: See TracChangeset for help on using the changeset viewer.