WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (11 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison where static strings are involved.

This reduces the number of WordPress.PHP.StrictComparisons.LooseComparison issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-walker-category.php

    r46413 r47808  
    5454     */
    5555    public function start_lvl( &$output, $depth = 0, $args = array() ) {
    56         if ( 'list' != $args['style'] ) {
     56        if ( 'list' !== $args['style'] ) {
    5757            return;
    5858        }
     
    7575     */
    7676    public function end_lvl( &$output, $depth = 0, $args = array() ) {
    77         if ( 'list' != $args['style'] ) {
     77        if ( 'list' !== $args['style'] ) {
    7878            return;
    7979        }
     
    187187            $link .= ' (' . number_format_i18n( $category->count ) . ')';
    188188        }
    189         if ( 'list' == $args['style'] ) {
     189        if ( 'list' === $args['style'] ) {
    190190            $output     .= "\t<li";
    191191            $css_classes = array(
     
    259259     */
    260260    public function end_el( &$output, $page, $depth = 0, $args = array() ) {
    261         if ( 'list' != $args['style'] ) {
     261        if ( 'list' !== $args['style'] ) {
    262262            return;
    263263        }
Note: See TracChangeset for help on using the changeset viewer.