Skip to content

False positives for Generic_Sniffs_WhiteSpace_ScopeIndentSniff #358

@MaartenStaa

Description

@MaartenStaa

This is a continuation of issue #337 but by now the false positives no longer have anything to do with anonymous functions. After commit 63b6049 I have four new failing cases, some of which may or may not be duplicates of each other.

$str = 'the items I want to show are: ' . implode( ', ', array('a', 'b', 'c') ); echo $str; // error here 
switch ($foo) { case 'bar': return in_array( $i, array(1, 2, 3) ); case 'baz': // error here return true; } 
$foo = 'some long string' . preg_replace( '/\bv/', 'long v', 'another value' ); echo $foo; // error here 
Database::table('foo') ->update( array( 'bar' => 'baz', ) ); return true; // error here 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions