Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/11/2015 08:17:53 PM (11 years ago)
Author:
johnjamesjacoby
Message:

Sniffer: Whitespace around variables in arrays.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/functions.php

    r5907 r5908  
    152152            // Step one: the first chunk
    153153            for ( $i = 0, $j = count( $chunks ); $i < $j; ++$i ) {
    154                 $seconds = $chunks[$i][0];
     154                $seconds = $chunks[ $i ][0];
    155155
    156156                // Finding the biggest chunk (if the chunk fits, break)
     
    162162
    163163            // If $i iterates all the way to $j, then the event happened 0 seconds ago
    164             if ( ! isset( $chunks[$i] ) ) {
     164            if ( ! isset( $chunks[ $i ] ) ) {
    165165                $output = $right_now_text;
    166166
     
    168168
    169169                // Set output var
    170                 $output = ( 1 == $count ) ? '1 '. $chunks[$i][1] : $count . ' ' . $chunks[$i][2];
     170                $output = ( 1 == $count ) ? '1 '. $chunks[ $i ][1] : $count . ' ' . $chunks[ $i ][2];
    171171
    172172                // Step two: the second chunk
    173173                if ( $i + 2 < $j ) {
    174                     $seconds2 = $chunks[$i + 1][0];
    175                     $name2    = $chunks[$i + 1][1];
     174                    $seconds2 = $chunks[ $i + 1 ][0];
     175                    $name2    = $chunks[ $i + 1 ][1];
    176176                    $count2   = floor( ( $since - ( $seconds * $count ) ) / $seconds2 );
    177177
    178178                    // Add to output var
    179179                    if ( 0 != $count2 ) {
    180                         $output .= ( 1 == $count2 ) ? _x( ',', 'Separator in time since', 'bbpress' ) . ' 1 '. $name2 : _x( ',', 'Separator in time since', 'bbpress' ) . ' ' . $count2 . ' ' . $chunks[$i + 1][2];
     180                        $output .= ( 1 == $count2 ) ? _x( ',', 'Separator in time since', 'bbpress' ) . ' 1 '. $name2 : _x( ',', 'Separator in time since', 'bbpress' ) . ' ' . $count2 . ' ' . $chunks[ $i + 1 ][2];
    181181                    }
    182182                }
     
    18821882                // Setup matched variables to select
    18831883                foreach ( $query_vars as $key => $value ) {
    1884                     if ( isset( $select_query_vars[$key] ) ) {
    1885                         $select_query_vars[$key] = $value;
     1884                    if ( isset( $select_query_vars[ $key ] ) ) {
     1885                        $select_query_vars[ $key ] = $value;
    18861886                    }
    18871887                }
Note: See TracChangeset for help on using the changeset viewer.