mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@43571 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -13,7 +13,9 @@ class WP_Test_REST_Request_Validation extends WP_Test_REST_TestCase {
|
||||
|
||||
public function test_validate_within_min_max_range_inclusive() {
|
||||
$request = new WP_REST_Request(
|
||||
'GET', '/wp/v2/foo', array(
|
||||
'GET',
|
||||
'/wp/v2/foo',
|
||||
array(
|
||||
'args' => array(
|
||||
'minmaxrange' => array(
|
||||
'type' => 'integer',
|
||||
@@ -35,7 +37,9 @@ class WP_Test_REST_Request_Validation extends WP_Test_REST_TestCase {
|
||||
|
||||
public function test_validate_within_min_max_range_min_exclusive() {
|
||||
$request = new WP_REST_Request(
|
||||
'GET', '/wp/v2/foo', array(
|
||||
'GET',
|
||||
'/wp/v2/foo',
|
||||
array(
|
||||
'args' => array(
|
||||
'minmaxrange' => array(
|
||||
'type' => 'integer',
|
||||
@@ -62,7 +66,9 @@ class WP_Test_REST_Request_Validation extends WP_Test_REST_TestCase {
|
||||
|
||||
public function test_validate_within_min_max_range_max_exclusive() {
|
||||
$request = new WP_REST_Request(
|
||||
'GET', '/wp/v2/foo', array(
|
||||
'GET',
|
||||
'/wp/v2/foo',
|
||||
array(
|
||||
'args' => array(
|
||||
'minmaxrange' => array(
|
||||
'type' => 'integer',
|
||||
@@ -89,7 +95,9 @@ class WP_Test_REST_Request_Validation extends WP_Test_REST_TestCase {
|
||||
|
||||
public function test_validate_within_min_max_range_both_exclusive() {
|
||||
$request = new WP_REST_Request(
|
||||
'GET', '/wp/v2/foo', array(
|
||||
'GET',
|
||||
'/wp/v2/foo',
|
||||
array(
|
||||
'args' => array(
|
||||
'minmaxrange' => array(
|
||||
'type' => 'integer',
|
||||
@@ -117,7 +125,9 @@ class WP_Test_REST_Request_Validation extends WP_Test_REST_TestCase {
|
||||
|
||||
public function test_validate_greater_than_min_inclusive() {
|
||||
$request = new WP_REST_Request(
|
||||
'GET', '/wp/v2/foo', array(
|
||||
'GET',
|
||||
'/wp/v2/foo',
|
||||
array(
|
||||
'args' => array(
|
||||
'greaterthanmin' => array(
|
||||
'type' => 'integer',
|
||||
@@ -134,7 +144,9 @@ class WP_Test_REST_Request_Validation extends WP_Test_REST_TestCase {
|
||||
|
||||
public function test_validate_greater_than_min_exclusive() {
|
||||
$request = new WP_REST_Request(
|
||||
'GET', '/wp/v2/foo', array(
|
||||
'GET',
|
||||
'/wp/v2/foo',
|
||||
array(
|
||||
'args' => array(
|
||||
'greaterthanmin' => array(
|
||||
'type' => 'integer',
|
||||
@@ -154,7 +166,9 @@ class WP_Test_REST_Request_Validation extends WP_Test_REST_TestCase {
|
||||
|
||||
public function test_validate_less_than_max_inclusive() {
|
||||
$request = new WP_REST_Request(
|
||||
'GET', '/wp/v2/foo', array(
|
||||
'GET',
|
||||
'/wp/v2/foo',
|
||||
array(
|
||||
'args' => array(
|
||||
'lessthanmax' => array(
|
||||
'type' => 'integer',
|
||||
@@ -171,7 +185,9 @@ class WP_Test_REST_Request_Validation extends WP_Test_REST_TestCase {
|
||||
|
||||
public function test_validate_less_than_max_exclusive() {
|
||||
$request = new WP_REST_Request(
|
||||
'GET', '/wp/v2/foo', array(
|
||||
'GET',
|
||||
'/wp/v2/foo',
|
||||
array(
|
||||
'args' => array(
|
||||
'lessthanmax' => array(
|
||||
'type' => 'integer',
|
||||
|
||||
Reference in New Issue
Block a user