Skip to content

Commit

Permalink
Fixed bug #2423 : Squiz.Formatting.OperatorBracket.MissingBrackets er…
Browse files Browse the repository at this point in the history
…ror with static
  • Loading branch information
gsherwood committed Apr 3, 2019
1 parent fd2158b commit ce2aa58
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
<notes>
- Squiz.Arrays.ArrayDeclaration now has improved handling of syntax errors
- Fixed bug #2414 : Indention false positive in switch/case/if combination
- Fixed bug #2423 : Squiz.Formatting.OperatorBracket.MissingBrackets error with static
- Fixed bug #2450 : Indentation false positive when closure containing nested IF conditions used as function argument
- Fixed bug #2452 : LowercasePHPFunctions sniff failing on "new \File()"
- Fixed bug #2453 : Squiz.CSS.SemicolonSpacingSniff false positive when style name proceeded by an asterisk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public function process(File $phpcsFile, $stackPtr)
T_NS_SEPARATOR,
T_THIS,
T_SELF,
T_STATIC,
T_OBJECT_OPERATOR,
T_DOUBLE_COLON,
T_OPEN_SQUARE_BRACKET,
Expand Down Expand Up @@ -280,6 +281,7 @@ public function addMissingBracketsError($phpcsFile, $stackPtr)
T_NS_SEPARATOR => true,
T_THIS => true,
T_SELF => true,
T_STATIC => true,
T_OBJECT_OPERATOR => true,
T_DOUBLE_COLON => true,
T_MODULUS => true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,6 @@ $foo = $bar ?? $baz ?? '';
$foo = $myString{-1};

$value = (binary) $blah + b"binary $foo";

$test = (1 * static::TEST);
$test = myfunc(1 * static::TEST);
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,6 @@ $foo = ($bar ?? $baz ?? '');
$foo = $myString{-1};

$value = ((binary) $blah + b"binary $foo");

$test = (1 * static::TEST);
$test = myfunc(1 * static::TEST);

0 comments on commit ce2aa58

Please sign in to comment.