Permalink
Browse files

Fixed bug #19412 : Incorrect error about assigning objects to variabl…

…es when inside inline IF
  • Loading branch information...
gsherwood committed May 10, 2012
1 parent c0c677b commit 7f703b27a70d041cb6cb86b49d8e03c4a11b25fa
@@ -66,6 +66,8 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
T_DOUBLE_ARROW,
T_THROW,
T_RETURN,
+ T_INLINE_THEN,
+ T_COLON,
);
if (in_array($tokens[$prev]['code'], $allowedTokens) === false) {
@@ -10,4 +10,6 @@ $object->myFunction(new MyClass());
throw new MyException($msg);
function foo() { return new MyClass(); }
+
+$doodad = $x ? new Foo : new Bar;
?>
View
@@ -55,6 +55,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
- Fixed bug #19374 : HEREDOC/NOWDOC Indentation problems
- Fixed bug #19381 : traits and indetations in traits are not handled properly
- Fixed bug #19394 : Notice in NonExecutableCodeSniff
+ - Fixed bug #19412 : Incorrect error about assigning objects to variables when inside inline IF
</notes>
<contents>
<dir name="/">

1 comment on commit 7f703b2

@petdance

This comment has been minimized.

Show comment Hide comment
@petdance

petdance May 10, 2012

Excellent, thanks for the fix. I'm going to install from the latest on GitHub.

Excellent, thanks for the fix. I'm going to install from the latest on GitHub.

Please sign in to comment.