Make WordPress Core


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

    r42343 r43571  
    108108        public function test_cache_should_be_invalidated_by_add_post_meta() {
    109109                $posts = self::factory()->post->create_many(
    110                         2, array(
     110                        2,
     111                        array(
    111112                                'post_type' => 'page',
    112113                        )
    … …  
    143144        public function test_cache_should_be_invalidated_by_update_post_meta() {
    144145                $posts = self::factory()->post->create_many(
    145                         2, array(
     146                        2,
     147                        array(
    146148                                'post_type' => 'page',
    147149                        )
    … …  
    179181        public function test_cache_should_be_invalidated_by_delete_post_meta() {
    180182                $posts = self::factory()->post->create_many(
    181                         2, array(
     183                        2,
     184                        array(
    182185                                'post_type' => 'page',
    183186                        )
    … …  
    215218        public function test_cache_should_be_invalidated_by_delete_post_meta_by_key() {
    216219                $posts = self::factory()->post->create_many(
    217                         2, array(
     220                        2,
     221                        array(
    218222                                'post_type' => 'page',
    219223                        )
    … …  
    256260
    257261                $this->assertEquals(
    258                         1, count(
     262                        1,
     263                        count(
    259264                                get_pages(
    260265                                        array(
    … …  
    266271                );
    267272                $this->assertEquals(
    268                         1, count(
     273                        1,
     274                        count(
    269275                                get_pages(
    270276                                        array(
    … …  
    619625                $type = 'taco';
    620626                register_post_type(
    621                         $type, array(
     627                        $type,
     628                        array(
    622629                                'hierarchical' => true,
    623630                                'public'       => true,
Note: See TracChangeset for help on using the changeset viewer.