Permalink
Browse files

Added support for the PHP 5.4 T_CALLABLE token so it can be used in l…

…ower PHP versions
  • Loading branch information...
1 parent 27d1956 commit db5e7ff5715eff6e74a7599ba3891b9a5639f86f @gsherwood gsherwood committed Mar 20, 2013
Showing with 6 additions and 1 deletion.
  1. +5 −1 CodeSniffer/Tokens.php
  2. +1 −0 package.xml
@@ -90,9 +90,13 @@
define('T_INSTEADOF', 1056);
}
+if (defined('T_CALLABLE') === false) {
+ define('T_CALLABLE', 1057);
+}
+
// Some PHP 5.5 tokens, replicated for lower versions.
if (defined('T_FINALLY') === false) {
- define('T_FINALLY', 1057);
+ define('T_FINALLY', 1058);
}
/**
View
@@ -26,6 +26,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
</stability>
<license uri="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt">BSD 3-Clause License</license>
<notes>
+ - Added support for the PHP 5.4 T_CALLABLE token so it can be used in lower PHP versions
- PSR2 SwitchDeclarationSniff now has a setting to specify how many spaces code should be indented
-- Default remains at 4; override the indent setting in a ruleset.xml file to change
-- Thanks to Asher Snyder for the patch

0 comments on commit db5e7ff

Please sign in to comment.