Skip to content

Commit

Permalink
Added support for the PHP 5.4 T_CALLABLE token so it can be used in l…
Browse files Browse the repository at this point in the history
…ower PHP versions
  • Loading branch information
gsherwood committed Mar 20, 2013
1 parent 27d1956 commit db5e7ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CodeSniffer/Tokens.php
Expand Up @@ -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);
}

/**
Expand Down
1 change: 1 addition & 0 deletions package.xml
Expand Up @@ -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
Expand Down

0 comments on commit db5e7ff

Please sign in to comment.