Make WordPress Core


Ignore:
Timestamp:
03/22/2022 02:54:45 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use multi-line strings for the $this->request property in wp-includes/class-wp-*-query.php.

This further improves the readability by replacing implode() calls with string interpolation.

Follow-up to [52973].

Props jrf.
See #54728.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-network-query.php

    r52974 r52977  
    481481        $this->sql_clauses['limits']  = $limits;
    482482
    483         $this->request = implode(
    484             ' ',
    485             array(
    486                 $this->sql_clauses['select'],
    487                 $this->sql_clauses['from'],
    488                 $where,
    489                 $this->sql_clauses['groupby'],
    490                 $this->sql_clauses['orderby'],
    491                 $this->sql_clauses['limits'],
    492             )
    493         );
     483        $this->request = "
     484            {$this->sql_clauses['select']}
     485            {$this->sql_clauses['from']}
     486            {$where}
     487            {$this->sql_clauses['groupby']}
     488            {$this->sql_clauses['orderby']}
     489            {$this->sql_clauses['limits']}
     490        ";
    494491
    495492        if ( $this->query_vars['count'] ) {
Note: See TracChangeset for help on using the changeset viewer.