Make WordPress Core


Ignore:
Timestamp:
03/22/2022 02:54:45 PM (3 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-site-query.php

    r52974 r52977  
    684684        $this->sql_clauses['limits']  = $limits;
    685685
    686         $this->request = implode(
    687             ' ',
    688             array(
    689                 $this->sql_clauses['select'],
    690                 $this->sql_clauses['from'],
    691                 $where,
    692                 $this->sql_clauses['groupby'],
    693                 $this->sql_clauses['orderby'],
    694                 $this->sql_clauses['limits'],
    695             )
    696         );
     686        $this->request = "
     687            {$this->sql_clauses['select']}
     688            {$this->sql_clauses['from']}
     689            {$where}
     690            {$this->sql_clauses['groupby']}
     691            {$this->sql_clauses['orderby']}
     692            {$this->sql_clauses['limits']}
     693        ";
    697694
    698695        if ( $this->query_vars['count'] ) {
Note: See TracChangeset for help on using the changeset viewer.