Skip to content
Browse files

Need to support traits here

  • Loading branch information...
1 parent 5fed8ba commit cce7a5775bb3c8c9c2b6ff5a8ff5ed5c5082dc91 @gsherwood gsherwood committed Aug 6, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 CodeSniffer/File.php
View
3 CodeSniffer/File.php
@@ -1950,8 +1950,9 @@ public function getDeclarationName($stackPtr)
if ($tokenCode !== T_FUNCTION
&& $tokenCode !== T_CLASS
&& $tokenCode !== T_INTERFACE
+ && $tokenCode !== T_TRAIT
) {
- throw new PHP_CodeSniffer_Exception('Token type is not T_FUNCTION, T_CLASS OR T_INTERFACE');
+ throw new PHP_CodeSniffer_Exception('Token type is not T_FUNCTION, T_CLASS, T_INTERFACE or T_TRAIT');
}
if ($tokenCode === T_FUNCTION

0 comments on commit cce7a57

Please sign in to comment.
Something went wrong with that request. Please try again.