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/src/wp-admin/includes/schema.php

    r43531 r43571  
    10281028    if ( 1 == $network_id ) {
    10291029        $wpdb->insert(
    1030             $wpdb->site, array(
     1030            $wpdb->site,
     1031            array(
    10311032                'domain' => $domain,
    10321033                'path'   => $path,
     
    10361037    } else {
    10371038        $wpdb->insert(
    1038             $wpdb->site, array(
     1039            $wpdb->site,
     1040            array(
    10391041                'domain' => $domain,
    10401042                'path'   => $path,
     
    10831085    );
    10841086
    1085     $misc_exts = array(
     1087    $misc_exts        = array(
    10861088        // Images.
    10871089        'jpg',
     
    11801182        $current_site->site_name = ucfirst( $domain );
    11811183        $wpdb->insert(
    1182             $wpdb->blogs, array(
     1184            $wpdb->blogs,
     1185            array(
    11831186                'site_id'    => $network_id,
    11841187                'blog_id'    => 1,
     
    12081211        $hostname = substr( md5( time() ), 0, 6 ) . '.' . $domain; // Very random hostname!
    12091212        $page     = wp_remote_get(
    1210             'http://' . $hostname, array(
     1213            'http://' . $hostname,
     1214            array(
    12111215                'timeout'     => 5,
    12121216                'httpversion' => '1.1',
Note: See TracChangeset for help on using the changeset viewer.