Skip to content

Commit

Permalink
Squiz OperatorSpacingSniff no longer throws an error for negative val…
Browse files Browse the repository at this point in the history
…ues inside an inline THEN statement
  • Loading branch information
gsherwood committed Jul 23, 2012
1 parent 5784b8b commit b32e6d8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Expand Up @@ -156,6 +156,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
T_OPEN_SQUARE_BRACKET,
T_DOUBLE_ARROW,
T_COLON,
T_INLINE_THEN,
);

if (in_array($tokens[$prev]['code'], $invalidTokens) === true) {
Expand Down
Expand Up @@ -104,4 +104,5 @@ $var = saveFile(&$model, &$foo);
$boo = -$foo;
function foo($boo = -1) {}
$foo = array('boo' => -1);
$x = $test ? -1 : 1;
?>
1 change: 1 addition & 0 deletions package.xml
Expand Up @@ -28,6 +28,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
<notes>
- Added PSR1 and PSR2 coding standards that can be used to check your code against these guidelines
- Squiz FunctionDeclarationArgumentSpacingSniff now supports closures
- Squiz OperatorSpacingSniff no longer throws an error for negative values inside an inline THEN statement
- Fixed bug #19508 : switch+return: Closing brace indented incorrectly
</notes>
<contents>
Expand Down

0 comments on commit b32e6d8

Please sign in to comment.