Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (9 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-dependency.php

    r41162 r42343  
    7575        public function __construct() {
    7676                @list( $this->handle, $this->src, $this->deps, $this->ver, $this->args ) = func_get_args();
    77                 if ( ! is_array($this->deps) )
     77                if ( ! is_array( $this->deps ) ) {
    7878                        $this->deps = array();
     79                }
    7980        }
    8081
    … …  
    8990         */
    9091        public function add_data( $name, $data ) {
    91                 if ( !is_scalar($name) )
     92                if ( ! is_scalar( $name ) ) {
    9293                        return false;
    93                 $this->extra[$name] = $data;
     94                }
     95                $this->extra[ $name ] = $data;
    9496                return true;
    9597        }
Note: See TracChangeset for help on using the changeset viewer.