Skip to content

Commit

Permalink
Need to support traits here
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Aug 6, 2012
1 parent 5fed8ba commit cce7a57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CodeSniffer/File.php
Expand Up @@ -1950,8 +1950,9 @@ public function getDeclarationName($stackPtr)
if ($tokenCode !== T_FUNCTION if ($tokenCode !== T_FUNCTION
&& $tokenCode !== T_CLASS && $tokenCode !== T_CLASS
&& $tokenCode !== T_INTERFACE && $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 if ($tokenCode === T_FUNCTION
Expand Down

0 comments on commit cce7a57

Please sign in to comment.