WordPress.org

Making WordPress.org


Ignore:
Timestamp:
12/19/2017 04:22:37 PM (20 months ago)
Author:
obenland
Message:

PLugins: Clean up formatting with phpcbf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-svn-watcher.php

    r5449 r6287  
    1313class SVN_Watcher {
    1414
    15     const SVN_URL      = 'https://plugins.svn.wordpress.org/';
    16     const PHP          = '/usr/local/bin/php';
     15    const SVN_URL = 'https://plugins.svn.wordpress.org/';
     16    const PHP     = '/usr/local/bin/php';
    1717
    1818    /**
     
    7777                wp_schedule_single_event( time() + 30, 'plugin_directory_check_cronjobs' );
    7878
    79                 throw new Exception( "Could not fetch plugins.svn logs: " . implode( ', ', $logs['errors'] ) );
     79                throw new Exception( 'Could not fetch plugins.svn logs: ' . implode( ', ', $logs['errors'] ) );
    8080            } else {
    8181                // If the job fails again within the next minute, throw an exception (as above)
     
    104104            if ( ! isset( $plugins[ $plugin_slug ] ) ) {
    105105                $plugins[ $plugin_slug ] = array(
    106                     'tags_touched' => array(), // trunk is a tag too!
     106                    'tags_touched'   => array(), // trunk is a tag too!
    107107                    'readme_touched' => false, // minor optimization, only parse readme i18n on readme-related commits
    108                     'code_touched' => false,
     108                    'code_touched'   => false,
    109109                    'assets_touched' => false,
    110                     'revisions' => array(),
     110                    'revisions'      => array(),
    111111                );
    112112            }
     
    116116            $plugin['revisions'][] = $log['revision'];
    117117            foreach ( $log['paths'] as $path ) {
    118                 $path_parts = explode('/', trim( $path, '/' ) );
     118                $path_parts = explode( '/', trim( $path, '/' ) );
    119119
    120120                if ( ! isset( $path_parts[1] ) ) {
     
    140140                    $plugin['code_touched'] = true;
    141141                }
    142 
    143142            }
    144143            $plugin['tags_touched'] = array_unique( $plugin['tags_touched'] );
     
    168167            wp_schedule_single_event( time() + 30, 'plugin_directory_check_cronjobs' );
    169168
    170             throw new Exception( "Unable to determine HEAD revision" );
     169            throw new Exception( 'Unable to determine HEAD revision' );
    171170        }
    172171        return array_keys( $log['log'] )[0];
     
    182181    protected function get_option( $option_name ) {
    183182        global $wpdb;
     183
    184184        return maybe_unserialize( $wpdb->get_var( $wpdb->prepare(
    185185            "SELECT option_value FROM $wpdb->options WHERE option_name = %s",
Note: See TracChangeset for help on using the changeset viewer.