Skip to content

Commit

Permalink
Support phpcs 3.2 also (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
sirbrillig authored Jun 13, 2018
1 parent f5edf64 commit 7f259cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions NeutronStandard/Sniffs/Functions/TypeHintSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ private function checkForMissingArgumentHints(File $phpcsFile, $stackPtr, SniffH
T_CALLABLE,
T_SELF,
];
// Support for phpcs < 3.3; see https://github.com/Automattic/phpcs-neutron-standard/issues/62
if (defined('T_ARRAY_HINT')) {
$hintTypes[] = T_ARRAY_HINT;
}

for ($ptr = ($openParenPtr + 1); $ptr < $closeParenPtr; $ptr++) {
if ($tokens[$ptr]['code'] === T_VARIABLE) {
Expand Down

0 comments on commit 7f259cd

Please sign in to comment.