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/tests/phpunit/tests/formatting/ent2ncr.php

    r42228 r42343  
    1010    function test_converts_named_entities_to_numeric_character_references( $entity, $ncr ) {
    1111        $entity = '&' . $entity . ';';
    12         $ncr = '&#' . $ncr . ';';
     12        $ncr    = '&#' . $ncr . ';';
    1313        $this->assertEquals( $ncr, ent2ncr( $entity ), $entity );
    1414    }
     
    1919     */
    2020    function entities() {
    21         $entities = file( DIR_TESTDATA . '/formatting/entities.txt' );
     21        $entities      = file( DIR_TESTDATA . '/formatting/entities.txt' );
    2222        $data_provided = array();
    2323        foreach ( $entities as $line ) {
    2424            // comment
    25             $commentpos = strpos( $line, "###" );
     25            $commentpos = strpos( $line, '###' );
    2626            if ( false !== $commentpos ) {
    2727                $line = trim( substr( $line, 0, $commentpos ) );
    28                 if ( ! $line )
     28                if ( ! $line ) {
    2929                    continue;
     30                }
    3031            }
    3132            $data_provided[] = array_map( 'trim', explode( '|', $line ) );
Note: See TracChangeset for help on using the changeset viewer.