Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
51 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
52 | { |
||
53 | if ($this->supportsAbove('7.0')) { |
||
54 | $tokens = $phpcsFile->getTokens(); |
||
55 | |||
56 | $nextNumber = $phpcsFile->findNext(T_LNUMBER, $stackPtr, null, false, null, true); |
||
57 | if ($tokens[$nextNumber - 1]['code'] == T_MINUS) { |
||
58 | $error = 'Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0'; |
||
59 | $phpcsFile->addError($error, $nextNumber - 1); |
||
60 | } |
||
61 | } |
||
62 | }//end process() |
||
63 | |||
65 |