Make WordPress Core


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

    r52974 r52977  
    962962                $this->sql_clauses['limits']  = $limits;
    963963
    964                 $this->request = implode(
    965                         ' ',
    966                         array(
    967                                 $this->sql_clauses['select'],
    968                                 $this->sql_clauses['from'],
    969                                 $where,
    970                                 $this->sql_clauses['groupby'],
    971                                 $this->sql_clauses['orderby'],
    972                                 $this->sql_clauses['limits'],
    973                         )
    974                 );
     964                $this->request = "
     965                        {$this->sql_clauses['select']}
     966                        {$this->sql_clauses['from']}
     967                        {$where}
     968                        {$this->sql_clauses['groupby']}
     969                        {$this->sql_clauses['orderby']}
     970                        {$this->sql_clauses['limits']}
     971                ";
    975972
    976973                if ( $this->query_vars['count'] ) {
Note: See TracChangeset for help on using the changeset viewer.