Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (7 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-session-tokens.php

    r41162 r42343  
    132132         * @param int   $user_id User ID.
    133133         */
    134         $session = apply_filters( 'attach_session_information', array(), $this->user_id );
     134        $session               = apply_filters( 'attach_session_information', array(), $this->user_id );
    135135        $session['expiration'] = $expiration;
    136136
    137137        // IP address.
    138         if ( !empty( $_SERVER['REMOTE_ADDR'] ) ) {
     138        if ( ! empty( $_SERVER['REMOTE_ADDR'] ) ) {
    139139            $session['ip'] = $_SERVER['REMOTE_ADDR'];
    140140        }
     
    190190    final public function destroy_others( $token_to_keep ) {
    191191        $verifier = $this->hash_token( $token_to_keep );
    192         $session = $this->get_session( $verifier );
     192        $session  = $this->get_session( $verifier );
    193193        if ( $session ) {
    194194            $this->destroy_other_sessions( $verifier );
Note: See TracChangeset for help on using the changeset viewer.