Make WordPress Core


Ignore:
Timestamp:
07/02/2019 11:41:16 PM (5 years ago)
Author:
pento
Message:

Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes.

See #47632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/wp-db.php

    r45430 r45590  
    14391439        wp_load_translations_early();
    14401440
    1441         if ( $caller = $this->get_caller() ) {
     1441        $caller = $this->get_caller();
     1442        if ( $caller ) {
    14421443            /* translators: 1: Database error message, 2: SQL query, 3: Name of the calling function */
    14431444            $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s made by %3$s' ), $str, $this->last_query, $caller );
     
    15441545        $this->col_info      = null;
    15451546        $this->last_query    = null;
    1546         $this->rows_affected = $this->num_rows = 0;
     1547        $this->rows_affected = 0;
     1548        $this->num_rows      = 0;
    15471549        $this->last_error    = '';
    15481550
     
    15951597            $is_ipv6 = false;
    15961598
    1597             if ( $host_data = $this->parse_db_host( $this->dbhost ) ) {
     1599            $host_data = $this->parse_db_host( $this->dbhost );
     1600            if ( $host_data ) {
    15981601                list( $host, $port, $socket, $is_ipv6 ) = $host_data;
    15991602            }
     
    21622165        }
    21632166
    2164         $formats = $values = array();
     2167        $formats = array();
     2168        $values  = array();
    21652169        foreach ( $data as $value ) {
    21662170            if ( is_null( $value['value'] ) ) {
     
    22262230        }
    22272231
    2228         $fields = $conditions = $values = array();
     2232        $fields     = array();
     2233        $conditions = array();
     2234        $values     = array();
    22292235        foreach ( $data as $field => $value ) {
    22302236            if ( is_null( $value['value'] ) ) {
     
    22872293        }
    22882294
    2289         $conditions = $values = array();
     2295        $conditions = array();
     2296        $values     = array();
    22902297        foreach ( $where as $field => $value ) {
    22912298            if ( is_null( $value['value'] ) ) {
     
    23592366     */
    23602367    protected function process_field_formats( $data, $format ) {
    2361         $formats = $original_formats = (array) $format;
     2368        $formats          = (array) $format;
     2369        $original_formats = $formats;
    23622370
    23632371        foreach ( $data as $field => $value ) {
     
    26512659        }
    26522660
    2653         $charsets = $columns = array();
     2661        $charsets = array();
     2662        $columns  = array();
    26542663
    26552664        $table_parts = explode( '.', $table );
     
    30493058
    30503059            // We couldn't use any local conversions, send it to the DB.
    3051             $value['db'] = $db_check_string = true;
     3060            $value['db']     = true;
     3061            $db_check_string = true;
    30523062        }
    30533063        unset( $value ); // Remove by reference.
Note: See TracChangeset for help on using the changeset viewer.